roku

package
v0.0.0-...-a433f6e Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotRoku = errors.New("SSPD ST header is not roku:ecp")
)

Functions

func SSDP

func SSDP(ctx context.Context, cb func(*Device) error) error

Types

type App

type App struct {
	Name    string `xml:",innerxml"`
	ID      string `xml:"id,attr"`
	Version string `xml:"version,attr"`
}

type Device

type Device struct {
	Location          *url.URL
	USN               string
	DeviceGroup       string
	BroadcastInterval time.Duration
	Apps              []App
	AppNames          []string
}

func (*Device) ActiveApp

func (rd *Device) ActiveApp(ctx context.Context) (App, error)

func (*Device) FindApp

func (rd *Device) FindApp(name string) *App

func (*Device) Home

func (rd *Device) Home(ctx context.Context) error

func (*Device) Launch

func (rd *Device) Launch(ctx context.Context, id string) error

func (*Device) LaunchByName

func (rd *Device) LaunchByName(ctx context.Context, name string) error

func (*Device) QueryApps

func (rd *Device) QueryApps(ctx context.Context) ([]App, error)

func (*Device) SetApps

func (rd *Device) SetApps(apps []App)

type ErrApplicationNotFound

type ErrApplicationNotFound string

func (ErrApplicationNotFound) Error

func (e ErrApplicationNotFound) Error() string

Jump to

Keyboard shortcuts

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