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>DBusGMethod</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-DBusGMessage.html" title="DBusGMessage">
10
<link rel="next" href="dbus-glib-DBusGError.html" title="DBusGError">
11
<meta name="generator" content="GTK-Doc V1.18 (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-DBusGMessage.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-DBusGError.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-DBusGMethod.synopsis" class="shortcut">Top</a>
26
<a href="#dbus-glib-DBusGMethod.description" class="shortcut">Description</a>
29
<div class="refentry">
30
<a name="dbus-glib-DBusGMethod"></a><div class="titlepage"></div>
31
<div class="refnamediv"><table width="100%"><tr>
33
<h2><span class="refentrytitle"><a name="dbus-glib-DBusGMethod.top_of_page"></a>DBusGMethod</span></h2>
34
<p>DBusGMethod — GMethod Info & Invocation</p>
36
<td valign="top" align="right"></td>
38
<div class="refsect1">
39
<a name="dbus-glib-DBusGMethod.stability-level"></a><h2>Stability Level</h2>
40
Stable, unless otherwise indicated
42
<div class="refsynopsisdiv">
43
<a name="dbus-glib-DBusGMethod.synopsis"></a><h2>Synopsis</h2>
44
<pre class="synopsis">
45
#include <dbus/dbus-glib.h>
47
struct <a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInfo" title="struct DBusGMethodInfo">DBusGMethodInfo</a>;
48
<a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation">DBusGMethodInvocation</a>;
49
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="dbus-glib-DBusGMethod.html#dbus-g-method-get-sender" title="dbus_g_method_get_sender ()">dbus_g_method_get_sender</a> (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>);
50
<span class="returnvalue">DBusMessage</span> * <a class="link" href="dbus-glib-DBusGMethod.html#dbus-g-method-get-reply" title="dbus_g_method_get_reply ()">dbus_g_method_get_reply</a> (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>);
51
<span class="returnvalue">void</span> <a class="link" href="dbus-glib-DBusGMethod.html#dbus-g-method-send-reply" title="dbus_g_method_send_reply ()">dbus_g_method_send_reply</a> (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>,
52
<em class="parameter"><code><span class="type">DBusMessage</span> *reply</code></em>);
53
<span class="returnvalue">void</span> <a class="link" href="dbus-glib-DBusGMethod.html#dbus-g-method-return" title="dbus_g_method_return ()">dbus_g_method_return</a> (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>,
54
<em class="parameter"><code>...</code></em>);
55
<span class="returnvalue">void</span> <a class="link" href="dbus-glib-DBusGMethod.html#dbus-g-method-return-error" title="dbus_g_method_return_error ()">dbus_g_method_return_error</a> (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>,
56
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);
59
<div class="refsect1">
60
<a name="dbus-glib-DBusGMethod.description"></a><h2>Description</h2>
62
These types are used to call methods on <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> objects.
65
<div class="refsect1">
66
<a name="dbus-glib-DBusGMethod.details"></a><h2>Details</h2>
67
<div class="refsect2">
68
<a name="DBusGMethodInfo"></a><h3>struct DBusGMethodInfo</h3>
69
<pre class="programlisting">struct DBusGMethodInfo {
71
GClosureMarshal marshaller;
76
Object typically generated by <a class="link" href="dbus-binding-tool.html" title="dbus-binding-tool"><span class="type">dbus-binding-tool</span></a> that
77
stores a mapping from introspection data to a
78
function pointer for a C method to be invoked.
80
<div class="variablelist"><table border="0">
81
<col align="left" valign="top">
84
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> <em class="structfield"><code><a name="DBusGMethodInfo.function"></a>function</code></em>;</span></p></td>
85
<td>C method to invoke</td>
88
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#GClosureMarshal"><span class="type">GClosureMarshal</span></a> <em class="structfield"><code><a name="DBusGMethodInfo.marshaller"></a>marshaller</code></em>;</span></p></td>
89
<td>Marshaller to invoke method</td>
92
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/gnutls/gnutls-crypto.html#int"><span class="type">int</span></a> <em class="structfield"><code><a name="DBusGMethodInfo.data-offset"></a>data_offset</code></em>;</span></p></td>
93
<td>Offset into the introspection data</td>
99
<div class="refsect2">
100
<a name="DBusGMethodInvocation"></a><h3>DBusGMethodInvocation</h3>
101
<pre class="programlisting">typedef struct _DBusGMethodInvocation DBusGMethodInvocation;</pre>
103
The context of an asynchronous method call. See <a class="link" href="dbus-glib-DBusGMethod.html#dbus-g-method-return" title="dbus_g_method_return ()"><code class="function">dbus_g_method_return()</code></a> and
104
<a class="link" href="dbus-glib-DBusGMethod.html#dbus-g-method-return-error" title="dbus_g_method_return_error ()"><code class="function">dbus_g_method_return_error()</code></a>.
108
<div class="refsect2">
109
<a name="dbus-g-method-get-sender"></a><h3>dbus_g_method_get_sender ()</h3>
110
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * dbus_g_method_get_sender (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>);</pre>
112
Get the sender of a message so we can send a
113
"reply" later (i.e. send a message directly
114
to a service which invoked the method at a
117
<div class="variablelist"><table border="0">
118
<col align="left" valign="top">
121
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
122
<td>the method context</td>
125
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
126
<td>the unique name of the sender. It
127
is up to the caller to free the returned string.</td>
133
<div class="refsect2">
134
<a name="dbus-g-method-get-reply"></a><h3>dbus_g_method_get_reply ()</h3>
135
<pre class="programlisting"><span class="returnvalue">DBusMessage</span> * dbus_g_method_get_reply (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>);</pre>
137
Get the reply message to append reply values
138
Used as a sidedoor when you can't generate dbus values
139
of the correct type due to glib binding limitations
141
<div class="variablelist"><table border="0">
142
<col align="left" valign="top">
145
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
146
<td>the method context</td>
149
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
150
<td>a <span class="type">DBusMessage</span> with the reply</td>
156
<div class="refsect2">
157
<a name="dbus-g-method-send-reply"></a><h3>dbus_g_method_send_reply ()</h3>
158
<pre class="programlisting"><span class="returnvalue">void</span> dbus_g_method_send_reply (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>,
159
<em class="parameter"><code><span class="type">DBusMessage</span> *reply</code></em>);</pre>
161
Send a manually created reply message.
164
Used as a sidedoor when you can't generate dbus values
165
of the correct type due to glib binding limitations
167
<div class="variablelist"><table border="0">
168
<col align="left" valign="top">
171
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
172
<td>the method context</td>
175
<td><p><span class="term"><em class="parameter"><code>reply</code></em> :</span></p></td>
176
<td>the reply message, will be unreffed</td>
182
<div class="refsect2">
183
<a name="dbus-g-method-return"></a><h3>dbus_g_method_return ()</h3>
184
<pre class="programlisting"><span class="returnvalue">void</span> dbus_g_method_return (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>,
185
<em class="parameter"><code>...</code></em>);</pre>
187
Send a return message for a given method invocation, with arguments.
188
This function also frees the sending context.
190
<div class="variablelist"><table border="0">
191
<col align="left" valign="top">
194
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
195
<td>the method context</td>
198
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
199
<td>zero or more values to return from the method, with their number
200
and types given by its <a class="link" href="dbus-glib-DBus-GObject-related-functions.html#DBusGObjectInfo" title="struct DBusGObjectInfo"><span class="type">DBusGObjectInfo</span></a>
207
<div class="refsect2">
208
<a name="dbus-g-method-return-error"></a><h3>dbus_g_method_return_error ()</h3>
209
<pre class="programlisting"><span class="returnvalue">void</span> dbus_g_method_return_error (<em class="parameter"><code><a class="link" href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation" title="DBusGMethodInvocation"><span class="type">DBusGMethodInvocation</span></a> *context</code></em>,
210
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre>
212
Send a error message for a given method invocation.
213
This function also frees the sending context.
215
<div class="variablelist"><table border="0">
216
<col align="left" valign="top">
219
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
220
<td>the method context</td>
223
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
224
<td>the error to send</td>
230
<div class="refsect1">
231
<a name="dbus-glib-DBusGMethod.see-also"></a><h2>See Also</h2>
232
<a class="link" href="dbus-glib-DBusGMessage.html#DBusGMessage" title="DBusGMessage"><span class="type">DBusGMessage</span></a>
237
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'