HDNotification

HDNotification — A notification received by org.freedesktop.Notifications.Notify.

Synopsis


#include <libhildondesktop/libhildondesktop.h>

                    HDNotification;
HDNotification*     hd_notification_new                 (guint id,
                                                         const gchar *icon,
                                                         const gchar *summary,
                                                         const gchar *body,
                                                         gchar **actions,
                                                         GHashTable *hints,
                                                         gint timeout,
                                                         const gchar *sender);
guint               hd_notification_get_id              (HDNotification *notification);
const gchar*        hd_notification_get_icon            (HDNotification *notification);
const gchar*        hd_notification_get_summary         (HDNotification *notification);
const gchar*        hd_notification_get_body            (HDNotification *notification);
gchar**             hd_notification_get_actions         (HDNotification *notification);
GValue*             hd_notification_get_hint            (HDNotification *notification,
                                                         const gchar *key);
const gchar*        hd_notification_get_sender          (HDNotification *notification);
const gchar*        hd_notification_get_category        (HDNotification *notification);
const gchar*        hd_notification_get_dbus_cb         (HDNotification *notification,
                                                         const gchar *action_id);
guint               hd_notification_get_dialog_type     (HDNotification *notification);
gboolean            hd_notification_get_persistent      (HDNotification *notification);
time_t              hd_notification_get_time            (HDNotification *notification);
void                hd_notification_closed              (HDNotification *notification);
void                hd_notification_updated             (HDNotification *notification);

Object Hierarchy

  GObject
   +----HDNotification

Properties

  "actions"                  GStrv*                : Read / Write
  "body"                     gchar*                : Read / Write
  "hints"                    gpointer              : Read / Write
  "icon"                     gchar*                : Read / Write
  "id"                       guint                 : Read / Write / Construct Only
  "sender"                   gchar*                : Read / Write
  "summary"                  gchar*                : Read / Write
  "timeout"                  gint                  : Read / Write

Signals

  "closed"                                         : Run Last
  "updated"                                        : Run Last

Description

A notification received by org.freedesktop.Notifications.Notify.

Details

HDNotification

typedef struct _HDNotification HDNotification;


hd_notification_new ()

HDNotification*     hd_notification_new                 (guint id,
                                                         const gchar *icon,
                                                         const gchar *summary,
                                                         const gchar *body,
                                                         gchar **actions,
                                                         GHashTable *hints,
                                                         gint timeout,
                                                         const gchar *sender);

Create a new HDNotification.

id : unique ID of the notification
icon : icon name of the notification
summary : summary of the notification
body : body of the notification
actions : an array of action definitions
hints : a table of string->GValue mappings
timeout : a timeout for the notification
sender : the creator of the notification
Returns : a new HDNotification.

hd_notification_get_id ()

guint               hd_notification_get_id              (HDNotification *notification);

Returns the ID of notification.

notification : a HDNotification.
Returns : the ID.

hd_notification_get_icon ()

const gchar*        hd_notification_get_icon            (HDNotification *notification);

Returns the icon name of notification

notification : a HDNotification
Returns : the icon name. Must not be freed.

hd_notification_get_summary ()

const gchar*        hd_notification_get_summary         (HDNotification *notification);

Returns the summary of notification

notification : a HDNotification
Returns : the summary. Must not be freed.

hd_notification_get_body ()

const gchar*        hd_notification_get_body            (HDNotification *notification);

Returns the body of notification

notification : a HDNotification
Returns : the body. Must not be freed.

hd_notification_get_actions ()

gchar**             hd_notification_get_actions         (HDNotification *notification);

Returns an array of actions of notification

notification : a HDNotification
Returns : an array of actions. Must not be freed.

hd_notification_get_hint ()

GValue*             hd_notification_get_hint            (HDNotification *notification,
                                                         const gchar *key);

Returns a value of hint key of notification

notification : a HDNotification
key : the key of a hint
Returns : a GValue. Must not be freed.

hd_notification_get_sender ()

const gchar*        hd_notification_get_sender          (HDNotification *notification);

Returns the D-Bus sender of notification

notification : a HDNotification
Returns : the name of the sender. Must not be freed.

hd_notification_get_category ()

const gchar*        hd_notification_get_category        (HDNotification *notification);

Returns the catgeory hint of notification

notification : a HDNotification
Returns : the category hint. Must not be freed.

hd_notification_get_dbus_cb ()

const gchar*        hd_notification_get_dbus_cb         (HDNotification *notification,
                                                         const gchar *action_id);

Returns the dbus-callback hint for action_id of notification

notification : a HDNotification
action_id : the id of an action
Returns : the dbus-callback hint for action_id. Must not be freed.

hd_notification_get_dialog_type ()

guint               hd_notification_get_dialog_type     (HDNotification *notification);

Returns the dialog-type hint of notification

notification : a HDNotification
Returns : the dialog-type hint.

hd_notification_get_persistent ()

gboolean            hd_notification_get_persistent      (HDNotification *notification);

Returns the persistent hint of notification

notification : a HDNotification
Returns : the persistent hint.

hd_notification_get_time ()

time_t              hd_notification_get_time            (HDNotification *notification);

Returns the time hint of notification

notification : a HDNotification
Returns : the time hint.

hd_notification_closed ()

void                hd_notification_closed              (HDNotification *notification);

Emits the "closed" signal on notification.

notification : a HDNotification

hd_notification_updated ()

void                hd_notification_updated             (HDNotification *notification);

Emits the "updated" signal on notification.

notification : a HDNotification

Property Details

The "actions" property

  "actions"                  GStrv*                : Read / Write

Array of actions of the notification.


The "body" property

  "body"                     gchar*                : Read / Write

Body text of the notification.

Default value: NULL


The "hints" property

  "hints"                    gpointer              : Read / Write

Table of hints of the notification.


The "icon" property

  "icon"                     gchar*                : Read / Write

The icon-name of the notification.

Default value: NULL


The "id" property

  "id"                       guint                 : Read / Write / Construct Only

The ID of the notification.

Default value: 0


The "sender" property

  "sender"                   gchar*                : Read / Write

The sender of the notification.

Default value: NULL


The "summary" property

  "summary"                  gchar*                : Read / Write

Summary text of the notification.

Default value: NULL


The "timeout" property

  "timeout"                  gint                  : Read / Write

Timeout FIXME.

Default value: 0

Signal Details

The "closed" signal

void                user_function                      (HDNotification *hdnotification,
                                                        gpointer        user_data)           : Run Last

hdnotification : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "updated" signal

void                user_function                      (HDNotification *hdnotification,
                                                        gpointer        user_data)           : Run Last

hdnotification : the object which received the signal.
user_data : user data set when the signal handler was connected.