Documentation
¶
Index ¶
- type NotificationBody
- type NotificationPlugin
- func (p *NotificationPlugin) Close()
- 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(_ device.Sender)
- func (p *NotificationPlugin) OnDisconnect(_ device.Sender)
- func (p *NotificationPlugin) OutgoingTypes() []string
- func (p *NotificationPlugin) RequestReply(dev device.Sender, replyID, message string) error
- func (p *NotificationPlugin) SetFilters(f config.NotificationConfig)
- 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(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
Click to show internal directories.
Click to hide internal directories.