Logo Search packages:      
Sourcecode: libnotify version File versions  Download package

void notify_notification_set_hint_byte_array ( NotifyNotification *  notification,
const gchar *  key,
const guchar *  value,
gsize  len 
)

notify_notification_set_hint_byte_array: : The notification. : The hint. : The hint's value. : The length of the byte array.

Sets a hint with a byte array value. The length of must be passed as .

Definition at line 1061 of file notification.c.

{
      GValue *hint_value;
      GArray *byte_array;

      g_return_if_fail(notification != NULL);
      g_return_if_fail(NOTIFY_IS_NOTIFICATION(notification));
      g_return_if_fail(key != NULL && *key != '\0');
      g_return_if_fail(value != NULL);
      g_return_if_fail(len > 0);

      byte_array = g_array_sized_new(FALSE, FALSE, sizeof(guchar), len);
      byte_array = g_array_append_vals(byte_array, value, len);

      hint_value = g_new0(GValue, 1);
      g_value_init(hint_value, dbus_g_type_get_collection("GArray",
                                                                                    G_TYPE_UCHAR));
      g_value_set_boxed_take_ownership(hint_value, byte_array);

      g_hash_table_insert(notification->priv->hints,
                                    g_strdup(key), hint_value);
}


Generated by  Doxygen 1.6.0   Back to index