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_version The returned specification version supported.
Returns:
TRUE if the call succeeded, or FALSE if there were errors.
notify_get_server_info: : The resulting server name. : The resulting server vendor. : The resulting server version. : The resulting version of the specification the server is compliant with.

Queries the server for its information, specifically, the name, vendor, server version, and the version of the notifications specification that it is compliant with.

Returns: TRUE if successful, and the variables passed will be set. FALSE on failure.

Definition at line 220 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