Documentation
¶
Index ¶
- type NotificationBody
- type NotificationPlugin
- func (p *NotificationPlugin) Handle(ctx context.Context, dev device.Sender, pkt *protocol.Packet) error
- func (p *NotificationPlugin) IncomingTypes() []string
- func (p *NotificationPlugin) Name() string
- func (p *NotificationPlugin) OnConnect(dev device.Sender)
- func (p *NotificationPlugin) OnDisconnect(dev device.Sender)
- func (p *NotificationPlugin) OutgoingTypes() []string
- func (p *NotificationPlugin) RequestReply(dev device.Sender, replyId, message string) error
- func (p *NotificationPlugin) Timeout() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationBody ¶
type NotificationBody struct {
ID string `json:"id"`
AppName string `json:"appName"`
Title string `json:"title"`
Text string `json:"text"`
IsCancel bool `json:"isCancel,omitempty"`
Silent bool `json:"silent,omitempty"`
RequestReplyId string `json:"requestReplyId,omitempty"`
}
NotificationBody represents the fields of a notification packet.
type NotificationPlugin ¶
type NotificationPlugin struct {
// contains filtered or unexported fields
}
NotificationPlugin handles incoming notifications and displays them on the desktop.
func NewNotificationPlugin ¶
func NewNotificationPlugin(bus *events.Bus) *NotificationPlugin
func (*NotificationPlugin) Handle ¶
func (p *NotificationPlugin) Handle(ctx context.Context, dev device.Sender, pkt *protocol.Packet) error
Handle processes an incoming notification.
func (*NotificationPlugin) IncomingTypes ¶
func (p *NotificationPlugin) IncomingTypes() []string
IncomingTypes returns the packet types this plugin handles.
func (*NotificationPlugin) Name ¶
func (p *NotificationPlugin) Name() string
Name returns the plugin name.
func (*NotificationPlugin) OnConnect ¶
func (p *NotificationPlugin) OnConnect(dev device.Sender)
func (*NotificationPlugin) OnDisconnect ¶
func (p *NotificationPlugin) OnDisconnect(dev device.Sender)
func (*NotificationPlugin) OutgoingTypes ¶
func (p *NotificationPlugin) OutgoingTypes() []string
OutgoingTypes returns the packet types this plugin may send.
func (*NotificationPlugin) RequestReply ¶
func (p *NotificationPlugin) RequestReply(dev device.Sender, replyId, message string) error
RequestReply sends a reply back to an Android notification.
func (*NotificationPlugin) Timeout ¶
func (p *NotificationPlugin) Timeout() time.Duration
Timeout returns the timeout.
Click to show internal directories.
Click to hide internal directories.