diff options
Diffstat (limited to 'doc/reference/html/dbus-glib-DBus-GLib-low-level.html')
-rw-r--r-- | doc/reference/html/dbus-glib-DBus-GLib-low-level.html | 248 |
1 files changed, 248 insertions, 0 deletions
diff --git a/doc/reference/html/dbus-glib-DBus-GLib-low-level.html b/doc/reference/html/dbus-glib-DBus-GLib-low-level.html new file mode 100644 index 0000000..3457403 --- /dev/null +++ b/doc/reference/html/dbus-glib-DBus-GLib-low-level.html @@ -0,0 +1,248 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>DBus GLib low level</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-Specializable-GType-System.html" title="Specializable GType System"> +<link rel="next" href="ch03.html" title="Tools Reference"> +<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-Specializable-GType-System.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="ch03.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-DBus-GLib-low-level.synopsis" class="shortcut">Top</a> + | + <a href="#dbus-glib-DBus-GLib-low-level.description" class="shortcut">Description</a> +</td></tr> +</table> +<div class="refentry"> +<a name="dbus-glib-DBus-GLib-low-level"></a><div class="titlepage"></div> +<div class="refnamediv"><table width="100%"><tr> +<td valign="top"> +<h2><span class="refentrytitle"><a name="dbus-glib-DBus-GLib-low-level.top_of_page"></a>DBus GLib low level</span></h2> +<p>DBus GLib low level — DBus lower level functions</p> +</td> +<td valign="top" align="right"></td> +</tr></table></div> +<div class="refsect1"> +<a name="dbus-glib-DBus-GLib-low-level.stability-level"></a><h2>Stability Level</h2> +Unstable, unless otherwise indicated +</div> +<div class="refsynopsisdiv"> +<a name="dbus-glib-DBus-GLib-low-level.synopsis"></a><h2>Synopsis</h2> +<pre class="synopsis"> +#include <dbus/dbus-glib-lowlevel.h> + +<span class="returnvalue">void</span> <a class="link" href="dbus-glib-DBus-GLib-low-level.html#dbus-set-g-error" title="dbus_set_g_error ()">dbus_set_g_error</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **gerror</code></em>, + <em class="parameter"><code><span class="type">DBusError</span> *derror</code></em>); +<span class="returnvalue">void</span> <a class="link" href="dbus-glib-DBus-GLib-low-level.html#dbus-connection-setup-with-g-main" title="dbus_connection_setup_with_g_main ()">dbus_connection_setup_with_g_main</a> (<em class="parameter"><code><span class="type">DBusConnection</span> *connection</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *context</code></em>); +<a class="link" href="dbus-glib-DBusGConnection.html#DBusGConnection" title="DBusGConnection"><span class="returnvalue">DBusGConnection</span></a> * <a class="link" href="dbus-glib-DBus-GLib-low-level.html#dbus-connection-get-g-connection" title="dbus_connection_get_g_connection ()">dbus_connection_get_g_connection</a> (<em class="parameter"><code><span class="type">DBusConnection</span> *connection</code></em>); +<span class="returnvalue">void</span> <a class="link" href="dbus-glib-DBus-GLib-low-level.html#dbus-server-setup-with-g-main" title="dbus_server_setup_with_g_main ()">dbus_server_setup_with_g_main</a> (<em class="parameter"><code><span class="type">DBusServer</span> *server</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *context</code></em>); +#define <a class="link" href="dbus-glib-DBus-GLib-low-level.html#DBUS-TYPE-CONNECTION:CAPS" title="DBUS_TYPE_CONNECTION">DBUS_TYPE_CONNECTION</a> +#define <a class="link" href="dbus-glib-DBus-GLib-low-level.html#DBUS-TYPE-MESSAGE:CAPS" title="DBUS_TYPE_MESSAGE">DBUS_TYPE_MESSAGE</a> +</pre> +</div> +<div class="refsect1"> +<a name="dbus-glib-DBus-GLib-low-level.description"></a><h2>Description</h2> +<p> +These functions can be used to access lower level of DBus. +</p> +</div> +<div class="refsect1"> +<a name="dbus-glib-DBus-GLib-low-level.details"></a><h2>Details</h2> +<div class="refsect2"> +<a name="dbus-set-g-error"></a><h3>dbus_set_g_error ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> dbus_set_g_error (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **gerror</code></em>, + <em class="parameter"><code><span class="type">DBusError</span> *derror</code></em>);</pre> +<p> +Store the information from a DBus method error return into a +GError. For the normal case of an arbitrary remote process, +the error code will be DBUS_GERROR_REMOTE_EXCEPTION. Now, +DBus errors have two components; a message and a "name". +The former is an arbitrary (normally American English) string. +The second is a string like com.example.FooFailure which +programs can use as a conditional source. Because a GError +only has one string, we use a hack to encode both values: +</p> +<p> +<human readable string><null><error name><null> +</p> +<p> +You can use the following code to retrieve both values: +</p> +<p> +</p> +<div class="informalexample"> + <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> + <tbody> + <tr> + <td class="listing_lines" align="right"><pre>1 +2 +3</pre></td> + <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">const char</span> <span class="gtkdoc opt">*</span>msg <span class="gtkdoc opt">=</span> error<span class="gtkdoc opt">-></span>message<span class="gtkdoc opt">;</span> +<span class="gtkdoc kwb">size_t</span> len <span class="gtkdoc opt">=</span> <span class="function">strlen</span><span class="gtkdoc opt">(</span>msg<span class="gtkdoc opt">);</span> +<span class="gtkdoc kwb">const char</span> <span class="gtkdoc opt">*</span>error_name <span class="gtkdoc opt">=</span> msg<span class="gtkdoc opt">+</span>len<span class="gtkdoc opt">+</span><span class="number">1</span><span class="gtkdoc opt">;</span></pre></td> + </tr> + </tbody> + </table> +</div> + +<p> +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>gerror</code></em> :</span></p></td> +<td>an error</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>derror</code></em> :</span></p></td> +<td>a <span class="type">DBusError</span> +</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> +<a name="dbus-connection-setup-with-g-main"></a><h3>dbus_connection_setup_with_g_main ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> dbus_connection_setup_with_g_main (<em class="parameter"><code><span class="type">DBusConnection</span> *connection</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *context</code></em>);</pre> +<p> +Sets the watch and timeout functions of a <span class="type">DBusConnection</span> +to integrate the connection with the GLib main loop. +Pass in <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> unless you're +doing something specialized. +</p> +<p> +If called twice for the same context, does nothing the second +time. If called once with context A and once with context B, +context B replaces context A as the context monitoring the +connection. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td> +<td>the connection</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> +<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for default context</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> +<a name="dbus-connection-get-g-connection"></a><h3>dbus_connection_get_g_connection ()</h3> +<pre class="programlisting"><a class="link" href="dbus-glib-DBusGConnection.html#DBusGConnection" title="DBusGConnection"><span class="returnvalue">DBusGConnection</span></a> * dbus_connection_get_g_connection (<em class="parameter"><code><span class="type">DBusConnection</span> *connection</code></em>);</pre> +<p> +Get the <a class="link" href="dbus-glib-DBusGConnection.html#DBusGConnection" title="DBusGConnection"><span class="type">DBusGConnection</span></a> corresponding to this <span class="type">DBusConnection</span>. This only +makes sense if the <span class="type">DBusConnection</span> was originally a <a class="link" href="dbus-glib-DBusGConnection.html#DBusGConnection" title="DBusGConnection"><span class="type">DBusGConnection</span></a> that was +registered with the GLib main loop. The return value does not have its +refcount incremented. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td> +<td>a <span class="type">DBusConnection</span> +</td> +</tr> +<tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td><a class="link" href="dbus-glib-DBusGConnection.html#DBusGConnection" title="DBusGConnection"><span class="type">DBusGConnection</span></a></td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> +<a name="dbus-server-setup-with-g-main"></a><h3>dbus_server_setup_with_g_main ()</h3> +<pre class="programlisting"><span class="returnvalue">void</span> dbus_server_setup_with_g_main (<em class="parameter"><code><span class="type">DBusServer</span> *server</code></em>, + <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *context</code></em>);</pre> +<p> +Sets the watch and timeout functions of a <span class="type">DBusServer</span> +to integrate the server with the GLib main loop. +In most cases the context argument should be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. +</p> +<p> +If called twice for the same context, does nothing the second +time. If called once with context A and once with context B, +context B replaces context A as the context monitoring the +connection. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody> +<tr> +<td><p><span class="term"><em class="parameter"><code>server</code></em> :</span></p></td> +<td>the server</td> +</tr> +<tr> +<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td> +<td>the <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for default</td> +</tr> +</tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> +<a name="DBUS-TYPE-CONNECTION:CAPS"></a><h3>DBUS_TYPE_CONNECTION</h3> +<pre class="programlisting">#define DBUS_TYPE_CONNECTION (dbus_connection_get_g_type ()) +</pre> +<p> +Expands to a function call returning a boxed <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> representing a +<span class="type">DBusConnection</span> pointer from libdbus. Not to be confused with +<a class="link" href="dbus-glib-DBusGConnection.html#DBUS-TYPE-G-CONNECTION:CAPS" title="DBUS_TYPE_G_CONNECTION"><code class="literal">DBUS_TYPE_G_CONNECTION</code></a>, which you should usually use instead. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody><tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td>the GLib type</td> +</tr></tbody> +</table></div> +</div> +<hr> +<div class="refsect2"> +<a name="DBUS-TYPE-MESSAGE:CAPS"></a><h3>DBUS_TYPE_MESSAGE</h3> +<pre class="programlisting">#define DBUS_TYPE_MESSAGE (dbus_message_get_g_type ()) +</pre> +<p> +Expands to a function call returning a boxed <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> representing a +<span class="type">DBusMessage</span> pointer from libdbus. Not to be confused with +<a class="link" href="dbus-glib-DBusGMessage.html#DBUS-TYPE-G-MESSAGE:CAPS" title="DBUS_TYPE_G_MESSAGE"><code class="literal">DBUS_TYPE_G_MESSAGE</code></a>, which you should usually use instead. +</p> +<div class="variablelist"><table border="0"> +<col align="left" valign="top"> +<tbody><tr> +<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> +<td>the GLib type</td> +</tr></tbody> +</table></div> +</div> +</div> +</div> +<div class="footer"> +<hr> + Generated by GTK-Doc V1.18</div> +</body> +</html>
\ No newline at end of file |