notification

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 19 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(cfg config.NotificationPluginConfig, bus *events.Bus, tlsConfig *tls.Config, logger *zap.Logger) *NotificationPlugin

NewNotificationPlugin creates a NotificationPlugin. tlsConfig is used to fetch notification icon payloads over the KDE Connect side-channel; pass nil to disable icon fetching.

func (*NotificationPlugin) Close added in v1.0.5

func (p *NotificationPlugin) Close()

Close removes the icon temp directory. Call when the plugin is no longer needed.

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

func (*NotificationPlugin) Name

func (p *NotificationPlugin) Name() string

func (*NotificationPlugin) OnConnect

func (p *NotificationPlugin) OnConnect(_ device.Sender)

func (*NotificationPlugin) OnDisconnect

func (p *NotificationPlugin) OnDisconnect(_ device.Sender)

func (*NotificationPlugin) OutgoingTypes

func (p *NotificationPlugin) OutgoingTypes() []string

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) SetFilters added in v1.0.5

func (p *NotificationPlugin) SetFilters(f config.NotificationConfig)

SetFilters atomically replaces the per-app notification filter map.

func (*NotificationPlugin) Timeout

func (p *NotificationPlugin) Timeout() time.Duration

Jump to

Keyboard shortcuts

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