Documentation ¶
Index ¶
- Variables
- type App
- type AudioStatus
- type CaseDetail
- type CurrentSWInformation
- type Dialer
- type ForegroundAppInfo
- type LaunchPoint
- type Msg
- type Payload
- type PointerSocket
- func (ps *PointerSocket) Click() (err error)
- func (ps *PointerSocket) Close() (err error)
- func (ps *PointerSocket) Input(btype, bname string) (err error)
- func (ps *PointerSocket) MessageHandler() (err error)
- func (ps *PointerSocket) Move(dx, dy int) (err error)
- func (ps *PointerSocket) Scroll(dx, dy int) (err error)
- type ServiceListEntry
- type SystemInfo
- type Tv
- func (tv *Tv) ApiGetServiceList() (list []ServiceListEntry, err error)
- func (tv *Tv) ApplicationManagerGetAppInfo(id string) (info App, err error)
- func (tv *Tv) ApplicationManagerGetForegroundAppInfo() (info ForegroundAppInfo, err error)
- func (tv *Tv) ApplicationManagerLaunch(id string, params Payload) (processId string, err error)
- func (tv *Tv) ApplicationManagerListApps() (list []App, err error)
- func (tv *Tv) ApplicationManagerListLaunchPoints() (launchPoints []LaunchPoint, caseDetail CaseDetail, err error)
- func (tv *Tv) ApplicationManagerMonitorForegroundAppInfo(process func(info ForegroundAppInfo) error, quit <-chan struct{}) error
- func (tv *Tv) AudioGetMute() (mute bool, err error)
- func (tv *Tv) AudioGetStatus() (as AudioStatus, err error)
- func (tv *Tv) AudioGetVolume() (scenario string, volume int, muted bool, err error)
- func (tv *Tv) AudioMonitorStatus(process func(as AudioStatus) error, quit <-chan struct{}) error
- func (tv *Tv) AudioSetMute(mute bool) (err error)
- func (tv *Tv) AudioSetVolume(volume int) (err error)
- func (tv *Tv) AudioVolumeDown() (err error)
- func (tv *Tv) AudioVolumeUp() (err error)
- func (tv *Tv) Close() (err error)
- func (tv *Tv) Get3DStatus() (status bool, pattern string, err error)
- func (tv *Tv) GetCurrentSWInformation() (info CurrentSWInformation, err error)
- func (tv *Tv) GetCurrentTime() (y, m, d, h, min, s int, err error)
- func (tv *Tv) GetPointerInputSocket() (socketPath string, err error)
- func (tv *Tv) ImeDeleteCharacters(count int) (err error)
- func (tv *Tv) ImeInsertText(text string, replace bool) (err error)
- func (tv *Tv) ImeSendEnterKey() (err error)
- func (tv *Tv) LaunchNetflix(contentId string) (sessionId string, err error)
- func (tv *Tv) LaunchYoutube(videoId string) (sessionId string, err error)
- func (tv *Tv) MediaControlsFastForward() (err error)
- func (tv *Tv) MediaControlsPause() (err error)
- func (tv *Tv) MediaControlsPlay() (err error)
- func (tv *Tv) MediaControlsRewind() (err error)
- func (tv *Tv) MediaControlsStop() (err error)
- func (tv *Tv) MediaViewerClose(sessionId string) (err error)
- func (tv *Tv) MediaViewerOpen(url, title, description, mimeType, iconSrc string, loop bool) (appId, sessionId string, err error)
- func (tv *Tv) MessageHandler() (err error)
- func (tv *Tv) MonitorStatus(uri string, req Payload, processPayload func(Payload) error, ...) (err error)
- func (tv *Tv) NewPointerSocket() (ps *PointerSocket, err error)
- func (tv *Tv) Register(key string) (newKey string, err error)
- func (tv *Tv) Request(uri string, req Payload) (resp Payload, err error)
- func (tv *Tv) RequestResponseParam(uri string, req Payload, resp interface{}) (err error)
- func (tv *Tv) SdxGetHttpHeaderForServiceRequest() (resp map[string]string, err error)
- func (tv *Tv) SecondscreenGatewayTestSecure() (clearedForDuty bool, err error)
- func (tv *Tv) Set3DOff() (err error)
- func (tv *Tv) Set3DOn() (err error)
- func (tv *Tv) SetDebug(debugFunc func(string))
- func (tv *Tv) Subscribe(uri string, req Payload, msgCh chan<- Msg) (id string, err error)
- func (tv *Tv) SystemGetSystemInfo() (info SystemInfo, err error)
- func (tv *Tv) SystemLauncherClose(sessionId string) (err error)
- func (tv *Tv) SystemLauncherGetAppState(sessionId string) (running, visible bool, err error)
- func (tv *Tv) SystemLauncherLaunch(appId string, params Payload) (sessionId string, err error)
- func (tv *Tv) SystemLauncherOpen(url string) (appId, sessionId string, err error)
- func (tv *Tv) SystemNotificationsCreateToast(msg string) (toastId string, err error)
- func (tv *Tv) SystemTurnOff() (err error)
- func (tv *Tv) TvChannelDown() (err error)
- func (tv *Tv) TvChannelUp() (err error)
- func (tv *Tv) TvGetChannelCurrentProgramInfo(channelId string) (info TvCurrentProgramInfo, err error)
- func (tv *Tv) TvGetChannelList() (list []TvChannel, err error)
- func (tv *Tv) TvGetChannelProgramInfo(channelId string) (channel TvChannel, programlist []TvProgram, err error)
- func (tv *Tv) TvGetCurrentChannel() (cur TvCurrentChannel, err error)
- func (tv *Tv) TvGetExternalInputList() (list []TvExternalInput, err error)
- func (tv *Tv) TvMonitorCurrentChannel(process func(cur TvCurrentChannel) error, quit <-chan struct{}) error
- func (tv *Tv) TvOpenChannelId(channelId string) (err error)
- func (tv *Tv) TvOpenChannelNumber(channelNumber string) (err error)
- func (tv *Tv) TvSwitchInput(inputId string) (err error)
- func (tv *Tv) Unsubscribe(uri string, id string, req Payload) error
- type TvChannel
- type TvChannelGroupId
- type TvCurrentChannel
- type TvCurrentProgramInfo
- type TvExternalInput
- type TvProgram
- type TvProgramRating
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Timeout = time.Second * 5 RegisterTimeout = time.Second * 30 ErrTimeout = errors.New("timeout") ErrNoResponse = errors.New("no response") ErrRegistrationFailed = errors.New("registration failed") )
View Source
var DefaultDialer = Dialer{ DisableTLS: false, WebsocketDialer: &websocket.Dialer{ Proxy: http.ProxyFromEnvironment, HandshakeTimeout: 10 * time.Second, TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, NetDial: (&net.Dialer{ Timeout: time.Second * 5, KeepAlive: time.Second * 30, }).Dial, }, }
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Id string // "id": "com.webos.app.discovery", Title string // "title": "LG Store", Version string // "version": "1.0.19", Vendor string // "vendor": "LGE", FolderPath string // "folderPath": "/mnt/otncabi/usr/palm/applications/com.webos.app.discovery", DefaultWindowType string // "defaultWindowType": "card", MediumIcon string // "mediumIcon": "lgstore_80x80.png", Miniicon string // "miniicon": "http://lgsmarttv.lan:3000/r[..]e/miniicon.png", RequestedWindowOrientation string // "requestedWindowOrientation": "", LargeIcon string // "largeIcon": "lgstore_130x130.png", Icon string // "icon": "http://lgsmarttv.lan:3000/r[..]9/lgstore_80x80.png", Category string // "category": "", TrustLevel string // "trustLevel": "default", SplashBackground string // "splashBackground": "lgstore_splash.png", DeeplinkingParams string // "deeplinkingParams": "{\"contentTarget\":\"$CONTENTID\"}", RequiredEULA string // "requiredEULA": "generalTerms", Main string // "main": "index.html", Type string // "type": "web", BgImage string // "bgImage": "lgstore_preview.png", IconColor string // "iconColor": "#cf0652", ImageForRecents string // "imageForRecents": "RECENTS.png", Resolution string // "resolution": "1280x720", BgColor string // "bgColor": "#8e191b", ContainerCSS string // "containerCSS": "build/app1.css", EnyoVersion string // "enyoVersion": "2.3.0", ContainerJS string // "containerJS": "build/app1.js", Splashicon string // "splashicon": "http://lgsmarttv.lan:3000/r[..]2/splash.png", Appsize int // "appsize": 0, HardwareFeaturesNeeded int // "hardwareFeaturesNeeded": 0, Age int // "age": 0, BinId int // "binId": 361092, RequiredMemory int // "requiredMemory": 160, Lockable bool // "lockable": true, Transparent bool // "transparent": false, CheckUpdateOnLaunch bool // "checkUpdateOnLaunch": true, Launchinnewgroup bool // "launchinnewgroup": false, HandlesRelaunch bool // "handlesRelaunch": false, Inspectable bool // "inspectable": false, InAppSetting bool // "inAppSetting": false, PrivilegedJail bool // "privilegedJail": false, Visible bool // "visible": true, NoWindow bool // "noWindow": false, Removable bool // "removable": true, DisableBackHistoryAPI bool // "disableBackHistoryAPI": true InternalInstallationOnly bool // "internalInstallationOnly": true, NoSplashOnLaunch bool // "noSplashOnLaunch": true, CustomPlugin bool // "customPlugin": true, Hidden bool // "hidden": true, UIRevision interface{} // "uiRevision": 2, // "uiRevision": "2", MimeTypes []struct { Mime string // "mime": "application/vnd.lge.appstore" Extension string // "extension": "html", Scheme string // "scheme": "https" Stream bool // "stream": true, } Class struct { Hidden bool // "hidden": true } OnDeviceSource map[string]string // "onDeviceSource": { VendorExtension map[string]interface{} // // "vendorExtension": { BootLaunchParams struct { BGMode string // "BGMode": "1" Boot bool // "boot": true } }
type AudioStatus ¶
type CaseDetail ¶
type CurrentSWInformation ¶
type CurrentSWInformation struct { ProductName string `mapstructure:"product_name"` // "product_name":"webOS" ModelName string `mapstructure:"model_name"` // "model_name":"HE_DTV_WT1M_AFAAABAA" SwType string `mapstructure:"sw_type"` // "sw_type":"FIRMWARE" MajorVer string `mapstructure:"major_ver"` // "major_ver":"05" MinorVer string `mapstructure:"minor_ver"` // "minor_ver":"05.35" Country string `mapstructure:"country"` // "country":"FI" DeviceId string `mapstructure:"device_id"` // "device_id":"3c:cd:93:7b:91:9e" AuthFlag string `mapstructure:"auth_flag"` // "auth_flag":"N" IgnoreDisable string `mapstructure:"ignore_disable"` // "ignore_disable":"N" EcoInfo string `mapstructure:"eco_info"` // "eco_info":"01" ConfigKey string `mapstructure:"config_key"` // "config_key":"00" LanguageCode string `mapstructure:"language_code"` // "language_code":"en-GB"} }
type Dialer ¶
func (*Dialer) DialPointerSocket ¶
func (dialer *Dialer) DialPointerSocket(address string) (ps *PointerSocket, err error)
type ForegroundAppInfo ¶
func (*ForegroundAppInfo) IsLiveTv ¶
func (i *ForegroundAppInfo) IsLiveTv() bool
type LaunchPoint ¶
type LaunchPoint struct { Removable bool // "removable": false, LargeIcon string // "largeIcon": "/mnt/otncabi/usr/palm/applications/com.webos.app.discovery/lgstore_130x130.png", Vendor string // "vendor": "LGE", Id string // "id": "com.webos.app.discovery", Title string // "title": "LG Store", BgColor string // "bgColor": "#8e191b", VendorURL string // "vendorUrl": "", IconColor string // "iconColor": "#4b4b4b", AppDescription string // "appDescription": "", Params map[string]string // "params": { // "deviceId": "HDMI_2" Version string // "version": "1.0.19", BgImage string // "bgImage": "/mnt/otncabi/usr/palm/applications/com.webos.app.discovery/lgstore_preview.png", Icon string // "icon": "http://lgsmarttv.lan:3000/resources/e1a2afa2ee2c03b7e7c89247d3425a8af8657e5d/lgstore_80x80.png", LaunchPointId string // "launchPointId": "com.webos.app.discovery_default", ImageForRecents string // "imageForRecents": "/media/cryptofs/apps/usr/palm/applications/netflix/RECENTS.png" }
type PointerSocket ¶
func (*PointerSocket) Click ¶
func (ps *PointerSocket) Click() (err error)
func (*PointerSocket) Close ¶
func (ps *PointerSocket) Close() (err error)
func (*PointerSocket) Input ¶
func (ps *PointerSocket) Input(btype, bname string) (err error)
func (*PointerSocket) MessageHandler ¶
func (ps *PointerSocket) MessageHandler() (err error)
func (*PointerSocket) Move ¶
func (ps *PointerSocket) Move(dx, dy int) (err error)
func (*PointerSocket) Scroll ¶
func (ps *PointerSocket) Scroll(dx, dy int) (err error)
type ServiceListEntry ¶
type SystemInfo ¶
type Tv ¶
type Tv struct { Address string // contains filtered or unexported fields }
func (*Tv) ApiGetServiceList ¶
func (tv *Tv) ApiGetServiceList() (list []ServiceListEntry, err error)
func (*Tv) ApplicationManagerGetAppInfo ¶
func (*Tv) ApplicationManagerGetForegroundAppInfo ¶
func (tv *Tv) ApplicationManagerGetForegroundAppInfo() (info ForegroundAppInfo, err error)
func (*Tv) ApplicationManagerLaunch ¶
func (*Tv) ApplicationManagerListApps ¶
func (*Tv) ApplicationManagerListLaunchPoints ¶
func (tv *Tv) ApplicationManagerListLaunchPoints() (launchPoints []LaunchPoint, caseDetail CaseDetail, err error)
func (*Tv) ApplicationManagerMonitorForegroundAppInfo ¶
func (tv *Tv) ApplicationManagerMonitorForegroundAppInfo(process func(info ForegroundAppInfo) error, quit <-chan struct{}) error
func (*Tv) AudioGetMute ¶
func (*Tv) AudioGetStatus ¶
func (tv *Tv) AudioGetStatus() (as AudioStatus, err error)
func (*Tv) AudioGetVolume ¶
func (*Tv) AudioMonitorStatus ¶
func (tv *Tv) AudioMonitorStatus(process func(as AudioStatus) error, quit <-chan struct{}) error
func (*Tv) AudioSetMute ¶
func (*Tv) AudioSetVolume ¶
func (*Tv) AudioVolumeDown ¶
func (*Tv) AudioVolumeUp ¶
func (*Tv) GetCurrentSWInformation ¶
func (tv *Tv) GetCurrentSWInformation() (info CurrentSWInformation, err error)
func (*Tv) GetCurrentTime ¶
func (*Tv) GetPointerInputSocket ¶
func (*Tv) ImeDeleteCharacters ¶
func (*Tv) ImeSendEnterKey ¶
func (*Tv) LaunchNetflix ¶
func (*Tv) LaunchYoutube ¶
func (*Tv) MediaControlsFastForward ¶
func (*Tv) MediaControlsPause ¶
func (*Tv) MediaControlsPlay ¶
func (*Tv) MediaControlsRewind ¶
func (*Tv) MediaControlsStop ¶
func (*Tv) MediaViewerClose ¶
func (*Tv) MediaViewerOpen ¶
func (*Tv) MessageHandler ¶
func (*Tv) MonitorStatus ¶
func (*Tv) NewPointerSocket ¶
func (tv *Tv) NewPointerSocket() (ps *PointerSocket, err error)
func (*Tv) RequestResponseParam ¶
func (*Tv) SdxGetHttpHeaderForServiceRequest ¶
func (*Tv) SecondscreenGatewayTestSecure ¶
func (*Tv) SystemGetSystemInfo ¶
func (tv *Tv) SystemGetSystemInfo() (info SystemInfo, err error)
func (*Tv) SystemLauncherClose ¶
func (*Tv) SystemLauncherGetAppState ¶
func (*Tv) SystemLauncherLaunch ¶
func (*Tv) SystemLauncherOpen ¶
func (*Tv) SystemNotificationsCreateToast ¶
func (*Tv) SystemTurnOff ¶
func (*Tv) TvChannelDown ¶
func (*Tv) TvChannelUp ¶
func (*Tv) TvGetChannelCurrentProgramInfo ¶
func (tv *Tv) TvGetChannelCurrentProgramInfo(channelId string) (info TvCurrentProgramInfo, err error)
func (*Tv) TvGetChannelList ¶
func (*Tv) TvGetChannelProgramInfo ¶
func (*Tv) TvGetCurrentChannel ¶
func (tv *Tv) TvGetCurrentChannel() (cur TvCurrentChannel, err error)
func (*Tv) TvGetExternalInputList ¶
func (tv *Tv) TvGetExternalInputList() (list []TvExternalInput, err error)
func (*Tv) TvMonitorCurrentChannel ¶
func (tv *Tv) TvMonitorCurrentChannel(process func(cur TvCurrentChannel) error, quit <-chan struct{}) error
func (*Tv) TvOpenChannelId ¶
func (*Tv) TvOpenChannelNumber ¶
func (*Tv) TvSwitchInput ¶
type TvChannel ¶
type TvChannel struct { ChannelId string // "channelId": "3_3_23_23_17_3291_0", ChannelMajMinNo string // "channelMajMinNo": "04-00023-000-003", ChannelName string // "channelName": "MTV3 HD", ChannelNumber string // "channelNumber": "23", ChannelType string // "channelType": "Cable Digital TV", ChannelTypeId int // "channelTypeId": 4, ChannelMode string // "channelMode": "Cable", ChannelModeId int // "channelModeId": 1, SignalChannelId string // "signalChannelId": "17_3291_0", ProgramId string // "programId": "17_3291_0", FavoriteGroup string // "favoriteGroup": "", SatelliteName string // "satelliteName": " ", Frequency int // "Frequency": 130000, Bandwidth int // "Bandwidth": 0, SourceIndex int // "sourceIndex": 3, ServiceType int // "serviceType": 25, ShortCut int // "shortCut": 0, Handle int // "Handle": 0, ONID int // "ONID": 0, SVCID int // "SVCID": 3291, TSID int // "TSID": 17, ConfigurationId int // "configurationId": 0, MajorNumber int // "majorNumber": 23, MinorNumber int // "minorNumber": 23, PhysicalNumber int // "physicalNumber": 3, ATV bool // "ATV": false, DTV bool // "DTV": true, Data bool // "Data": false, HDTV bool // "HDTV": true, Invisible bool // "Invisible": false, Numeric bool // "Numeric": false, PrimaryCh bool // "PrimaryCh": true, Radio bool // "Radio": false, TV bool // "TV": true, Descrambled bool // "descrambled": true, FineTuned bool // "fineTuned": false, Locked bool // "locked": false, SatelliteLcn bool // "satelliteLcn": false, Scrambled bool // "scrambled": false, Skipped bool // "skipped": false, SpecialService bool // "specialService": false GroupIdList []TvChannelGroupId }
type TvChannelGroupId ¶
type TvCurrentChannel ¶
type TvCurrentChannel struct { ChannelId string // "channelId":"3_32_24_24_31_13105_0" SignalChannelId string // "signalChannelId":"31_13105_0" ChannelModeId int // "channelModeId":1 ChannelModeName string // "channelModeName":"Cable" ChannelTypeId int // "channelTypeId":4 ChannelTypeName string // "channelTypeName":"Cable Digital TV" ChannelNumber string // "channelNumber":"24" ChannelName string // "channelName":"Nelonen HD" PhysicalNumber int // "physicalNumber":32 IsSkipped bool // "isSkipped":false IsLocked bool // "isLocked":false IsDescrambled bool // "isDescrambled":true IsScrambled bool // "isScrambled":false IsFineTuned bool // "isFineTuned":false IsInvisible bool // "isInvisible":false }
type TvCurrentProgramInfo ¶
type TvCurrentProgramInfo struct { ProgramId string // "programId": "0_31_13105_42559", ProgramName string // "programName": "Keno ja Synttärit", Description string // "description": "Illan Keno-arvonnan [..] visailuohjelma. (2')", StartTime string // "startTime": "2018,04,03,17,58,00" EndTime string // "endTime": "2018,04,03,18,00,00", LocalStartTime string // "localStartTime": "2018,04,03,20,58,00", LocalEndTime string // "localEndTime": "2018,04,03,21,00,00", ChanelId string // "channelId": "3_32_24_24_31_13105_0", ChannelName string // "channelName": "Nelonen HD", ChannelNumber string // "channelNumber": "24", ChannelMode string // "channelMode": "Cable", Duration int // "duration": 120, }
type TvExternalInput ¶
type TvExternalInput struct { Id string // "id": "SCART_1", Label string // "label": "AV1", Port int // "port": 1, AppId string // "appId": "com.webos.app.externalinput.scart", Icon string // "icon": "http://lgsmarttv.lan:3000/resources/d8dd219500f8c1604e548d980c0f60979be5b5a5/scart.png", CurrentTVStatus string // "currentTVStatus": "", Modified bool // "modified": false, Autoav bool // "autoav": false, Connected bool // "connected": false, Favorite bool // "favorite": false }
type TvProgram ¶
type TvProgram struct { ProgramId string // "programId": "0_31_13105_42559", ProgramName string // "programName": "Keno ja Synttärit", Description string // "description": "Illan Keno-arvonnan [..] visailuohjelma. (2')", StartTime string // "startTime": "2018,04,03,17,58,00" EndTime string // "endTime": "2018,04,03,18,00,00", LocalStartTime string // "localStartTime": "2018,04,03,20,58,00", LocalEndTime string // "localEndTime": "2018,04,03,21,00,00", DSTStartTime string // "DSTStartTime": "2018,04,03,20,58,00", DSTEndTime string // "DSTEndTime": "2018,04,03,21,00,00", SignalChannelId string // "signalChannelId": "31_13105_0", Duration int // "duration": 120, IsPresent bool // "isPresent": false, Rating []TvProgramRating // "rating": [ }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.