notifications

package
v0.0.0-...-b2761b6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2014 License: GPL-3.0, GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package notifications wraps a couple of Notifications's DBus API points: the org.freedesktop.Notifications.Notify call, and listening for the ActionInvoked signal.

Index

Constants

This section is empty.

Variables

View Source
var BusAddress bus.Address = bus.Address{
	Interface: "org.freedesktop.Notifications",
	Path:      "/org/freedesktop/Notifications",
	Name:      "org.freedesktop.Notifications",
}

Notifications lives on a well-knwon bus.Address

Functions

This section is empty.

Types

type RawActionReply

type RawActionReply struct {
	NotificationId uint32
	ActionId       string
}

convenience type for the (uint32, string) ActionInvoked signal data

type RawNotifications

type RawNotifications struct {
	// contains filtered or unexported fields
}

a raw notification provides a low-level interface to the f.d.o. dbus notifications api

func Raw

func Raw(endp bus.Endpoint, log logger.Logger) *RawNotifications

Raw returns a new RawNotifications that'll use the provided bus.Endpoint

func (*RawNotifications) Notify

func (raw *RawNotifications) Notify(
	app_name string, reuse_id uint32,
	icon, summary, body string,
	actions []string, hints map[string]*dbus.Variant,
	timeout int32) (uint32, error)

Notify fires a notification

func (*RawNotifications) WatchActions

func (raw *RawNotifications) WatchActions() (<-chan RawActionReply, error)

WatchActions listens for ActionInvoked signals from the notification daemon and sends them over the channel provided

Jump to

Keyboard shortcuts

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