Function

EDataServerClientutil_unwrap_dbus_error

deprecated: 3.8 since: 3.2

Declaration [src]

gboolean
e_client_util_unwrap_dbus_error (
  GError* dbus_error,
  GError** client_error,
  const EClientErrorsList* known_errors,
  guint known_errors_count,
  GQuark known_errors_domain,
  gboolean fail_when_none_matched
)

Description [src]

The function takes a dbus_error and tries to find a match in known_errors for it, if it is a G_IO_ERROR, G_IO_ERROR_DBUS_ERROR. If it is anything else then the dbus_error is moved to client_error.

The fail_when_none_matched influences behaviour. If it’s TRUE, and none of known_errors matches, or this is not a G_IO_ERROR_DBUS_ERROR, then FALSE is returned and the client_error is left without change. Otherwise, the fail_when_none_matched is FALSE, the error is always processed and will result in E_CLIENT_ERROR, E_CLIENT_ERROR_OTHER_ERROR if none of known_error matches.

Available since: 3.2

Deprecated since: 3.8

This function is no longer used.

Parameters

dbus_error

Type: GError

DBus GError to unwrap.

The data is owned by the caller of the function.
client_error

Type: GError

Resulting GError; can be NULL.

The argument will be set by the function.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.
known_errors

Type: EClientErrorsList

List of known errors against which try to match.

The data is owned by the caller of the function.
known_errors_count

Type: guint

How many items are stored in known_errors.

known_errors_domain

Type: GQuark

Error domain for known_errors.

fail_when_none_matched

Type: gboolean

Whether to fail when none of known_errors matches.

Return value

Type: gboolean

Whether was dbus_error processed into client_error.

Note: The dbus_error is automatically freed if returned TRUE.