homekit

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProxyHandler added in v1.7.0

func ProxyHandler(pair ServerPair, dial func() (net.Conn, error)) hap.HandlerFunc

func ServerHandler added in v1.7.0

func ServerHandler(server Server) hap.HandlerFunc

Types

type Client

type Client struct {
	core.SuperProducer
	// contains filtered or unexported fields
}

func Dial added in v1.7.0

func Dial(rawURL string, server *srtp.Server) (*Client, error)

func (*Client) Conn added in v1.7.0

func (c *Client) Conn() net.Conn

func (*Client) GetMedias

func (c *Client) GetMedias() []*core.Media

func (*Client) Start

func (c *Client) Start() error

func (*Client) Stop

func (c *Client) Stop() error

type Consumer added in v1.7.0

type Consumer struct {
	core.SuperConsumer
	// contains filtered or unexported fields
}

func NewConsumer added in v1.7.0

func NewConsumer(conn net.Conn, server *srtp.Server) *Consumer

func (*Consumer) AddTrack added in v1.7.0

func (c *Consumer) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error

func (*Consumer) GetAnswer added in v1.7.0

func (c *Consumer) GetAnswer() *camera.SetupEndpoints

func (*Consumer) SetConfig added in v1.7.0

func (c *Consumer) SetConfig(conf *camera.SelectedStreamConfig) bool

func (*Consumer) SetOffer added in v1.7.0

func (c *Consumer) SetOffer(offer *camera.SetupEndpoints)

func (*Consumer) Stop added in v1.7.0

func (c *Consumer) Stop() error

func (*Consumer) WriteTo added in v1.7.0

func (c *Consumer) WriteTo(io.Writer) (int64, error)

type Server added in v1.7.0

type Server interface {
	ServerPair
	ServerAccessory
}

type ServerAccessory added in v1.7.0

type ServerAccessory interface {
	GetAccessories(conn net.Conn) []*hap.Accessory
	GetCharacteristic(conn net.Conn, aid uint8, iid uint64) any
	SetCharacteristic(conn net.Conn, aid uint8, iid uint64, value any)
	GetImage(conn net.Conn, width, height int) []byte
}

type ServerPair added in v1.7.0

type ServerPair interface {
	GetPair(conn net.Conn, id string) []byte
	AddPair(conn net.Conn, id string, public []byte, permissions byte)
	DelPair(conn net.Conn, id string)
}

Jump to

Keyboard shortcuts

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