Documentation ¶
Index ¶
- Variables
- func GetKeyCodeList() (list []string)
- type SmartDeviceDescription
- type SmartViewSession
- func (s *SmartViewSession) Close()
- func (s *SmartViewSession) DeviceDescription() (SmartDeviceDescription, error)
- func (s *SmartViewSession) GetMessage(block bool) string
- func (s *SmartViewSession) InitSession() error
- func (s *SmartViewSession) Key(key string) error
- func (s *SmartViewSession) Pair(pin int) (string, int, string, error)
- func (s *SmartViewSession) RestoreSessionData(sessionKey []byte, sessionID int, uuid string)
Constants ¶
This section is empty.
Variables ¶
var SamsungKeyList = []string{}/* 244 elements not displayed */
SamsungKeyList is a list of known Samsung key identifiers
Functions ¶
func GetKeyCodeList ¶
func GetKeyCodeList() (list []string)
GetKeyCodeList returns a list of key codes
Types ¶
type SmartDeviceDescription ¶
type SmartDeviceDescription struct { DUID string Model string ModelName string ModelDescription string NetworkType string SSID string IP string FirmwareVersion string DeviceName string DeviceID string UDN string Resolution string CountryCode string SmartHubAgreement string ServiceURI string DialURI string Capabilities []struct { Name string Port string Location string } }
SmartDeviceDescription contains a TV device description
type SmartViewSession ¶
type SmartViewSession struct {
// contains filtered or unexported fields
}
SmartViewSession contains data for a Smart View session
func NewSmartViewSession ¶
func NewSmartViewSession(tvAddress string) (*SmartViewSession, error)
NewSmartViewSession initializes en new SmartViewSession
func (*SmartViewSession) Close ¶
func (s *SmartViewSession) Close()
Close terminates the websocket connection
func (*SmartViewSession) DeviceDescription ¶
func (s *SmartViewSession) DeviceDescription() (SmartDeviceDescription, error)
DeviceDescription fetches the description from the TV device
func (*SmartViewSession) GetMessage ¶
func (s *SmartViewSession) GetMessage(block bool) string
GetMessage returns the next message received from the device If block is true, the read will block for 5 seconds.
func (*SmartViewSession) InitSession ¶
func (s *SmartViewSession) InitSession() error
InitSession initiates a websocket connection for the SmartViewSession
func (*SmartViewSession) Key ¶
func (s *SmartViewSession) Key(key string) error
Key sends a key to the TV device
func (*SmartViewSession) Pair ¶
Pair handles pairing with the TV device If the pin is 0, the PIN popup is requested. It returns (deviceid, sessionid, key, error).
func (*SmartViewSession) RestoreSessionData ¶
func (s *SmartViewSession) RestoreSessionData(sessionKey []byte, sessionID int, uuid string)
RestoreSessionData sets SmartViewSession key, ID and UUID values