~ubuntu-branches/ubuntu/natty/gnome-vfs/natty

« back to all changes in this revision

Viewing changes to doc/html/gnome-vfs-2.0-gnome-vfs-module-callback.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-03-17 16:12:58 UTC
  • mfrom: (0.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090317161258-px3a2czt9g2ktjz3
Tags: 1:2.24.1-0ubuntu1
New upstream version

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>gnome-vfs-module-callback</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
 
7
<link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
 
8
<link rel="up" href="modules.html" title="Filesystem Modules">
 
9
<link rel="prev" href="gnome-vfs-2.0-gnome-vfs-standard-callbacks.html" title="gnome-vfs-standard-callbacks">
 
10
<meta name="generator" content="GTK-Doc V1.12 (XML mode)">
 
11
<link rel="stylesheet" href="style.css" type="text/css">
 
12
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
 
13
<link rel="chapter" href="data-types.html" title="Basic Data Types">
 
14
<link rel="chapter" href="gnome-vfs-basic-file-ops.html" title="File Operations">
 
15
<link rel="chapter" href="gnome-vfs-directory-ops.html" title="Directory-Specific Operations">
 
16
<link rel="chapter" href="gnome-vfs-file-and-dirs-ops.html" title="Advanced File/Directory Operations">
 
17
<link rel="chapter" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
 
18
<link rel="chapter" href="volumes.html" title="Volumes and Drives Handling">
 
19
<link rel="chapter" href="networking.html" title="Networking">
 
20
<link rel="chapter" href="mime-registry.html" title="MIME Registry">
 
21
<link rel="chapter" href="modules.html" title="Filesystem Modules">
 
22
</head>
 
23
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
24
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
25
<tr valign="middle">
 
26
<td><a accesskey="p" href="gnome-vfs-2.0-gnome-vfs-standard-callbacks.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
27
<td><a accesskey="u" href="modules.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
28
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
29
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
 
30
<td> </td>
 
31
</tr>
 
32
<tr><td colspan="5" class="shortcuts">
 
33
<a href="#gnome-vfs-2.0-gnome-vfs-module-callback.synopsis" class="shortcut">Top</a>
 
34
                   | 
 
35
                  <a href="#gnome-vfs-2.0-gnome-vfs-module-callback.description" class="shortcut">Description</a>
 
36
</td></tr>
 
37
</table>
 
38
<div class="refentry" lang="en">
 
39
<a name="gnome-vfs-2.0-gnome-vfs-module-callback"></a><div class="titlepage"></div>
 
40
<div class="refnamediv"><table width="100%"><tr>
 
41
<td valign="top">
 
42
<h2><span class="refentrytitle"><a name="gnome-vfs-2.0-gnome-vfs-module-callback.top_of_page"></a>gnome-vfs-module-callback</span></h2>
 
43
<p>gnome-vfs-module-callback — functions used by apps if they want to answer to callback invocations by gnome-vfs modules</p>
 
44
</td>
 
45
<td valign="top" align="right"></td>
 
46
</tr></table></div>
 
47
<div class="refsynopsisdiv">
 
48
<a name="gnome-vfs-2.0-gnome-vfs-module-callback.synopsis"></a><h2>Synopsis</h2>
 
49
<pre class="synopsis">
 
50
void                (<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallback" title="GnomeVFSModuleCallback ()">*GnomeVFSModuleCallback</a>)           (gconstpointer in,
 
51
                                                         gsize in_size,
 
52
                                                         gpointer out,
 
53
                                                         gsize out_size,
 
54
                                                         gpointer callback_data);
 
55
void                (<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallbackResponse" title="GnomeVFSModuleCallbackResponse ()">*GnomeVFSModuleCallbackResponse</a>)   (gpointer response_data);
 
56
void                (<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSAsyncModuleCallback" title="GnomeVFSAsyncModuleCallback ()">*GnomeVFSAsyncModuleCallback</a>)      (gconstpointer in,
 
57
                                                         gsize in_size,
 
58
                                                         gpointer out,
 
59
                                                         gsize out_size,
 
60
                                                         gpointer callback_data,
 
61
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallbackResponse" title="GnomeVFSModuleCallbackResponse ()">GnomeVFSModuleCallbackResponse</a> response,
 
62
                                                         gpointer response_data);
 
63
void                <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-module-callback-set-default" title="gnome_vfs_module_callback_set_default ()">gnome_vfs_module_callback_set_default</a>
 
64
                                                        (const char *callback_name,
 
65
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallback" title="GnomeVFSModuleCallback ()">GnomeVFSModuleCallback</a> callback,
 
66
                                                         gpointer callback_data,
 
67
                                                         GDestroyNotify destroy_notify);
 
68
void                <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-module-callback-push" title="gnome_vfs_module_callback_push ()">gnome_vfs_module_callback_push</a>      (const char *callback_name,
 
69
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallback" title="GnomeVFSModuleCallback ()">GnomeVFSModuleCallback</a> callback,
 
70
                                                         gpointer callback_data,
 
71
                                                         GDestroyNotify destroy_notify);
 
72
void                <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-module-callback-pop" title="gnome_vfs_module_callback_pop ()">gnome_vfs_module_callback_pop</a>       (const char *callback_name);
 
73
void                <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-set-default" title="gnome_vfs_async_module_callback_set_default ()">gnome_vfs_async_module_callback_set_default</a>
 
74
                                                        (const char *callback_name,
 
75
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSAsyncModuleCallback" title="GnomeVFSAsyncModuleCallback ()">GnomeVFSAsyncModuleCallback</a> callback,
 
76
                                                         gpointer callback_data,
 
77
                                                         GDestroyNotify destroy_notify);
 
78
void                <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-push" title="gnome_vfs_async_module_callback_push ()">gnome_vfs_async_module_callback_push</a>
 
79
                                                        (const char *callback_name,
 
80
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSAsyncModuleCallback" title="GnomeVFSAsyncModuleCallback ()">GnomeVFSAsyncModuleCallback</a> callback,
 
81
                                                         gpointer callback_data,
 
82
                                                         GDestroyNotify destroy_notify);
 
83
void                <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-pop" title="gnome_vfs_async_module_callback_pop ()">gnome_vfs_async_module_callback_pop</a> (const char *callback_name);
 
84
</pre>
 
85
</div>
 
86
<div class="refsect1" lang="en">
 
87
<a name="gnome-vfs-2.0-gnome-vfs-module-callback.description"></a><h2>Description</h2>
 
88
<p>
 
89
</p>
 
90
</div>
 
91
<div class="refsect1" lang="en">
 
92
<a name="gnome-vfs-2.0-gnome-vfs-module-callback.details"></a><h2>Details</h2>
 
93
<div class="refsect2" lang="en">
 
94
<a name="GnomeVFSModuleCallback"></a><h3>GnomeVFSModuleCallback ()</h3>
 
95
<pre class="programlisting">void                (*GnomeVFSModuleCallback)           (gconstpointer in,
 
96
                                                         gsize in_size,
 
97
                                                         gpointer out,
 
98
                                                         gsize out_size,
 
99
                                                         gpointer callback_data);</pre>
 
100
<p>
 
101
Modules use a <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallback" title="GnomeVFSModuleCallback ()"><span class="type">GnomeVFSModuleCallback</span></a> to send data to
 
102
client applications and request data from them synchronously.
 
103
</p>
 
104
<p>
 
105
The format of <em class="parameter"><code>in</code></em> and <em class="parameter"><code>out</code></em> is determined by the callback name.</p>
 
106
<p>
 
107
</p>
 
108
<div class="variablelist"><table border="0">
 
109
<col align="left" valign="top">
 
110
<tbody>
 
111
<tr>
 
112
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
 
113
<td> data passed from module to application.
 
114
</td>
 
115
</tr>
 
116
<tr>
 
117
<td><p><span class="term"><em class="parameter"><code>in_size</code></em> :</span></p></td>
 
118
<td> size of <em class="parameter"><code>in</code></em> bytes.
 
119
</td>
 
120
</tr>
 
121
<tr>
 
122
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
 
123
<td> data passed from application to module.
 
124
</td>
 
125
</tr>
 
126
<tr>
 
127
<td><p><span class="term"><em class="parameter"><code>out_size</code></em> :</span></p></td>
 
128
<td> size of <em class="parameter"><code>out</code></em> in bytes.
 
129
</td>
 
130
</tr>
 
131
<tr>
 
132
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
 
133
<td> user data passed when connecting the callback.
 
134
</td>
 
135
</tr>
 
136
</tbody>
 
137
</table></div>
 
138
</div>
 
139
<hr>
 
140
<div class="refsect2" lang="en">
 
141
<a name="GnomeVFSModuleCallbackResponse"></a><h3>GnomeVFSModuleCallbackResponse ()</h3>
 
142
<pre class="programlisting">void                (*GnomeVFSModuleCallbackResponse)   (gpointer response_data);</pre>
 
143
<p>
 
144
This is the type of the response function passed to a
 
145
<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSAsyncModuleCallback" title="GnomeVFSAsyncModuleCallback ()"><code class="function">GnomeVFSAsyncModuleCallback()</code></a>. It should be called when the async
 
146
callback has completed.</p>
 
147
<p>
 
148
</p>
 
149
<div class="variablelist"><table border="0">
 
150
<col align="left" valign="top">
 
151
<tbody><tr>
 
152
<td><p><span class="term"><em class="parameter"><code>response_data</code></em> :</span></p></td>
 
153
<td> pass the response data argument originally passed to the async callback.
 
154
</td>
 
155
</tr></tbody>
 
156
</table></div>
 
157
</div>
 
158
<hr>
 
159
<div class="refsect2" lang="en">
 
160
<a name="GnomeVFSAsyncModuleCallback"></a><h3>GnomeVFSAsyncModuleCallback ()</h3>
 
161
<pre class="programlisting">void                (*GnomeVFSAsyncModuleCallback)      (gconstpointer in,
 
162
                                                         gsize in_size,
 
163
                                                         gpointer out,
 
164
                                                         gsize out_size,
 
165
                                                         gpointer callback_data,
 
166
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallbackResponse" title="GnomeVFSModuleCallbackResponse ()">GnomeVFSModuleCallbackResponse</a> response,
 
167
                                                         gpointer response_data);</pre>
 
168
<p>
 
169
Modules use a <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallback" title="GnomeVFSModuleCallback ()"><span class="type">GnomeVFSModuleCallback</span></a> to send data to
 
170
client applications and request data from them asynchronously.
 
171
</p>
 
172
<p>
 
173
The application is expected to invoke the <em class="parameter"><code>response</code></em> with <em class="parameter"><code>response_data</code></em>
 
174
when it is able to satisfy the request.
 
175
</p>
 
176
<p>
 
177
The format of <em class="parameter"><code>in</code></em> and <em class="parameter"><code>out</code></em> is determined by the callback name.</p>
 
178
<p>
 
179
</p>
 
180
<div class="variablelist"><table border="0">
 
181
<col align="left" valign="top">
 
182
<tbody>
 
183
<tr>
 
184
<td><p><span class="term"><em class="parameter"><code>in</code></em> :</span></p></td>
 
185
<td> data passed from module to application.
 
186
</td>
 
187
</tr>
 
188
<tr>
 
189
<td><p><span class="term"><em class="parameter"><code>in_size</code></em> :</span></p></td>
 
190
<td> size of <em class="parameter"><code>in</code></em> bytes.
 
191
</td>
 
192
</tr>
 
193
<tr>
 
194
<td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
 
195
<td> data passed from application to module.
 
196
</td>
 
197
</tr>
 
198
<tr>
 
199
<td><p><span class="term"><em class="parameter"><code>out_size</code></em> :</span></p></td>
 
200
<td> size of <em class="parameter"><code>out</code></em> in bytes.
 
201
</td>
 
202
</tr>
 
203
<tr>
 
204
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
 
205
<td> user data passed when connecting the callback.
 
206
</td>
 
207
</tr>
 
208
<tr>
 
209
<td><p><span class="term"><em class="parameter"><code>response</code></em> :</span></p></td>
 
210
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallbackResponse" title="GnomeVFSModuleCallbackResponse ()"><span class="type">GnomeVFSModuleCallbackResponse</span></a> that must be invoked when the request is satisfied.
 
211
</td>
 
212
</tr>
 
213
<tr>
 
214
<td><p><span class="term"><em class="parameter"><code>response_data</code></em> :</span></p></td>
 
215
<td> data that must be passed to <em class="parameter"><code>response</code></em> when the request is satisfied.
 
216
</td>
 
217
</tr>
 
218
</tbody>
 
219
</table></div>
 
220
</div>
 
221
<hr>
 
222
<div class="refsect2" lang="en">
 
223
<a name="gnome-vfs-module-callback-set-default"></a><h3>gnome_vfs_module_callback_set_default ()</h3>
 
224
<pre class="programlisting">void                gnome_vfs_module_callback_set_default
 
225
                                                        (const char *callback_name,
 
226
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallback" title="GnomeVFSModuleCallback ()">GnomeVFSModuleCallback</a> callback,
 
227
                                                         gpointer callback_data,
 
228
                                                         GDestroyNotify destroy_notify);</pre>
 
229
<p>
 
230
Set the default callback for <em class="parameter"><code>callback_name</code></em> to
 
231
<em class="parameter"><code>callback</code></em>. <em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em> on the
 
232
same thread as the gnome-vfs operation that invokes it. The default
 
233
value is shared for all threads, but setting it is thread-safe.
 
234
</p>
 
235
<p>
 
236
Use this function if you want to set a handler to be used by your
 
237
whole application. You can use <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-module-callback-push" title="gnome_vfs_module_callback_push ()"><code class="function">gnome_vfs_module_callback_push()</code></a> to
 
238
set a callback function that will temporarily override the default
 
239
on the current thread instead. Or you can also use
 
240
<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-set-default" title="gnome_vfs_async_module_callback_set_default ()"><code class="function">gnome_vfs_async_module_callback_set_default()</code></a> to set an async
 
241
callback function.
 
242
</p>
 
243
<p>
 
244
Note: <em class="parameter"><code>destroy_notify</code></em> may be called on any thread - it is not
 
245
guaranteed to be called on the main thread.</p>
 
246
<p>
 
247
</p>
 
248
<div class="variablelist"><table border="0">
 
249
<col align="left" valign="top">
 
250
<tbody>
 
251
<tr>
 
252
<td><p><span class="term"><em class="parameter"><code>callback_name</code></em> :</span></p></td>
 
253
<td> name of the module callback to set.
 
254
</td>
 
255
</tr>
 
256
<tr>
 
257
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
 
258
<td> function to call when the <em class="parameter"><code>callback</code></em> is invoked.
 
259
</td>
 
260
</tr>
 
261
<tr>
 
262
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
 
263
<td> data to pass to <em class="parameter"><code>callback</code></em>.
 
264
</td>
 
265
</tr>
 
266
<tr>
 
267
<td><p><span class="term"><em class="parameter"><code>destroy_notify</code></em> :</span></p></td>
 
268
<td> function to call when <em class="parameter"><code>callback_data</code></em> is to be freed.
 
269
</td>
 
270
</tr>
 
271
</tbody>
 
272
</table></div>
 
273
</div>
 
274
<hr>
 
275
<div class="refsect2" lang="en">
 
276
<a name="gnome-vfs-module-callback-push"></a><h3>gnome_vfs_module_callback_push ()</h3>
 
277
<pre class="programlisting">void                gnome_vfs_module_callback_push      (const char *callback_name,
 
278
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSModuleCallback" title="GnomeVFSModuleCallback ()">GnomeVFSModuleCallback</a> callback,
 
279
                                                         gpointer callback_data,
 
280
                                                         GDestroyNotify destroy_notify);</pre>
 
281
<p>
 
282
Set <em class="parameter"><code>callback</code></em> as a temprary handler for <em class="parameter"><code>callback_name</code></em>. <em class="parameter"><code>callback</code></em>
 
283
will be called with <em class="parameter"><code>callback_data</code></em> on the same thread as the
 
284
gnome-vfs operation that invokes it. The temporary handler is set
 
285
per-thread.
 
286
</p>
 
287
<p>
 
288
<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-module-callback-pop" title="gnome_vfs_module_callback_pop ()"><code class="function">gnome_vfs_module_callback_pop()</code></a> removes the most recently set
 
289
temporary handler. The temporary handlers are treated as a first-in
 
290
first-out stack.
 
291
</p>
 
292
<p>
 
293
Use this function to set a temporary callback handler for a single
 
294
call or a few calls. You can use
 
295
<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-module-callback-set-default" title="gnome_vfs_module_callback_set_default ()"><code class="function">gnome_vfs_module_callback_set_default()</code></a> to set a callback function
 
296
that will establish a permanent global setting for all threads
 
297
instead.
 
298
</p>
 
299
<p>
 
300
Note: <em class="parameter"><code>destroy_notify</code></em> may be called on any thread - it is not
 
301
guaranteed to be called on the main thread.</p>
 
302
<p>
 
303
</p>
 
304
<div class="variablelist"><table border="0">
 
305
<col align="left" valign="top">
 
306
<tbody>
 
307
<tr>
 
308
<td><p><span class="term"><em class="parameter"><code>callback_name</code></em> :</span></p></td>
 
309
<td> name of the module callback to set temporarily.
 
310
</td>
 
311
</tr>
 
312
<tr>
 
313
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
 
314
<td> function to call when the <em class="parameter"><code>callback</code></em> is invoked.
 
315
</td>
 
316
</tr>
 
317
<tr>
 
318
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
 
319
<td> data to pass to <em class="parameter"><code>callback</code></em>.
 
320
</td>
 
321
</tr>
 
322
<tr>
 
323
<td><p><span class="term"><em class="parameter"><code>destroy_notify</code></em> :</span></p></td>
 
324
<td> function to call when <em class="parameter"><code>callback_data</code></em> is to be freed.
 
325
</td>
 
326
</tr>
 
327
</tbody>
 
328
</table></div>
 
329
</div>
 
330
<hr>
 
331
<div class="refsect2" lang="en">
 
332
<a name="gnome-vfs-module-callback-pop"></a><h3>gnome_vfs_module_callback_pop ()</h3>
 
333
<pre class="programlisting">void                gnome_vfs_module_callback_pop       (const char *callback_name);</pre>
 
334
<p>
 
335
</p>
 
336
<div class="variablelist"><table border="0">
 
337
<col align="left" valign="top">
 
338
<tbody><tr>
 
339
<td><p><span class="term"><em class="parameter"><code>callback_name</code></em> :</span></p></td>
 
340
<td>
 
341
</td>
 
342
</tr></tbody>
 
343
</table></div>
 
344
</div>
 
345
<hr>
 
346
<div class="refsect2" lang="en">
 
347
<a name="gnome-vfs-async-module-callback-set-default"></a><h3>gnome_vfs_async_module_callback_set_default ()</h3>
 
348
<pre class="programlisting">void                gnome_vfs_async_module_callback_set_default
 
349
                                                        (const char *callback_name,
 
350
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSAsyncModuleCallback" title="GnomeVFSAsyncModuleCallback ()">GnomeVFSAsyncModuleCallback</a> callback,
 
351
                                                         gpointer callback_data,
 
352
                                                         GDestroyNotify destroy_notify);</pre>
 
353
<p>
 
354
Set the default async callback for <em class="parameter"><code>callback_name</code></em> to
 
355
<em class="parameter"><code>callback</code></em>. <em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em>
 
356
from a callback on the main thread. It will be passed a response
 
357
function which should be called to signal completion of the callback.
 
358
The callback function itself may return in the meantime.
 
359
</p>
 
360
<p>
 
361
The default value is shared for all threads, but setting it is
 
362
thread-safe.
 
363
</p>
 
364
<p>
 
365
Use this function if you want to globally set a callback handler
 
366
for use with async operations.
 
367
</p>
 
368
<p>
 
369
You can use <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-push" title="gnome_vfs_async_module_callback_push ()"><code class="function">gnome_vfs_async_module_callback_push()</code></a> to set an async
 
370
callback function that will temporarily override the default on the
 
371
current thread instead. Or you can also use
 
372
<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-module-callback-set-default" title="gnome_vfs_module_callback_set_default ()"><code class="function">gnome_vfs_module_callback_set_default()</code></a> to set a regular callback
 
373
function.
 
374
</p>
 
375
<p>
 
376
Note: <em class="parameter"><code>destroy_notify</code></em> may be called on any thread - it is not
 
377
guaranteed to be called on the main thread.</p>
 
378
<p>
 
379
</p>
 
380
<div class="variablelist"><table border="0">
 
381
<col align="left" valign="top">
 
382
<tbody>
 
383
<tr>
 
384
<td><p><span class="term"><em class="parameter"><code>callback_name</code></em> :</span></p></td>
 
385
<td> name of the async module callback to set.
 
386
</td>
 
387
</tr>
 
388
<tr>
 
389
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
 
390
<td> function to call when <em class="parameter"><code>callback</code></em> is invoked.
 
391
</td>
 
392
</tr>
 
393
<tr>
 
394
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
 
395
<td> data to pass to <em class="parameter"><code>callback</code></em>.
 
396
</td>
 
397
</tr>
 
398
<tr>
 
399
<td><p><span class="term"><em class="parameter"><code>destroy_notify</code></em> :</span></p></td>
 
400
<td> function to call when <em class="parameter"><code>callback_data</code></em> is to be freed.
 
401
</td>
 
402
</tr>
 
403
</tbody>
 
404
</table></div>
 
405
</div>
 
406
<hr>
 
407
<div class="refsect2" lang="en">
 
408
<a name="gnome-vfs-async-module-callback-push"></a><h3>gnome_vfs_async_module_callback_push ()</h3>
 
409
<pre class="programlisting">void                gnome_vfs_async_module_callback_push
 
410
                                                        (const char *callback_name,
 
411
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#GnomeVFSAsyncModuleCallback" title="GnomeVFSAsyncModuleCallback ()">GnomeVFSAsyncModuleCallback</a> callback,
 
412
                                                         gpointer callback_data,
 
413
                                                         GDestroyNotify destroy_notify);</pre>
 
414
<p>
 
415
Set <em class="parameter"><code>callback</code></em> as a temprary async handler for
 
416
<em class="parameter"><code>callback_name</code></em>. <em class="parameter"><code>callback</code></em> will be called with <em class="parameter"><code>callback_data</code></em>
 
417
from a callback on the main thread. It will be passed a response
 
418
function which should be called to signal completion of the
 
419
callback. The callback function itself may return in the meantime.
 
420
</p>
 
421
<p>
 
422
The temporary async handler is set per-thread.
 
423
</p>
 
424
<p>
 
425
<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-pop" title="gnome_vfs_async_module_callback_pop ()"><code class="function">gnome_vfs_async_module_callback_pop()</code></a> removes the most recently set
 
426
temporary handler. The temporary async handlers are
 
427
treated as a first-in first-out stack.
 
428
</p>
 
429
<p>
 
430
Use this function to set a temporary async callback handler for a
 
431
single call or a few calls. You can use
 
432
<a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-set-default" title="gnome_vfs_async_module_callback_set_default ()"><code class="function">gnome_vfs_async_module_callback_set_default()</code></a> to set an async
 
433
callback function that will establish a permanent global setting
 
434
for all threads instead.
 
435
</p>
 
436
<p>
 
437
Note: <em class="parameter"><code>destroy_notify</code></em> may be called on any thread - it is not
 
438
guaranteed to be called on the main thread.</p>
 
439
<p>
 
440
</p>
 
441
<div class="variablelist"><table border="0">
 
442
<col align="left" valign="top">
 
443
<tbody>
 
444
<tr>
 
445
<td><p><span class="term"><em class="parameter"><code>callback_name</code></em> :</span></p></td>
 
446
<td> name of the module callback to set temporarily.
 
447
</td>
 
448
</tr>
 
449
<tr>
 
450
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
 
451
<td> function to call when <em class="parameter"><code>callback</code></em> is invoked.
 
452
</td>
 
453
</tr>
 
454
<tr>
 
455
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
 
456
<td> data to pass to <em class="parameter"><code>callback</code></em>.
 
457
</td>
 
458
</tr>
 
459
<tr>
 
460
<td><p><span class="term"><em class="parameter"><code>destroy_notify</code></em> :</span></p></td>
 
461
<td> function to call when <em class="parameter"><code>callback_data</code></em> is to be freed.
 
462
</td>
 
463
</tr>
 
464
</tbody>
 
465
</table></div>
 
466
</div>
 
467
<hr>
 
468
<div class="refsect2" lang="en">
 
469
<a name="gnome-vfs-async-module-callback-pop"></a><h3>gnome_vfs_async_module_callback_pop ()</h3>
 
470
<pre class="programlisting">void                gnome_vfs_async_module_callback_pop (const char *callback_name);</pre>
 
471
<p>
 
472
Remove the temporary async handler for <em class="parameter"><code>callback_name</code></em> most recently
 
473
set with <a class="link" href="gnome-vfs-2.0-gnome-vfs-module-callback.html#gnome-vfs-async-module-callback-push" title="gnome_vfs_async_module_callback_push ()"><code class="function">gnome_vfs_async_module_callback_push()</code></a>.  If another
 
474
temporary async handler was previously set on the same thread, it
 
475
becomes the current handler. Otherwise, the default async handler,
 
476
if any, becomes current.
 
477
</p>
 
478
<p>
 
479
The temporary async handlers are treated as a first-in first-out
 
480
stack.</p>
 
481
<p>
 
482
</p>
 
483
<div class="variablelist"><table border="0">
 
484
<col align="left" valign="top">
 
485
<tbody><tr>
 
486
<td><p><span class="term"><em class="parameter"><code>callback_name</code></em> :</span></p></td>
 
487
<td> name of the module callback to remove a temporary handler for.
 
488
</td>
 
489
</tr></tbody>
 
490
</table></div>
 
491
</div>
 
492
</div>
 
493
</div>
 
494
<div class="footer">
 
495
<hr>
 
496
          Generated by GTK-Doc V1.12</div>
 
497
</body>
 
498
</html>