DBusGError

DBusGError — DBus GError

Stability Level

Stable, unless otherwise indicated

Synopsis




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);

Description

DBusGError is the GError used by DBus.

Details

enum DBusGError

typedef enum
{
DBUS_GERROR_FAILED,
DBUS_GERROR_NO_MEMORY,
DBUS_GERROR_SERVICE_UNKNOWN,
DBUS_GERROR_NAME_HAS_NO_OWNER,
DBUS_GERROR_NO_REPLY,
DBUS_GERROR_IO_ERROR,
DBUS_GERROR_BAD_ADDRESS,
DBUS_GERROR_NOT_SUPPORTED,
DBUS_GERROR_LIMITS_EXCEEDED,
DBUS_GERROR_ACCESS_DENIED,
DBUS_GERROR_AUTH_FAILED,
DBUS_GERROR_NO_SERVER,
DBUS_GERROR_TIMEOUT,
DBUS_GERROR_NO_NETWORK,
DBUS_GERROR_ADDRESS_IN_USE,
DBUS_GERROR_DISCONNECTED,
DBUS_GERROR_INVALID_ARGS,
DBUS_GERROR_FILE_NOT_FOUND,
DBUS_GERROR_FILE_EXISTS,
DBUS_GERROR_UNKNOWN_METHOD,
DBUS_GERROR_TIMED_OUT,
DBUS_GERROR_MATCH_RULE_NOT_FOUND,
DBUS_GERROR_MATCH_RULE_INVALID,
DBUS_GERROR_SPAWN_EXEC_FAILED,
DBUS_GERROR_SPAWN_FORK_FAILED,
DBUS_GERROR_SPAWN_CHILD_EXITED,
DBUS_GERROR_SPAWN_CHILD_SIGNALED,
DBUS_GERROR_SPAWN_FAILED,
DBUS_GERROR_UNIX_PROCESS_ID_UNKNOWN,
DBUS_GERROR_INVALID_SIGNATURE,
DBUS_GERROR_INVALID_FILE_CONTENT,
DBUS_GERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN,
DBUS_GERROR_REMOTE_EXCEPTION
} DBusGError;


dbus_g_error_has_name ()

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

dbus_g_error_get_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.

dbus_g_error_quark ()

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

dbus_g_error_domain_register ()

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

See Also

GError