~ubuntu-branches/ubuntu/quantal/dbus-glib/quantal

« back to all changes in this revision

Viewing changes to doc/reference/html/dbus-glib-DBusGMethod.html

  • Committer: Package Import Robot
  • Author(s): Simon McVittie
  • Date: 2012-06-25 18:25:27 UTC
  • mfrom: (2.1.17 sid)
  • Revision ID: package-import@ubuntu.com-20120625182527-4427g7sb4bietikt
Tags: 0.100-1
* Update dbus-daemon introspection (from dbus 1.6.2)
* New upstream version
  - fixes the build with -Werror=format-security (patch from Ubuntu)
* Include /usr/share/dpkg/default.mk for recommended build flags

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html>
3
 
<head>
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">
13
 
</head>
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">
16
 
<tr valign="middle">
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>
22
 
</tr>
23
 
<tr><td colspan="5" class="shortcuts">
24
 
<a href="#dbus-glib-DBusGMethod.synopsis" class="shortcut">Top</a>
25
 
                   | 
26
 
                  <a href="#dbus-glib-DBusGMethod.description" class="shortcut">Description</a>
27
 
</td></tr>
28
 
</table>
29
 
<div class="refentry">
30
 
<a name="dbus-glib-DBusGMethod"></a><div class="titlepage"></div>
31
 
<div class="refnamediv"><table width="100%"><tr>
32
 
<td valign="top">
33
 
<h2><span class="refentrytitle"><a name="dbus-glib-DBusGMethod.top_of_page"></a>DBusGMethod</span></h2>
34
 
<p>DBusGMethod — GMethod Info &amp; Invocation</p>
35
 
</td>
36
 
<td valign="top" align="right"></td>
37
 
</tr></table></div>
38
 
<div class="refsect1">
39
 
<a name="dbus-glib-DBusGMethod.stability-level"></a><h2>Stability Level</h2>
40
 
Stable, unless otherwise indicated
41
 
</div>
42
 
<div class="refsynopsisdiv">
43
 
<a name="dbus-glib-DBusGMethod.synopsis"></a><h2>Synopsis</h2>
44
 
<pre class="synopsis">
45
 
#include &lt;dbus/dbus-glib.h&gt;
46
 
 
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>);
57
 
</pre>
58
 
</div>
59
 
<div class="refsect1">
60
 
<a name="dbus-glib-DBusGMethod.description"></a><h2>Description</h2>
61
 
<p>
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.
63
 
</p>
64
 
</div>
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 {
70
 
  GCallback                 function;    
71
 
  GClosureMarshal           marshaller;  
72
 
  int                       data_offset; 
73
 
};
74
 
</pre>
75
 
<p>
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.
79
 
</p>
80
 
<div class="variablelist"><table border="0">
81
 
<col align="left" valign="top">
82
 
<tbody>
83
 
<tr>
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>
86
 
</tr>
87
 
<tr>
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>
90
 
</tr>
91
 
<tr>
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>
94
 
</tr>
95
 
</tbody>
96
 
</table></div>
97
 
</div>
98
 
<hr>
99
 
<div class="refsect2">
100
 
<a name="DBusGMethodInvocation"></a><h3>DBusGMethodInvocation</h3>
101
 
<pre class="programlisting">typedef struct _DBusGMethodInvocation DBusGMethodInvocation;</pre>
102
 
<p>
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>.
105
 
</p>
106
 
</div>
107
 
<hr>
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>
111
 
<p>
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
115
 
later time).
116
 
</p>
117
 
<div class="variablelist"><table border="0">
118
 
<col align="left" valign="top">
119
 
<tbody>
120
 
<tr>
121
 
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
122
 
<td>the method context</td>
123
 
</tr>
124
 
<tr>
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>
128
 
</tr>
129
 
</tbody>
130
 
</table></div>
131
 
</div>
132
 
<hr>
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>
136
 
<p>
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
140
 
</p>
141
 
<div class="variablelist"><table border="0">
142
 
<col align="left" valign="top">
143
 
<tbody>
144
 
<tr>
145
 
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
146
 
<td>the method context</td>
147
 
</tr>
148
 
<tr>
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>
151
 
</tr>
152
 
</tbody>
153
 
</table></div>
154
 
</div>
155
 
<hr>
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>
160
 
<p>
161
 
Send a manually created reply message.
162
 
</p>
163
 
<p>
164
 
Used as a sidedoor when you can't generate dbus values
165
 
of the correct type due to glib binding limitations
166
 
</p>
167
 
<div class="variablelist"><table border="0">
168
 
<col align="left" valign="top">
169
 
<tbody>
170
 
<tr>
171
 
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
172
 
<td>the method context</td>
173
 
</tr>
174
 
<tr>
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>
177
 
</tr>
178
 
</tbody>
179
 
</table></div>
180
 
</div>
181
 
<hr>
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>
186
 
<p>
187
 
Send a return message for a given method invocation, with arguments.
188
 
This function also frees the sending context.
189
 
</p>
190
 
<div class="variablelist"><table border="0">
191
 
<col align="left" valign="top">
192
 
<tbody>
193
 
<tr>
194
 
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
195
 
<td>the method context</td>
196
 
</tr>
197
 
<tr>
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>
201
 
</td>
202
 
</tr>
203
 
</tbody>
204
 
</table></div>
205
 
</div>
206
 
<hr>
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>
211
 
<p>
212
 
Send a error message for a given method invocation.
213
 
This function also frees the sending context.
214
 
</p>
215
 
<div class="variablelist"><table border="0">
216
 
<col align="left" valign="top">
217
 
<tbody>
218
 
<tr>
219
 
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
220
 
<td>the method context</td>
221
 
</tr>
222
 
<tr>
223
 
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
224
 
<td>the error to send</td>
225
 
</tr>
226
 
</tbody>
227
 
</table></div>
228
 
</div>
229
 
</div>
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>
233
 
</div>
234
 
</div>
235
 
<div class="footer">
236
 
<hr>
237
 
          Generated by GTK-Doc V1.18</div>
238
 
</body>
239
 
</html>
 
 
b'\\ No newline at end of file'