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

GList* notify_get_server_caps ( void   ) 

Returns the capabilities of the notification server.

Returns:
A list of capability strings. These strings must be freed.

Definition at line 139 of file notify.c.

{
      GError *error = NULL;
      char **caps = NULL, **cap;
      GList *result = NULL;
      DBusGProxy *proxy = _notify_get_g_proxy();

      g_return_val_if_fail(proxy != NULL, NULL);

      if (!dbus_g_proxy_call(proxy, "GetCapabilities", &error,
                                       G_TYPE_INVALID,
                                       G_TYPE_STRV, &caps, G_TYPE_INVALID))
      {
            g_message("GetCapabilities call failed: %s", error->message);
            g_error_free(error);
            return NULL;
      }

      for (cap = caps; *cap != NULL; cap++)
      {
            result = g_list_append(result, g_strdup(*cap));
      }

      g_strfreev(caps);

      return result;
}


Generated by  Doxygen 1.6.0   Back to index