device

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	// contains filtered or unexported fields
}

func NewDevice

func NewDevice(uuid, deviceName string, deviceType xproto.Device, log zerolog.Logger, u *user.User) *Device

func (*Device) DialIMServer

func (d *Device) DialIMServer(appId, server string, ext []byte) error

func (*Device) DialIMServerWithDeviceInfo

func (d *Device) DialIMServerWithDeviceInfo(appId, server string) error

func (*Device) GetUser

func (d *Device) GetUser() *user.User

func (*Device) SendMsg

func (d *Device) SendMsg(channelType string, target, text string)

func (*Device) SetOnReceive

func (d *Device) SetOnReceive(rev OnReceiveHandler)

func (*Device) TurnOff

func (d *Device) TurnOff() error

func (*Device) TurnOn

func (d *Device) TurnOn() error

type OnReceiveHandler

type OnReceiveHandler func(c *net.IMConn, proto *comet.Proto) error

Jump to

Keyboard shortcuts

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