1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>DBus GObject related functions</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="D-Bus GLib bindings - Reference Manual">
8 <link rel="up" href="ch02.html" title="API Reference">
9 <link rel="prev" href="dbus-glib-DBusGConnection.html" title="DBusGConnection">
10 <link rel="next" href="dbus-glib-DBusGMessage.html" title="DBusGMessage">
11 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="dbus-glib-DBusGConnection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">D-Bus GLib bindings - Reference Manual</th>
21 <td><a accesskey="n" href="dbus-glib-DBusGMessage.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#dbus-glib-dbus-gobject.synopsis" class="shortcut">Top</a>
26 <a href="#dbus-glib-dbus-gobject.description" class="shortcut">Description</a>
29 <div class="refentry" title="DBus GObject related functions">
30 <a name="dbus-glib-dbus-gobject"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
33 <h2><span class="refentrytitle"><a name="dbus-glib-dbus-gobject.top_of_page"></a>DBus GObject related functions</span></h2>
34 <p>DBus GObject related functions — Exporting a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> remotely</p>
36 <td valign="top" align="right"></td>
38 <div class="refsect1" title="Stability Level">
39 <a name="dbus-glib-dbus-gobject.stability-level"></a><h2>Stability Level</h2>
40 Stable, unless otherwise indicated
42 <div class="refsynopsisdiv" title="Synopsis">
43 <a name="dbus-glib-dbus-gobject.synopsis"></a><h2>Synopsis</h2>
44 <pre class="synopsis">#define <a class="link" href="dbus-glib-dbus-gobject.html#DBUS-TYPE-G-OBJECT-PATH:CAPS" title="DBUS_TYPE_G_OBJECT_PATH">DBUS_TYPE_G_OBJECT_PATH</a>
45 <a class="link" href="dbus-glib-dbus-gobject.html#DBusGObjectInfo" title="DBusGObjectInfo">DBusGObjectInfo</a>;
46 <span class="returnvalue">void</span> <a class="link" href="dbus-glib-dbus-gobject.html#dbus-g-object-type-install-info" title="dbus_g_object_type_install_info ()">dbus_g_object_type_install_info</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
47 <em class="parameter"><code>const <a class="link" href="dbus-glib-dbus-gobject.html#DBusGObjectInfo" title="DBusGObjectInfo"><span class="type">DBusGObjectInfo</span></a> *info</code></em>);
48 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <a class="link" href="dbus-glib-dbus-gobject.html#dbus-g-object-path-get-g-type" title="dbus_g_object_path_get_g_type ()">dbus_g_object_path_get_g_type</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
49 <span class="returnvalue">void</span> <a class="link" href="dbus-glib-dbus-gobject.html#dbus-g-object-register-marshaller" title="dbus_g_object_register_marshaller ()">dbus_g_object_register_marshaller</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> marshaller</code></em>,
50 <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> rettype</code></em>,
51 <em class="parameter"><code>...</code></em>);
52 <span class="returnvalue">void</span> <a class="link" href="dbus-glib-dbus-gobject.html#dbus-g-object-register-marshaller-array" title="dbus_g_object_register_marshaller_array ()">dbus_g_object_register_marshaller_array</a>
53 (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> marshaller</code></em>,
54 <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> rettype</code></em>,
55 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_types</code></em>,
56 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> *types</code></em>);
59 <div class="refsect1" title="Description">
60 <a name="dbus-glib-dbus-gobject.description"></a><h2>Description</h2>
65 <div class="refsect1" title="Details">
66 <a name="dbus-glib-dbus-gobject.details"></a><h2>Details</h2>
67 <div class="refsect2" title="DBUS_TYPE_G_OBJECT_PATH">
68 <a name="DBUS-TYPE-G-OBJECT-PATH:CAPS"></a><h3>DBUS_TYPE_G_OBJECT_PATH</h3>
69 <pre class="programlisting">#define DBUS_TYPE_G_OBJECT_PATH (dbus_g_object_path_get_g_type ())
75 <div class="refsect2" title="DBusGObjectInfo">
76 <a name="DBusGObjectInfo"></a><h3>DBusGObjectInfo</h3>
77 <pre class="programlisting">typedef struct {
80 const DBusGMethodInfo *method_infos;
83 const char *exported_signals;
84 const char *exported_properties;
88 Introspection data for a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, normally autogenerated by
89 a tool such as <a class="link" href="dbus-binding-tool.html" title="dbus-binding-tool"><span class="type">dbus-binding-tool</span></a>.
91 <div class="variablelist"><table border="0">
92 <col align="left" valign="top">
95 <td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="DBusGObjectInfo.format-version"></a>format_version</code></em>;</span></p></td>
96 <td>Allows us to change the rest of this struct
97 by adding DBusGObjectInfo2, DBusGObjectInfo3, etc.
101 <td><p><span class="term">const <a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInfo" title="DBusGMethodInfo"><span class="type">DBusGMethodInfo</span></a> *<em class="structfield"><code><a name="DBusGObjectInfo.method-infos"></a>method_infos</code></em>;</span></p></td>
102 <td>Array of method pointers
106 <td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="DBusGObjectInfo.n-method-infos"></a>n_method_infos</code></em>;</span></p></td>
107 <td>Length of the infos array
111 <td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="DBusGObjectInfo.data"></a>data</code></em>;</span></p></td>
112 <td>Introspection data
116 <td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="DBusGObjectInfo.exported-signals"></a>exported_signals</code></em>;</span></p></td>
121 <td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="DBusGObjectInfo.exported-properties"></a>exported_properties</code></em>;</span></p></td>
122 <td>Exported properties
129 <div class="refsect2" title="dbus_g_object_type_install_info ()">
130 <a name="dbus-g-object-type-install-info"></a><h3>dbus_g_object_type_install_info ()</h3>
131 <pre class="programlisting"><span class="returnvalue">void</span> dbus_g_object_type_install_info (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
132 <em class="parameter"><code>const <a class="link" href="dbus-glib-dbus-gobject.html#DBusGObjectInfo" title="DBusGObjectInfo"><span class="type">DBusGObjectInfo</span></a> *info</code></em>);</pre>
134 Install introspection information about the given object <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a>
135 sufficient to allow methods on the object to be invoked by name.
136 The introspection information is normally generated by
137 dbus-glib-tool, then this function is called in the
138 <code class="function">class_init()</code> for the object class.
141 Once introspection information has been installed, instances of the
142 object registered with #<a class="link" href="dbus-glib-DBusGConnection.html#dbus-g-connection-register-g-object" title="dbus_g_connection_register_g_object ()"><code class="function">dbus_g_connection_register_g_object()</code></a> can have
143 their methods invoked remotely.
145 <div class="variablelist"><table border="0">
146 <col align="left" valign="top">
149 <td><p><span class="term"><em class="parameter"><code>object_type</code></em> :</span></p></td>
151 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> for the object
155 <td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
156 <td>introspection data generated by <span class="type">dbus-glib-tool</span>
163 <div class="refsect2" title="dbus_g_object_path_get_g_type ()">
164 <a name="dbus-g-object-path-get-g-type"></a><h3>dbus_g_object_path_get_g_type ()</h3>
165 <pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> dbus_g_object_path_get_g_type (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
168 <div class="variablelist"><table border="0">
169 <col align="left" valign="top">
171 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
178 <div class="refsect2" title="dbus_g_object_register_marshaller ()">
179 <a name="dbus-g-object-register-marshaller"></a><h3>dbus_g_object_register_marshaller ()</h3>
180 <pre class="programlisting"><span class="returnvalue">void</span> dbus_g_object_register_marshaller (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> marshaller</code></em>,
181 <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> rettype</code></em>,
182 <em class="parameter"><code>...</code></em>);</pre>
184 Register a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> to be used for signal invocations,
185 giving its return type and a list of parameter types,
186 followed by <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-TYPE-INVALID:CAPS"><code class="literal">G_TYPE_INVALID</code></a>.
189 This function will not be needed once GLib includes libffi.
191 <div class="variablelist"><table border="0">
192 <col align="left" valign="top">
195 <td><p><span class="term"><em class="parameter"><code>marshaller</code></em> :</span></p></td>
196 <td>a GClosureMarshal to be used for invocation
200 <td><p><span class="term"><em class="parameter"><code>rettype</code></em> :</span></p></td>
201 <td>a GType for the return type of the function
202 @:... The parameter <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GTypes</span></a>, followed by <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-TYPE-INVALID:CAPS"><code class="literal">G_TYPE_INVALID</code></a>
206 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
214 <div class="refsect2" title="dbus_g_object_register_marshaller_array ()">
215 <a name="dbus-g-object-register-marshaller-array"></a><h3>dbus_g_object_register_marshaller_array ()</h3>
216 <pre class="programlisting"><span class="returnvalue">void</span> dbus_g_object_register_marshaller_array
217 (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> marshaller</code></em>,
218 <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> rettype</code></em>,
219 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_types</code></em>,
220 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> *types</code></em>);</pre>
222 Register a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> to be used for signal invocations.
223 <em class="parameter"><code>see_also</code></em> <a class="link" href="dbus-glib-dbus-gobject.html#dbus-g-object-register-marshaller" title="dbus_g_object_register_marshaller ()"><span class="type">dbus_g_object_register_marshaller</span></a>
225 <div class="variablelist"><table border="0">
226 <col align="left" valign="top">
229 <td><p><span class="term"><em class="parameter"><code>marshaller</code></em> :</span></p></td>
230 <td>a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> to be used for invocation
234 <td><p><span class="term"><em class="parameter"><code>rettype</code></em> :</span></p></td>
235 <td>a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> for the return type of the function
239 <td><p><span class="term"><em class="parameter"><code>n_types</code></em> :</span></p></td>
240 <td>number of function parameters
244 <td><p><span class="term"><em class="parameter"><code>types</code></em> :</span></p></td>
245 <td>a C array of GTypes values
252 <div class="refsect1" title="See Also">
253 <a name="dbus-glib-dbus-gobject.see-also"></a><h2>See Also</h2>
254 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
259 Generated by GTK-Doc V1.15</div>