homekit

package
v0.0.0-...-c3ad350 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProxyHandler

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

func ServerHandler

func ServerHandler(server Server) hap.HandlerFunc

Types

type Client deprecated

type Client struct {
	core.Connection

	Bitrate int // in bits/s
	// contains filtered or unexported fields
}

Deprecated: rename to Producer

func Dial

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

func (*Client) Conn

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

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

func NewConsumer

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

func (*Consumer) AddTrack

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

func (*Consumer) GetAnswer

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

func (*Consumer) SetConfig

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

func (*Consumer) SetOffer

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

func (*Consumer) Stop

func (c *Consumer) Stop() error

func (*Consumer) WriteTo

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

type Server

type Server interface {
	ServerPair
	ServerAccessory
}

type ServerAccessory

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

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