notification

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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