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

gboolean notify_get_server_info ( char **  ret_name,
char **  ret_vendor,
char **  ret_version,
char **  ret_spec_version 
)

Returns the server notification information.

The strings returned must be freed.

Parameters:
ret_name The returned product name of the server.
ret_vendor The returned vendor.
ret_version The returned server version.
ret_spec_ver The returned specification version supported.
Returns:
TRUE if the call succeeded, or FALSE if there were errors.

Definition at line 168 of file notify.c.

{
      GError *error = NULL;
      DBusGProxy *proxy = _notify_get_g_proxy();
      char *name, *vendor, *version, *spec_version;

      g_return_val_if_fail(proxy != NULL, FALSE);

      if (!dbus_g_proxy_call(proxy, "GetServerInformation", &error,
                                       G_TYPE_INVALID,
                                       G_TYPE_STRING, &name,
                                       G_TYPE_STRING, &vendor,
                                       G_TYPE_STRING, &version,
                                       G_TYPE_STRING, &spec_version,
                                       G_TYPE_INVALID))
      {
            g_message("GetServerInformation call failed: %s", error->message);
            return FALSE;
      }

      if (ret_name != NULL)
            *ret_name = name;

      if (ret_vendor != NULL)
            *ret_vendor = vendor;

      if (ret_version != NULL)
            *ret_version = version;

      if (spec_version != NULL)
            *ret_spec_version = spec_version;

      return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index