1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>DBus GObject related functions</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
7
<link rel="start" 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.6 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="ch01.html" title="Introduction">
14
<link rel="chapter" href="ch02.html" title="API Reference">
15
<link rel="chapter" href="ch03.html" title="Tools Reference">
17
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
18
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
20
<td><a accesskey="p" href="dbus-glib-DBusGConnection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
21
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
22
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
23
<th width="100%" align="center">D-Bus GLib bindings - Reference Manual</th>
24
<td><a accesskey="n" href="dbus-glib-DBusGMessage.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
26
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
28
<a href="#desc" class="shortcut">Description</a></nobr></td></tr>
30
<div class="refentry" lang="en">
31
<a name="dbus-glib-DBus-GObject-related-functions"></a><div class="titlepage"></div>
32
<div class="refnamediv"><table width="100%"><tr>
34
<h2><span class="refentrytitle"><a name="top_of_page"></a>DBus GObject related functions</span></h2>
35
<p>DBus GObject related functions — Exporting a <span class="type">GObject</span> remotely</p>
37
<td valign="top" align="right"></td>
39
<div class="refsect1" lang="en">
40
<a name="id2528778"></a><h2>Stability Level</h2>
41
Stable, unless otherwise indicated
43
<div class="refsynopsisdiv">
44
<a name="synopsis"></a><h2>Synopsis</h2>
45
<pre class="synopsis">
49
#define <a href="dbus-glib-DBus-GObject-related-functions.html#DBUS-TYPE-G-OBJECT-PATH:CAPS">DBUS_TYPE_G_OBJECT_PATH</a>
50
<a href="dbus-glib-DBus-GObject-related-functions.html#DBusGObjectInfo">DBusGObjectInfo</a>;
51
void <a href="dbus-glib-DBus-GObject-related-functions.html#dbus-g-object-type-install-info">dbus_g_object_type_install_info</a> (GType object_type,
52
const <a href="dbus-glib-DBus-GObject-related-functions.html#DBusGObjectInfo">DBusGObjectInfo</a> *info);
53
GType <a href="dbus-glib-DBus-GObject-related-functions.html#dbus-g-object-path-get-g-type">dbus_g_object_path_get_g_type</a> (void);
54
void <a href="dbus-glib-DBus-GObject-related-functions.html#dbus-g-object-register-marshaller">dbus_g_object_register_marshaller</a>
55
(GClosureMarshal marshaller,
58
void <a href="dbus-glib-DBus-GObject-related-functions.html#dbus-g-object-register-marshaller-array">dbus_g_object_register_marshaller_array</a>
59
(GClosureMarshal marshaller,
65
<div class="refsect1" lang="en">
66
<a name="desc"></a><h2>Description</h2>
73
<div class="refsect1" lang="en">
74
<a name="details"></a><h2>Details</h2>
75
<div class="refsect2" lang="en">
76
<a name="id2546508"></a><h3>
77
<a name="DBUS-TYPE-G-OBJECT-PATH:CAPS"></a>DBUS_TYPE_G_OBJECT_PATH</h3>
78
<a class="indexterm" name="id2543352"></a><pre class="programlisting">#define DBUS_TYPE_G_OBJECT_PATH (dbus_g_object_path_get_g_type ())
85
<div class="refsect2" lang="en">
86
<a name="id2543368"></a><h3>
87
<a name="DBusGObjectInfo"></a>DBusGObjectInfo</h3>
88
<a class="indexterm" name="id2543380"></a><pre class="programlisting">typedef struct {
91
const DBusGMethodInfo *method_infos;
94
const char *exported_signals;
95
const char *exported_properties;
99
Introspection data for a <span class="type">GObject</span>, normally autogenerated by
100
a tool such as <a href="dbus-binding-tool.html" title="dbus-binding-tool"><span class="type">dbus-binding-tool</span></a>.</p>
104
<div class="variablelist"><table border="0">
105
<col align="left" valign="top">
109
<span class="term">int <em class="structfield"><code>format_version</code></em>;</span></td>
110
<td> Allows us to change the rest of this struct
111
by adding DBusGObjectInfo2, DBusGObjectInfo3, etc.
116
<span class="term">const <a href="dbus-glib-DBusGMethod.html#DBusGMethodInfo">DBusGMethodInfo</a> *<em class="structfield"><code>method_infos</code></em>;</span></td>
117
<td> Array of method pointers
122
<span class="term">int <em class="structfield"><code>n_method_infos</code></em>;</span></td>
123
<td> Length of the infos array
128
<span class="term">const char *<em class="structfield"><code>data</code></em>;</span></td>
129
<td> Introspection data
134
<span class="term">const char *<em class="structfield"><code>exported_signals</code></em>;</span></td>
135
<td> Exported signals
140
<span class="term">const char *<em class="structfield"><code>exported_properties</code></em>;</span></td>
141
<td> Exported properties
148
<div class="refsect2" lang="en">
149
<a name="id2528288"></a><h3>
150
<a name="dbus-g-object-type-install-info"></a>dbus_g_object_type_install_info ()</h3>
151
<a class="indexterm" name="id2528302"></a><pre class="programlisting">void dbus_g_object_type_install_info (GType object_type,
152
const <a href="dbus-glib-DBus-GObject-related-functions.html#DBusGObjectInfo">DBusGObjectInfo</a> *info);</pre>
154
Install introspection information about the given object <span class="type">GType</span>
155
sufficient to allow methods on the object to be invoked by name.
156
The introspection information is normally generated by
157
dbus-glib-tool, then this function is called in the
158
<code class="function">class_init()</code> for the object class.
161
Once introspection information has been installed, instances of the
162
object registered with #<a href="dbus-glib-DBusGConnection.html#dbus-g-connection-register-g-object"><code class="function">dbus_g_connection_register_g_object()</code></a> can have
163
their methods invoked remotely.</p>
167
<div class="variablelist"><table border="0">
168
<col align="left" valign="top">
172
<span class="term"><em class="parameter"><code>object_type</code></em> :</span></td>
173
<td> <span class="type">GType</span> for the object
178
<span class="term"><em class="parameter"><code>info</code></em> :</span></td>
179
<td> introspection data generated by <span class="type">dbus-glib-tool</span>
186
<div class="refsect2" lang="en">
187
<a name="id2528424"></a><h3>
188
<a name="dbus-g-object-path-get-g-type"></a>dbus_g_object_path_get_g_type ()</h3>
189
<a class="indexterm" name="id2528437"></a><pre class="programlisting">GType dbus_g_object_path_get_g_type (void);</pre>
193
<div class="variablelist"><table border="0">
194
<col align="left" valign="top">
197
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
206
<div class="refsect2" lang="en">
207
<a name="id2528474"></a><h3>
208
<a name="dbus-g-object-register-marshaller"></a>dbus_g_object_register_marshaller ()</h3>
209
<a class="indexterm" name="id2528488"></a><pre class="programlisting">void dbus_g_object_register_marshaller
210
(GClosureMarshal marshaller,
214
Register a <span class="type">GClosureMarshal</span> to be used for signal invocations,
215
giving its return type and a list of parameter types,
216
followed by <code class="literal">G_TYPE_INVALID</code>.
219
This function will not be needed once GLib includes libffi.</p>
223
<div class="variablelist"><table border="0">
224
<col align="left" valign="top">
228
<span class="term"><em class="parameter"><code>marshaller</code></em> :</span></td>
229
<td> a GClosureMarshal to be used for invocation
234
<span class="term"><em class="parameter"><code>rettype</code></em> :</span></td>
235
<td> a GType for the return type of the function
236
@:... The parameter <span class="type">GTypes</span>, followed by <code class="literal">G_TYPE_INVALID</code>
241
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
251
<div class="refsect2" lang="en">
252
<a name="id2545583"></a><h3>
253
<a name="dbus-g-object-register-marshaller-array"></a>dbus_g_object_register_marshaller_array ()</h3>
254
<a class="indexterm" name="id2545596"></a><pre class="programlisting">void dbus_g_object_register_marshaller_array
255
(GClosureMarshal marshaller,
258
const GType *types);</pre>
260
Register a <span class="type">GClosureMarshal</span> to be used for signal invocations.
261
<em class="parameter"><code>see_also</code></em> <a href="dbus-glib-DBus-GObject-related-functions.html#dbus-g-object-register-marshaller"><span class="type">dbus_g_object_register_marshaller</span></a></p>
265
<div class="variablelist"><table border="0">
266
<col align="left" valign="top">
270
<span class="term"><em class="parameter"><code>marshaller</code></em> :</span></td>
271
<td> a <span class="type">GClosureMarshal</span> to be used for invocation
276
<span class="term"><em class="parameter"><code>rettype</code></em> :</span></td>
277
<td> a <span class="type">GType</span> for the return type of the function
282
<span class="term"><em class="parameter"><code>n_types</code></em> :</span></td>
283
<td> number of function parameters
288
<span class="term"><em class="parameter"><code>types</code></em> :</span></td>
289
<td> a C array of GTypes values
296
<div class="refsect1" lang="en">
297
<a name="id2560700"></a><h2>See Also</h2>
298
<span class="type">GObject</span>