public final class GalagoNotification
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static long |
dbus_bus_get_session()
Connects to the DBUS_BUS_SESSION D-Bus bus daemon and registers
with it.
|
static void |
dbus_connection_unref(long connection)
Decrements the reference count of the specified DBusConnection
and finalizes it if the count reaches zero.
|
static java.lang.String[] |
getCapabilities(long connection)
Invokes org.freedesktop.Notifications.GetCapabilities through
the specified DBusConnection in order to retrieve the optional
capabilities supported by the freedesktop.org Desktop Notifications
server.
|
static long |
notify(long connection,
java.lang.String appName,
long replacesId,
java.awt.image.BufferedImage icon,
java.lang.String summary,
java.lang.String body,
int expireTimeout)
Invokes org.freedesktop.Notifications.Notify through the
specified DBusConnection in order to send a notification to the
freedesktop.org Desktop Notifications server.
|
public static long dbus_bus_get_session() throws DBusException
DBusException
- if connecting to and registering with the
DBUS_BUS_SESSION D-Bus bus daemon failspublic static void dbus_connection_unref(long connection)
connection
- the DBusConnection to decrement the reference
count ofpublic static java.lang.String[] getCapabilities(long connection) throws DBusException
connection
- the DBusConnection with the freedesktop.org
Desktop Notifications serverDBusException
- if retrieving the optional capabilities of the
freedesktop.org Desktop Notifications server failspublic static long notify(long connection, java.lang.String appName, long replacesId, java.awt.image.BufferedImage icon, java.lang.String summary, java.lang.String body, int expireTimeout) throws DBusException
connection
- the DBusConnection with the freedesktop.org
Desktop Notifications serverappName
- the optional name of the application sending the
notificationreplacesId
- the optional notification identifier of an existing
notification to be replaced by the notification being sent; 0 to
not replace any existing notificationicon
- the optional icon to be displayed by the notification if the
server supports such display. Not supported by this implementation at
this time.summary
- the summary text briefly describing the notificationbody
- the optional detailed body text of the notificationexpireTimeout
- the time in milliseconds since the display of the
notification after which the notification should automatically close. If
-1, the notification's expiration time is dependent on the
notification server's settings. If 0, never expires.DBusException
- if sending the notification to the freedesktop.org
Desktop Notifications server fails
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.