File: //usr/local/ssl/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGError.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>DBusGError</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="D-Bus GLib bindings - Reference Manual">
<link rel="up" href="ch02.html" title="API Reference">
<link rel="prev" href="dbus-glib-DBusGMethod.html" title="DBusGMethod">
<link rel="next" href="dbus-glib-DBusGProxy.html" title="DBusGProxy">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="Introduction">
<link rel="chapter" href="ch02.html" title="API Reference">
<link rel="chapter" href="ch03.html" title="Tools Reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="dbus-glib-DBusGMethod.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">D-Bus GLib bindings - Reference Manual</th>
<td><a accesskey="n" href="dbus-glib-DBusGProxy.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2531556" class="shortcut">Top</a>
 | 
<a href="#id2549461" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="dbus-glib-DBusGError"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2531556"></a><span class="refentrytitle">DBusGError</span>
</h2>
<p>DBusGError — DBus GError</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" lang="en">
<a name="id2548227"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
enum <a href="dbus-glib-DBusGError.html#DBusGError">DBusGError</a>;
gboolean <a href="dbus-glib-DBusGError.html#dbus-g-error-has-name">dbus_g_error_has_name</a> (GError *error,
const char *name);
const char* <a href="dbus-glib-DBusGError.html#dbus-g-error-get-name">dbus_g_error_get_name</a> (GError *error);
GQuark <a href="dbus-glib-DBusGError.html#dbus-g-error-quark">dbus_g_error_quark</a> (void);
void <a href="dbus-glib-DBusGError.html#dbus-g-error-domain-register">dbus_g_error_domain_register</a> (GQuark domain,
const char *default_iface,
GType code_enum);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2549461"></a><h2>Description</h2>
<p>
<a href="dbus-glib-DBusGError.html#DBusGError"><span class="type">DBusGError</span></a> is the <span class="type">GError</span> used by DBus.</p>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2549494"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2549505"></a><h3>
<a name="DBusGError"></a>enum DBusGError</h3>
<a class="indexterm" name="id2549517"></a><pre class="programlisting">typedef enum
{
#include "dbus-glib-error-enum.h"
} DBusGError;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2542468"></a><h3>
<a name="dbus-g-error-has-name"></a>dbus_g_error_has_name ()</h3>
<a class="indexterm" name="id2542479"></a><pre class="programlisting">gboolean dbus_g_error_has_name (GError *error,
const char *name);</pre>
<p>
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).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>error</code></em> :</span></td>
<td> the GError given from the remote method
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
<td> the D-BUS error name
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> TRUE iff the remote error has the given name
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2542566"></a><h3>
<a name="dbus-g-error-get-name"></a>dbus_g_error_get_name ()</h3>
<a class="indexterm" name="id2542577"></a><pre class="programlisting">const char* dbus_g_error_get_name (GError *error);</pre>
<p>
This function may only be invoked on a <span class="type">GError</span> 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 <span class="type">DBUS_GERROR</span>,
and the code is <span class="type">DBUS_GERROR_REMOTE_EXCEPTION</span>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>error</code></em> :</span></td>
<td> the <span class="type">GError</span> given from the remote method
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the D-BUS name for a remote exception.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2544950"></a><h3>
<a name="dbus-g-error-quark"></a>dbus_g_error_quark ()</h3>
<a class="indexterm" name="id2544962"></a><pre class="programlisting">GQuark dbus_g_error_quark (void);</pre>
<p>
The implementation of <span class="type">DBUS_GERROR</span> error domain. See documentation
for <span class="type">GError</span> in GLib reference manual.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the error domain quark for use with <span class="type">GError</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2545022"></a><h3>
<a name="dbus-g-error-domain-register"></a>dbus_g_error_domain_register ()</h3>
<a class="indexterm" name="id2545033"></a><pre class="programlisting">void dbus_g_error_domain_register (GQuark domain,
const char *default_iface,
GType code_enum);</pre>
<p>
Register a <span class="type">GError</span> 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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>domain</code></em> :</span></td>
<td> the <span class="type">GError</span> domain
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>default_iface</code></em> :</span></td>
<td> the D-BUS interface used for error values by default, or <span class="type">NULL</span>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>code_enum</code></em> :</span></td>
<td> a <span class="type">GType</span> for a <span class="type">GEnum</span> of the error codes
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2537812"></a><h2>See Also</h2>
<span class="type">GError</span>
</div>
</div>
</body>
</html>