Blame docs/reference/gio/html/gio-GDBusError.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>GDBusError: GIO Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GIO Reference Manual">
Packit ae235b
<link rel="up" href="gdbus-lowlevel.html" title="Low-level D-Bus Support">
Packit ae235b
<link rel="prev" href="gio-D-Bus-Introspection-Data.html" title="D-Bus Introspection Data">
Packit ae235b
<link rel="next" href="GDBusMessage.html" title="GDBusMessage">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

GDBusError

Packit ae235b

GDBusError — Mapping D-Bus errors to and from GError

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_is_remote_error ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_get_remote_error ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_strip_remote_error ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_register_error_domain ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_register_error ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gboolean
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_unregister_error ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
GError *
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_new_for_dbus_error ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_set_dbus_error ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
void
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_set_dbus_error_valist ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
gchar *
Packit ae235b
Packit ae235b
Packit ae235b
g_dbus_error_encode_gerror ()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
enum
Packit ae235b
GDBusError
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_DBUS_ERROR
Packit ae235b
Packit ae235b
Packit ae235b
 
Packit ae235b
GDBusErrorEntry
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <gio/gio.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

All facilities that return errors from remote methods (such as

Packit ae235b
g_dbus_connection_call_sync()) use GError to represent both D-Bus
Packit ae235b
errors (e.g. errors returned from the other peer) and locally
Packit ae235b
in-process generated errors.

Packit ae235b

To check if a returned GError is an error from a remote peer, use

Packit ae235b
g_dbus_error_is_remote_error(). To get the actual D-Bus error name,
Packit ae235b
use g_dbus_error_get_remote_error(). Before presenting an error,
Packit ae235b
always use g_dbus_error_strip_remote_error().

Packit ae235b

In addition, facilities used to return errors to a remote peer also

Packit ae235b
use GError. See g_dbus_method_invocation_return_error() for
Packit ae235b
discussion about how the D-Bus error name is set.

Packit ae235b

Applications can associate a GError error domain with a set of D-Bus errors in order to

Packit ae235b
automatically map from D-Bus errors to GError and back. This
Packit ae235b
is typically done in the function returning the GQuark for the
Packit ae235b
error domain:

Packit ae235b
Packit ae235b
  
Packit ae235b
    
Packit ae235b
      
Packit ae235b
        
1
Packit ae235b
2
Packit ae235b
3
Packit ae235b
4
Packit ae235b
5
Packit ae235b
6
Packit ae235b
7
Packit ae235b
8
Packit ae235b
9
Packit ae235b
10
Packit ae235b
11
Packit ae235b
12
Packit ae235b
13
Packit ae235b
14
Packit ae235b
15
Packit ae235b
16
Packit ae235b
17
Packit ae235b
18
Packit ae235b
19
Packit ae235b
20
Packit ae235b
21
Packit ae235b
22
Packit ae235b
23
Packit ae235b
24
Packit ae235b
25
Packit ae235b
26
Packit ae235b
27
Packit ae235b
28
Packit ae235b
29
Packit ae235b
30
Packit ae235b
31
Packit ae235b
32
Packit ae235b
33
Packit ae235b
34
Packit ae235b
35
Packit ae235b
        
// foo-bar-error.h:
Packit ae235b
Packit ae235b
#define FOO_BAR_ERROR (foo_bar_error_quark ())
Packit ae235b
GQuark foo_bar_error_quark (void);
Packit ae235b
Packit ae235b
typedef enum
Packit ae235b
{
Packit ae235b
  FOO_BAR_ERROR_FAILED,
Packit ae235b
  FOO_BAR_ERROR_ANOTHER_ERROR,
Packit ae235b
  FOO_BAR_ERROR_SOME_THIRD_ERROR,
Packit ae235b
  FOO_BAR_N_ERRORS / *< skip >* /
Packit ae235b
} FooBarError;
Packit ae235b
Packit ae235b
// foo-bar-error.c:
Packit ae235b
Packit ae235b
static const GDBusErrorEntry foo_bar_error_entries[] =
Packit ae235b
{
Packit ae235b
  {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
Packit ae235b
  {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
Packit ae235b
  {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
Packit ae235b
};
Packit ae235b
Packit ae235b
// Ensure that every error code has an associated D-Bus error name
Packit ae235b
G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) == FOO_BAR_N_ERRORS);
Packit ae235b
Packit ae235b
GQuark
Packit ae235b
foo_bar_error_quark (void)
Packit ae235b
{
Packit ae235b
  static volatile gsize quark_volatile = 0;
Packit ae235b
  g_dbus_error_register_error_domain ("foo-bar-error-quark",
Packit ae235b
                                      &quark_volatile,
Packit ae235b
                                      foo_bar_error_entries,
Packit ae235b
                                      G_N_ELEMENTS (foo_bar_error_entries));
Packit ae235b
  return (GQuark) quark_volatile;
Packit ae235b
}
Packit ae235b
      
Packit ae235b
    
Packit ae235b
  
Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
With this setup, a D-Bus peer can transparently pass e.g. FOO_BAR_ERROR_ANOTHER_ERROR and
Packit ae235b
other peers will see the D-Bus error name org.project.Foo.Bar.Error.AnotherError.

Packit ae235b

If the other peer is using GDBus, and has registered the association with

Packit ae235b
g_dbus_error_register_error_domain() in advance (e.g. by invoking the FOO_BAR_ERROR quark
Packit ae235b
generation itself in the previous example) the peer will see also FOO_BAR_ERROR_ANOTHER_ERROR instead
Packit ae235b
of G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover
Packit ae235b
org.project.Foo.Bar.Error.AnotherError using g_dbus_error_get_remote_error().

Packit ae235b

Note that the G_DBUS_ERROR error domain is intended only

Packit ae235b
for returning errors from a remote message bus process. Errors
Packit ae235b
generated locally in-process by e.g. GDBusConnection should use the
Packit ae235b
G_IO_ERROR domain.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_dbus_error_is_remote_error ()

Packit ae235b
gboolean
Packit ae235b
g_dbus_error_is_remote_error (const GError *error);
Packit ae235b

Checks if error

Packit ae235b
 represents an error received via D-Bus from a remote peer. If so,
Packit ae235b
use g_dbus_error_get_remote_error() to get the name of the error.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

A GError.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if error

Packit ae235b
represents an error from a remote peer,
Packit ae235b
FALSE otherwise.

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_get_remote_error ()

Packit ae235b
gchar *
Packit ae235b
g_dbus_error_get_remote_error (const GError *error);
Packit ae235b

Gets the D-Bus error name used for error

Packit ae235b
, if any.

Packit ae235b

This function is guaranteed to return a D-Bus error name for all

Packit ae235b
GErrors returned from functions handling remote method calls
Packit ae235b
(e.g. g_dbus_connection_call_finish()) unless
Packit ae235b
g_dbus_error_strip_remote_error() has been used on error
Packit ae235b
.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

a GError

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

an allocated string or NULL if the D-Bus error name

Packit ae235b
could not be found. Free with g_free().

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_strip_remote_error ()

Packit ae235b
gboolean
Packit ae235b
g_dbus_error_strip_remote_error (GError *error);
Packit ae235b

Looks for extra information in the error message used to recover

Packit ae235b
the D-Bus error name and strips it if found. If stripped, the
Packit ae235b
message field in error
Packit ae235b
 will correspond exactly to what was
Packit ae235b
received on the wire.

Packit ae235b

This is typically used when presenting errors to the end user.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

A GError.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if information was stripped, FALSE otherwise.

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_register_error_domain ()

Packit ae235b
void
Packit ae235b
g_dbus_error_register_error_domain (const gchar *error_domain_quark_name,
Packit ae235b
                                    volatile gsize *quark_volatile,
Packit ae235b
                                    const GDBusErrorEntry *entries,
Packit ae235b
                                    guint num_entries);
Packit ae235b

Helper function for associating a GError error domain with D-Bus error names.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error_domain_quark_name

Packit ae235b

The error domain name.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

quark_volatile

Packit ae235b

A pointer where to store the GQuark.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

entries

Packit ae235b

A pointer to num_entries

Packit ae235b
GDBusErrorEntry struct items. 

Packit ae235b
[array length=num_entries]
Packit ae235b
Packit ae235b
Packit ae235b

num_entries

Packit ae235b

Number of items to register.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_register_error ()

Packit ae235b
gboolean
Packit ae235b
g_dbus_error_register_error (GQuark error_domain,
Packit ae235b
                             gint error_code,
Packit ae235b
                             const gchar *dbus_error_name);
Packit ae235b

Creates an association to map between dbus_error_name

Packit ae235b
 and
Packit ae235b
GErrors specified by error_domain
Packit ae235b
 and error_code
Packit ae235b
.

Packit ae235b

This is typically done in the routine that returns the GQuark for

Packit ae235b
an error domain.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error_domain

Packit ae235b

A GQuark for a error domain.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

error_code

Packit ae235b

An error code.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_name

Packit ae235b

A D-Bus error name.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if the association was created, FALSE if it already

Packit ae235b
exists.

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_unregister_error ()

Packit ae235b
gboolean
Packit ae235b
g_dbus_error_unregister_error (GQuark error_domain,
Packit ae235b
                               gint error_code,
Packit ae235b
                               const gchar *dbus_error_name);
Packit ae235b

Destroys an association previously set up with g_dbus_error_register_error().

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error_domain

Packit ae235b

A GQuark for a error domain.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

error_code

Packit ae235b

An error code.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_name

Packit ae235b

A D-Bus error name.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

TRUE if the association was destroyed, FALSE if it wasn't found.

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_new_for_dbus_error ()

Packit ae235b
GError *
Packit ae235b
g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name,
Packit ae235b
                                 const gchar *dbus_error_message);
Packit ae235b

Creates a GError based on the contents of dbus_error_name

Packit ae235b
 and
Packit ae235b
dbus_error_message
Packit ae235b
.

Packit ae235b

Errors registered with g_dbus_error_register_error() will be looked

Packit ae235b
up using dbus_error_name
Packit ae235b
 and if a match is found, the error domain
Packit ae235b
and code is used. Applications can use g_dbus_error_get_remote_error()
Packit ae235b
to recover dbus_error_name
Packit ae235b
.

Packit ae235b

If a match against a registered error is not found and the D-Bus

Packit ae235b
error name is in a form as returned by g_dbus_error_encode_gerror()
Packit ae235b
the error domain and code encoded in the name is used to
Packit ae235b
create the GError. Also, dbus_error_name
Packit ae235b
 is added to the error message
Packit ae235b
such that it can be recovered with g_dbus_error_get_remote_error().

Packit ae235b

Otherwise, a GError with the error code G_IO_ERROR_DBUS_ERROR

Packit ae235b
in the G_IO_ERROR error domain is returned. Also, dbus_error_name
Packit ae235b
 is
Packit ae235b
added to the error message such that it can be recovered with
Packit ae235b
g_dbus_error_get_remote_error().

Packit ae235b

In all three cases, dbus_error_name

Packit ae235b
 can always be recovered from the
Packit ae235b
returned GError using the g_dbus_error_get_remote_error() function
Packit ae235b
(unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).

Packit ae235b

This function is typically only used in object mappings to prepare

Packit ae235b
GError instances for applications. Regular applications should not use
Packit ae235b
it.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_name

Packit ae235b

D-Bus error name.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_message

Packit ae235b

D-Bus error message.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

An allocated GError. Free with g_error_free().

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_set_dbus_error ()

Packit ae235b
void
Packit ae235b
g_dbus_error_set_dbus_error (GError **error,
Packit ae235b
                             const gchar *dbus_error_name,
Packit ae235b
                             const gchar *dbus_error_message,
Packit ae235b
                             const gchar *format,
Packit ae235b
                             ...);
Packit ae235b

Does nothing if error

Packit ae235b
 is NULL. Otherwise sets *error
Packit ae235b
 to
Packit ae235b
a new GError created with g_dbus_error_new_for_dbus_error()
Packit ae235b
with dbus_error_message
Packit ae235b
 prepend with format
Packit ae235b
 (unless NULL).

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

A pointer to a GError or NULL.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_name

Packit ae235b

D-Bus error name.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_message

Packit ae235b

D-Bus error message.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

format

Packit ae235b

printf()-style format to prepend to dbus_error_message

Packit ae235b
or NULL. 

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

...

Packit ae235b

Arguments for format

Packit ae235b
.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_set_dbus_error_valist ()

Packit ae235b
void
Packit ae235b
g_dbus_error_set_dbus_error_valist (GError **error,
Packit ae235b
                                    const gchar *dbus_error_name,
Packit ae235b
                                    const gchar *dbus_error_message,
Packit ae235b
                                    const gchar *format,
Packit ae235b
                                    va_list var_args);
Packit ae235b

Like g_dbus_error_set_dbus_error() but intended for language bindings.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

A pointer to a GError or NULL.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_name

Packit ae235b

D-Bus error name.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

dbus_error_message

Packit ae235b

D-Bus error message.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

format

Packit ae235b

printf()-style format to prepend to dbus_error_message

Packit ae235b
or NULL. 

Packit ae235b
[nullable]
Packit ae235b
Packit ae235b
Packit ae235b

var_args

Packit ae235b

Arguments for format

Packit ae235b
.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_dbus_error_encode_gerror ()

Packit ae235b
gchar *
Packit ae235b
g_dbus_error_encode_gerror (const GError *error);
Packit ae235b

Creates a D-Bus error name to use for error

Packit ae235b
. If error
Packit ae235b
 matches
Packit ae235b
a registered error (cf. g_dbus_error_register_error()), the corresponding
Packit ae235b
D-Bus error name will be returned.

Packit ae235b

Otherwise the a name of the form

Packit ae235b
org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE
Packit ae235b
will be used. This allows other GDBus applications to map the error
Packit ae235b
on the wire back to a GError using g_dbus_error_new_for_dbus_error().

Packit ae235b

This function is typically only used in object mappings to put a

Packit ae235b
GError on the wire. Regular applications should not use it.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

error

Packit ae235b

A GError.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

A D-Bus error name (never NULL). Free with g_free().

Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

enum GDBusError

Packit ae235b

Error codes for the G_DBUS_ERROR error domain.

Packit ae235b
Packit ae235b

Members

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_FAILED

Packit ae235b
Packit ae235b

A generic error; "something went wrong" - see the error message for

Packit ae235b
more.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_NO_MEMORY

Packit ae235b
Packit ae235b

There was not enough memory to complete an operation.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SERVICE_UNKNOWN

Packit ae235b
Packit ae235b

The bus doesn't know how to launch a service to supply the bus name

Packit ae235b
you wanted.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_NAME_HAS_NO_OWNER

Packit ae235b
Packit ae235b

The bus name you referenced doesn't exist (i.e. no application owns

Packit ae235b
it).

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_NO_REPLY

Packit ae235b
Packit ae235b

No reply to a message expecting one, usually means a timeout occurred.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_IO_ERROR

Packit ae235b
Packit ae235b

Something went wrong reading or writing to a socket, for example.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_BAD_ADDRESS

Packit ae235b
Packit ae235b

A D-Bus bus address was malformed.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_NOT_SUPPORTED

Packit ae235b
Packit ae235b

Requested operation isn't supported (like ENOSYS on UNIX).

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_LIMITS_EXCEEDED

Packit ae235b
Packit ae235b

Some limited resource is exhausted.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_ACCESS_DENIED

Packit ae235b
Packit ae235b

Security restrictions don't allow doing what you're trying to do.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_AUTH_FAILED

Packit ae235b
Packit ae235b

Authentication didn't work.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_NO_SERVER

Packit ae235b
Packit ae235b

Unable to connect to server (probably caused by ECONNREFUSED on a

Packit ae235b
socket).

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_TIMEOUT

Packit ae235b
Packit ae235b

Certain timeout errors, possibly ETIMEDOUT on a socket. Note that

Packit ae235b
G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning:
Packit ae235b
this is confusingly-named given that G_DBUS_ERROR_TIMED_OUT also
Packit ae235b
exists. We can't fix it for compatibility reasons so just be
Packit ae235b
careful.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_NO_NETWORK

Packit ae235b
Packit ae235b

No network access (probably ENETUNREACH on a socket).

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_ADDRESS_IN_USE

Packit ae235b
Packit ae235b

Can't bind a socket since its address is in use (i.e. EADDRINUSE).

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_DISCONNECTED

Packit ae235b
Packit ae235b

The connection is disconnected and you're trying to use it.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_INVALID_ARGS

Packit ae235b
Packit ae235b

Invalid arguments passed to a method call.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_FILE_NOT_FOUND

Packit ae235b
Packit ae235b

Missing file.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_FILE_EXISTS

Packit ae235b
Packit ae235b

Existing file and the operation you're using does not silently overwrite.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_UNKNOWN_METHOD

Packit ae235b
Packit ae235b

Method name you invoked isn't known by the object you invoked it on.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_TIMED_OUT

Packit ae235b
Packit ae235b

Certain timeout errors, e.g. while starting a service. Warning: this is

Packit ae235b
confusingly-named given that G_DBUS_ERROR_TIMEOUT also exists. We
Packit ae235b
can't fix it for compatibility reasons so just be careful.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_MATCH_RULE_NOT_FOUND

Packit ae235b
Packit ae235b

Tried to remove or modify a match rule that didn't exist.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_MATCH_RULE_INVALID

Packit ae235b
Packit ae235b

The match rule isn't syntactically valid.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_EXEC_FAILED

Packit ae235b
Packit ae235b

While starting a new process, the exec() call failed.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_FORK_FAILED

Packit ae235b
Packit ae235b

While starting a new process, the fork() call failed.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_CHILD_EXITED

Packit ae235b
Packit ae235b

While starting a new process, the child exited with a status code.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_CHILD_SIGNALED

Packit ae235b
Packit ae235b

While starting a new process, the child exited on a signal.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_FAILED

Packit ae235b
Packit ae235b

While starting a new process, something went wrong.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_SETUP_FAILED

Packit ae235b
Packit ae235b

We failed to setup the environment correctly.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_CONFIG_INVALID

Packit ae235b
Packit ae235b

We failed to setup the config parser correctly.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_SERVICE_INVALID

Packit ae235b
Packit ae235b

Bus name was not valid.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND

Packit ae235b
Packit ae235b

Service file not found in system-services directory.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID

Packit ae235b
Packit ae235b

Permissions are incorrect on the setuid helper.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_FILE_INVALID

Packit ae235b
Packit ae235b

Service file invalid (Name, User or Exec missing).

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SPAWN_NO_MEMORY

Packit ae235b
Packit ae235b

Tried to get a UNIX process ID and it wasn't available.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN

Packit ae235b
Packit ae235b

Tried to get a UNIX process ID and it wasn't available.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_INVALID_SIGNATURE

Packit ae235b
Packit ae235b

A type signature is not valid.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_INVALID_FILE_CONTENT

Packit ae235b
Packit ae235b

A file contains invalid syntax or is otherwise broken.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN

Packit ae235b
Packit ae235b

Asked for SELinux security context and it wasn't available.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN

Packit ae235b
Packit ae235b

Asked for ADT audit data and it wasn't available.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_OBJECT_PATH_IN_USE

Packit ae235b
Packit ae235b

There's already an object with the requested object path.

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_UNKNOWN_OBJECT

Packit ae235b
Packit ae235b

Object you invoked a method on isn't known. Since 2.42

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_UNKNOWN_INTERFACE

Packit ae235b
Packit ae235b

Interface you invoked a method on isn't known by the object. Since 2.42

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_UNKNOWN_PROPERTY

Packit ae235b
Packit ae235b

Property you tried to access isn't known by the object. Since 2.42

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

G_DBUS_ERROR_PROPERTY_READ_ONLY

Packit ae235b
Packit ae235b

Property you tried to set is read-only. Since 2.42

Packit ae235b
Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_DBUS_ERROR

Packit ae235b
#define G_DBUS_ERROR g_dbus_error_quark()
Packit ae235b
Packit ae235b

Error domain for errors generated by a remote message bus. Errors

Packit ae235b
in this domain will be from the GDBusError enumeration.  See
Packit ae235b
GError for more information on error domains.

Packit ae235b

Note that this error domain is intended only for

Packit ae235b
returning errors from a remote message bus process. Errors
Packit ae235b
generated locally in-process by e.g. GDBusConnection should use the
Packit ae235b
G_IO_ERROR domain.

Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GDBusErrorEntry

Packit ae235b
typedef struct {
Packit ae235b
  gint         error_code;
Packit ae235b
  const gchar *dbus_error_name;
Packit ae235b
} GDBusErrorEntry;
Packit ae235b
Packit ae235b

Struct used in g_dbus_error_register_error_domain().

Packit ae235b
Packit ae235b

Members

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

gint error_code;

Packit ae235b

An error code.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b

const gchar *dbus_error_name;

Packit ae235b

The D-Bus error name to associate with error_code

Packit ae235b
.

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Since: 2.26

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>