![]() |
![]() |
![]() |
D-Bus GLib bindings - Reference Manual | ![]() |
---|---|---|---|---|
enum DBusGError; gboolean dbus_g_error_has_name (GError *error, const char *name); const char* dbus_g_error_get_name (GError *error); GQuark dbus_g_error_quark (void); void dbus_g_error_domain_register (GQuark domain, const char *default_iface, GType code_enum);
gboolean dbus_g_error_has_name (GError *error, const char *name);
Determine whether D-BUS error name for a remote exception matches the given name. This function is intended to be invoked on a GError returned from an invocation of a remote method, e.g. via dbus_g_proxy_end_call. It will silently return FALSE for errors which are not remote D-BUS exceptions (i.e. with a domain other than DBUS_GERROR or a code other than DBUS_GERROR_REMOTE_EXCEPTION).
error : |
the GError given from the remote method |
name : |
the D-BUS error name |
Returns : | TRUE iff the remote error has the given name |
const char* dbus_g_error_get_name (GError *error);
This function may only be invoked on a GError returned from an invocation of a remote method, e.g. via dbus_g_proxy_end_call. Moreover, you must ensure that the error's domain is DBUS_GERROR, and the code is DBUS_GERROR_REMOTE_EXCEPTION.
error : |
the GError given from the remote method |
Returns : | the D-BUS name for a remote exception. |
GQuark dbus_g_error_quark (void);
The implementation of DBUS_GERROR error domain. See documentation for GError in GLib reference manual.
Returns : | the error domain quark for use with GError |
void dbus_g_error_domain_register (GQuark domain, const char *default_iface, GType code_enum);
Register a GError domain and set of codes with D-BUS. You must have created a GEnum for the error codes. This function will not be needed with an introspection-capable GLib.
domain : |
the GError domain |
default_iface : |
the D-BUS interface used for error values by default, or NULL |
code_enum : |
a GType for a GEnum of the error codes |