pairing

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationRequest

type ConfigurationRequest struct {
	Encoding   OptionEncoding `json:"encoding"`
	ClientRole int            `json:"client_role"`
}

type Message

type Message struct {
	ProtocolVersion int         `json:"protocol_version"`
	Payload         interface{} `json:"payload"`
	Type            int         `json:"type"`
	Status          int         `json:"status"`
}

type OptionEncoding

type OptionEncoding struct {
	SymbolLength int `json:"symbol_length"`
	Type         int `json:"type"`
}

type OptionsRequest

type OptionsRequest struct {
	OutputEncodings []OptionEncoding `json:"output_encodings"`
	InputEncodings  []OptionEncoding `json:"input_encodings"`
	PreferredRole   int              `json:"preferred_role"`
}

type Pairing

type Pairing struct {
	Buffer       []byte
	Connection   *tls.Conn
	Certificates *tls.Certificate
	Address      string
	Port         int
}

func New

func New(addr string, port int, certs *tls.Certificate) Pairing

Create a new pairing object with the ip and port of the android tv device and a certificate

func (*Pairing) Connect

func (p *Pairing) Connect() error

Connect to the android tv device and start the pairing process

func (*Pairing) Secret

func (p *Pairing) Secret(code string) error

Send the secret to the android tv device and finish the pairing process

type PariringRequest

type PariringRequest struct {
	ServiceName string `json:"service_name"`
	ClientName  string `json:"client_name"`
}

type SecretRequest

type SecretRequest struct {
	Secret string `json:"secret"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL