/usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGError.html is in libdbus-glib-1-doc 0.100.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DBusGError</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" 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.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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">
<a href="#dbus-glib-DBusGError.synopsis" class="shortcut">Top</a>
|
<a href="#dbus-glib-DBusGError.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="dbus-glib-DBusGError"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="dbus-glib-DBusGError.top_of_page"></a>DBusGError</span></h2>
<p>DBusGError — DBus GError</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="dbus-glib-DBusGError.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="dbus-glib-DBusGError.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <dbus/dbus-glib.h>
enum <a class="link" href="dbus-glib-DBusGError.html#DBusGError" title="enum DBusGError">DBusGError</a>;
<span class="returnvalue">gboolean</span> <a class="link" href="dbus-glib-DBusGError.html#dbus-g-error-has-name" title="dbus_g_error_has_name ()">dbus_g_error_has_name</a> (<em class="parameter"><code><span class="type">GError</span> *error</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="dbus-glib-DBusGError.html#dbus-g-error-get-name" title="dbus_g_error_get_name ()">dbus_g_error_get_name</a> (<em class="parameter"><code><span class="type">GError</span> *error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="dbus-glib-DBusGError.html#dbus-g-error-domain-register" title="dbus_g_error_domain_register ()">dbus_g_error_domain_register</a> (<em class="parameter"><code><span class="type">GQuark</span> domain</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *default_iface</code></em>,
<em class="parameter"><code><span class="type">GType</span> code_enum</code></em>);
#define <a class="link" href="dbus-glib-DBusGError.html#DBUS-GERROR:CAPS" title="DBUS_GERROR">DBUS_GERROR</a>
</pre>
</div>
<div class="refsect1">
<a name="dbus-glib-DBusGError.description"></a><h2>Description</h2>
<p>
<a class="link" href="dbus-glib-DBusGError.html#DBusGError" title="enum DBusGError"><span class="type">DBusGError</span></a> is the <span class="type">GError</span> used by DBus.
</p>
</div>
<div class="refsect1">
<a name="dbus-glib-DBusGError.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="DBusGError"></a><h3>enum DBusGError</h3>
<pre class="programlisting">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;
</pre>
<p>
A <span class="type">GError</span> enumeration for the domain <a class="link" href="dbus-glib-DBusGError.html#DBUS-GERROR:CAPS" title="DBUS_GERROR"><code class="literal">DBUS_GERROR</code></a>. The values' meanings
can be found by looking at the comments for the corresponding constants
in dbus-protocol.h.
</p>
</div>
<hr>
<div class="refsect2">
<a name="dbus-g-error-has-name"></a><h3>dbus_g_error_has_name ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> dbus_g_error_has_name (<em class="parameter"><code><span class="type">GError</span> *error</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</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
<span class="type">GError</span> returned from an invocation of a remote method, e.g. via
<a class="link" href="dbus-glib-DBusGProxy.html#dbus-g-proxy-end-call" title="dbus_g_proxy_end_call ()"><code class="function">dbus_g_proxy_end_call()</code></a>. It will silently return <code class="literal">FALSE</code> for errors
which are not remote D-BUS exceptions (i.e. with a domain other
than <a class="link" href="dbus-glib-DBusGError.html#DBUS-GERROR:CAPS" title="DBUS_GERROR"><code class="literal">DBUS_GERROR</code></a> or a code other than
<code class="literal">DBUS_GERROR_REMOTE_EXCEPTION</code>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>the GError given from the remote method</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the D-BUS error name</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if and only if the remote error has the given name</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="dbus-g-error-get-name"></a><h3>dbus_g_error_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> * dbus_g_error_get_name (<em class="parameter"><code><span class="type">GError</span> *error</code></em>);</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 <a class="link" href="dbus-glib-DBusGProxy.html#dbus-g-proxy-end-call" title="dbus_g_proxy_end_call ()"><code class="function">dbus_g_proxy_end_call()</code></a>.
Moreover, you must ensure that the error's domain is <a class="link" href="dbus-glib-DBusGError.html#DBUS-GERROR:CAPS" title="DBUS_GERROR"><code class="literal">DBUS_GERROR</code></a>,
and the code is <code class="literal">DBUS_GERROR_REMOTE_EXCEPTION</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>the <span class="type">GError</span> given from the remote method</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the D-BUS name for a remote exception.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="dbus-g-error-domain-register"></a><h3>dbus_g_error_domain_register ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> dbus_g_error_domain_register (<em class="parameter"><code><span class="type">GQuark</span> domain</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *default_iface</code></em>,
<em class="parameter"><code><span class="type">GType</span> code_enum</code></em>);</pre>
<p>
Register a <span class="type">GError</span> domain and set of codes with D-Bus. When an object
raises a <span class="type">GError</span> in the domain <em class="parameter"><code>domain</code></em> from one of its D-Bus methods,
the D-Bus error name used will be <em class="parameter"><code>default_iface</code></em>, followed by a dot,
followed by the <span class="type">GEnumValue.value_nick</span> corresponding to the <span class="type">GError.code</span>.
For D-Bus, it's conventional to use an error name (value_nick) that is
in CamelCase.
</p>
<p>
(For instance, if a D-Bus method <code class="code">com.example.MyObject.GetThings</code>
can raise a <span class="type">GError</span> with domain <code class="code">MY_ERROR</code> and code
<code class="code">MY_ERROR_NOT_HAPPY</code>, you could call
<code class="code">dbus_g_error_domain_register (MY_ERROR, "com.example.MyError",
MY_TYPE_ERROR)</code>, and set up the value_nick for
<code class="code">MY_ERROR_NOT_HAPPY</code> to be <code class="code">NotHappy</code>,
resulting in the D-Bus error string
<code class="code">com.example.MyError.NotHappy</code>.)
</p>
<p>
If <em class="parameter"><code>default_iface</code></em> is <code class="literal">NULL</code>, the D-Bus interface of the method that failed
will be used.
</p>
<p>
(For instance, if the above example had called
<code class="code">dbus_g_error_domain_register (MY_ERROR, NULL, MY_TYPE_ERROR)</code>
instead, then the D-Bus error string would be
<code class="code">com.example.MyObject.NotHappy</code>.)
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>the <span class="type">GError</span> domain</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>default_iface</code></em> :</span></p></td>
<td>the prefix used for error values, or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>code_enum</code></em> :</span></p></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>
<hr>
<div class="refsect2">
<a name="DBUS-GERROR:CAPS"></a><h3>DBUS_GERROR</h3>
<pre class="programlisting">#define DBUS_GERROR dbus_g_error_quark ()
</pre>
<p>
Expands to a function call returning the error domain quark for <a class="link" href="dbus-glib-DBusGError.html#DBusGError" title="enum DBusGError"><span class="type">DBusGError</span></a>,
for use with <span class="type">GError</span>.
</p>
</div>
</div>
<div class="refsect1">
<a name="dbus-glib-DBusGError.see-also"></a><h2>See Also</h2>
<span class="type">GError</span>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|