MCPcopy Create free account
hub / github.com/PacktPublishing/System-Programming-Essentials-with-Go / Notification

Struct Notification

appendix-a/usb/main.go:19–28  ·  view source on GitHub ↗

When the usb device is detected we are take an action in this example we are organizing the files in the usb and send a signal to be listened by the notification daemon

Source from the content-addressed store, hash-verified

17// and send a signal to be listened by the notification daemon
18
19type Notification struct {
20 AppName string
21 ReplacesID uint32
22 AppIcon string
23 Summary string
24 Body string
25 Actions []string
26 Hints map[string]dbus.Variant
27 ExpireTimeout int32
28}
29
30func NewDefaultNotification(deviceName string) Notification {
31 hints := map[string]dbus.Variant{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected