~joel-auterson/ubuntu/maverick/ibus/newmenuname

« back to all changes in this revision

Viewing changes to docs/reference/ibus/html/ibus-ibuspendingcall.html

  • Committer: Bazaar Package Importer
  • Author(s): LI Daobing
  • Date: 2009-10-05 20:45:18 UTC
  • mfrom: (1.1.5 upstream) (6.1.15 sid)
  • Revision ID: james.westby@ubuntu.com-20091005204518-069vlwrl3r8v7bbr
Tags: 1.2.0.20090927-2
* create po template when build (LP: #188690)
  - debian/rules: updated.
  - debian/clean: remove pot file when clean.
* debian/control: build depends on python-rsvg (LP: #432375)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>ibuspendingcall</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7
 
<link rel="home" href="index.html" title="iBus Reference Manual">
8
 
<link rel="up" href="ch05.html" title="Others">
 
7
<link rel="home" href="index.html" title="IBus Reference Manual">
 
8
<link rel="up" href="ch04.html" title="Communication and Configuration">
9
9
<link rel="prev" href="IBusObservedPath.html" title="IBusObservedPath">
10
10
<link rel="next" href="IBusProxy.html" title="IBusProxy">
11
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
 
<link rel="chapter" href="ch01.html" title="API Overviews">
14
 
<link rel="chapter" href="ch02.html" title="User Interfaces">
 
13
<link rel="chapter" href="ch01.html" title="Overview">
 
14
<link rel="chapter" href="ch02.html" title="Panel (User Interfaces)">
15
15
<link rel="chapter" href="ch03.html" title="Input method engine">
16
 
<link rel="chapter" href="ch04.html" title="Configuration">
17
 
<link rel="chapter" href="ch05.html" title="Others">
 
16
<link rel="chapter" href="ch04.html" title="Communication and Configuration">
 
17
<link rel="chapter" href="ch05.html" title="Internal">
18
18
</head>
19
19
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
20
20
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
21
21
<tr valign="middle">
22
22
<td><a accesskey="p" href="IBusObservedPath.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
23
 
<td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
23
<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
24
24
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
25
 
<th width="100%" align="center">iBus Reference Manual</th>
 
25
<th width="100%" align="center">IBus Reference Manual</th>
26
26
<td><a accesskey="n" href="IBusProxy.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
27
27
</tr>
28
28
<tr><td colspan="5" class="shortcuts">
36
36
<div class="refnamediv"><table width="100%"><tr>
37
37
<td valign="top">
38
38
<h2><span class="refentrytitle"><a name="ibus-ibuspendingcall.top_of_page"></a>ibuspendingcall</span></h2>
39
 
<p>ibuspendingcall</p>
 
39
<p>ibuspendingcall — A DBusPendingCall in IBus.</p>
40
40
</td>
41
41
<td valign="top" align="right"></td>
42
42
</tr></table></div>
 
43
<div class="refsect1" lang="en">
 
44
<a name="ibus-ibuspendingcall.stability-level"></a><h2>Stability Level</h2>
 
45
Stable, unless otherwise indicated
 
46
</div>
43
47
<div class="refsynopsisdiv">
44
48
<a name="ibus-ibuspendingcall.synopsis"></a><h2>Synopsis</h2>
45
49
<pre class="synopsis">
99
103
<div class="refsect1" lang="en">
100
104
<a name="ibus-ibuspendingcall.description"></a><h2>Description</h2>
101
105
<p>
 
106
An IBusPendingCall is essentially a DBusPendingCall, which representing an expected reply.
 
107
A IBusPendingCall can be created when you send a message that should have a reply.
 
108
</p>
 
109
<p>
 
110
Besides DBusPendingCall functions, An IBusPendingCall can be manipulated
 
111
with its own specific functions, which are defined in this section.</p>
 
112
<p>
102
113
</p>
103
114
</div>
104
115
<div class="refsect1" lang="en">
108
119
<pre class="programlisting">typedef DBusPendingCall IBusPendingCall;
109
120
</pre>
110
121
<p>
 
122
An opaque data structure that represents IBusPendingCall.</p>
 
123
<p>
111
124
</p>
112
125
</div>
113
126
<hr>
118
131
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
119
132
>gpointer</a> user_data);</pre>
120
133
<p>
 
134
Callback prototype of pending call notify function.</p>
 
135
<p>
121
136
</p>
122
137
<div class="variablelist"><table border="0">
123
138
<col align="left" valign="top">
124
139
<tbody>
125
140
<tr>
126
141
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
127
 
<td>
 
142
<td> An IBusPendingCall.
128
143
</td>
129
144
</tr>
130
145
<tr>
131
146
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
132
 
<td>
 
147
<td> User data for the callback function.
133
148
</td>
134
149
</tr>
135
150
</tbody>
140
155
<a name="ibus-pending-call-ref"></a><h3>ibus_pending_call_ref ()</h3>
141
156
<pre class="programlisting"><a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a>*    ibus_pending_call_ref               (<a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a> *pending);</pre>
142
157
<p>
 
158
Increases the reference count on a pending call.</p>
 
159
<p>
143
160
</p>
144
161
<div class="variablelist"><table border="0">
145
162
<col align="left" valign="top">
146
163
<tbody>
147
164
<tr>
148
165
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
149
 
<td>
 
166
<td> An IBusPendingCall.
150
167
</td>
151
168
</tr>
152
169
<tr>
153
170
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
154
 
<td>
 
171
<td> A reference of IBusPendingCall.
155
172
</td>
156
173
</tr>
157
174
</tbody>
162
179
<a name="ibus-pending-call-unref"></a><h3>ibus_pending_call_unref ()</h3>
163
180
<pre class="programlisting">void                ibus_pending_call_unref             (<a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a> *pending);</pre>
164
181
<p>
 
182
Decreases the reference count on a pending call.</p>
 
183
<p>
165
184
</p>
166
185
<div class="variablelist"><table border="0">
167
186
<col align="left" valign="top">
168
187
<tbody><tr>
169
188
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
170
 
<td>
 
189
<td> An IBusPendingCall.
171
190
</td>
172
191
</tr></tbody>
173
192
</table></div>
186
205
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
187
206
>GDestroyNotify</a> free_user_data);</pre>
188
207
<p>
 
208
Sets a notification function to be called when the reply is received or the pending call times out.</p>
 
209
<p>
189
210
</p>
190
211
<div class="variablelist"><table border="0">
191
212
<col align="left" valign="top">
192
213
<tbody>
193
214
<tr>
194
215
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
195
 
<td>
 
216
<td> An IBusPendingCall.
196
217
</td>
197
218
</tr>
198
219
<tr>
199
220
<td><p><span class="term"><em class="parameter"><code>function</code></em> :</span></p></td>
200
 
<td>
 
221
<td> An pending call notify callback function.
201
222
</td>
202
223
</tr>
203
224
<tr>
204
225
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
205
 
<td>
 
226
<td> User data for the callback function.
206
227
</td>
207
228
</tr>
208
229
<tr>
209
230
<td><p><span class="term"><em class="parameter"><code>free_user_data</code></em> :</span></p></td>
210
 
<td>
 
231
<td> Callback to free the user_data.
211
232
</td>
212
233
</tr>
213
234
<tr>
214
235
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
215
 
<td>
 
236
<td> TRUE if succeed; FALSE if not enough memory.
216
237
</td>
217
238
</tr>
218
239
</tbody>
223
244
<a name="ibus-pending-call-cancel"></a><h3>ibus_pending_call_cancel ()</h3>
224
245
<pre class="programlisting">void                ibus_pending_call_cancel            (<a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a> *pending);</pre>
225
246
<p>
 
247
Cancels the pending call, such that any reply or error received will just be ignored.
 
248
</p>
 
249
<p>
 
250
Drops the dbus library's internal reference to the DBusPendingCall so will free the call
 
251
if nobody else is holding a reference.
 
252
But usually application owns a reference from <code class="function">dbus_connection_send_with_reply()</code>.
 
253
</p>
 
254
<p>
 
255
Note that canceling a pending call will not simulate a timed-out call;
 
256
if a call times out, then a timeout error reply is received.
 
257
If you cancel the call, no reply is received unless the reply was already received before you canceled.</p>
 
258
<p>
226
259
</p>
227
260
<div class="variablelist"><table border="0">
228
261
<col align="left" valign="top">
229
262
<tbody><tr>
230
263
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
231
 
<td>
 
264
<td> An IBusPendingCall.
232
265
</td>
233
266
</tr></tbody>
234
267
</table></div>
240
273
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
241
274
>gboolean</a>            ibus_pending_call_get_completed     (<a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a> *pending);</pre>
242
275
<p>
 
276
Whether the pending call has received a reply or not.</p>
 
277
<p>
243
278
</p>
244
279
<div class="variablelist"><table border="0">
245
280
<col align="left" valign="top">
246
281
<tbody>
247
282
<tr>
248
283
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
249
 
<td>
 
284
<td> An IBusPendingCall.
250
285
</td>
251
286
</tr>
252
287
<tr>
253
288
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
254
 
<td>
 
289
<td> TRUE if pending call has received a reply; FALSE otherwise.
255
290
</td>
256
291
</tr>
257
292
</tbody>
262
297
<a name="ibus-pending-call-steal-reply"></a><h3>ibus_pending_call_steal_reply ()</h3>
263
298
<pre class="programlisting"><a class="link" href="ibus-ibusmessage.html#IBusMessage" title="IBusMessage">IBusMessage</a>*        ibus_pending_call_steal_reply       (<a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a> *pending);</pre>
264
299
<p>
 
300
Gets the reply, or returns NULL if none has been received yet.
 
301
</p>
 
302
<p>
 
303
Ownership of the reply message passes to the caller.
 
304
This function can only be called once per pending call,
 
305
since the reply message is transferred to the caller.</p>
 
306
<p>
265
307
</p>
266
308
<div class="variablelist"><table border="0">
267
309
<col align="left" valign="top">
268
310
<tbody>
269
311
<tr>
270
312
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
271
 
<td>
 
313
<td> An IBusPendingCall.
272
314
</td>
273
315
</tr>
274
316
<tr>
275
317
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
276
 
<td>
 
318
<td> Replied message; NULL if none has been received yet.
277
319
</td>
278
320
</tr>
279
321
</tbody>
284
326
<a name="ibus-pending-call-block"></a><h3>ibus_pending_call_block ()</h3>
285
327
<pre class="programlisting">void                ibus_pending_call_block             (<a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a> *pending);</pre>
286
328
<p>
 
329
Block until the pending call is completed.
 
330
The blocking is as with <a class="link" href="IBusConnection.html#ibus-connection-send-with-reply-and-block" title="ibus_connection_send_with_reply_and_block ()"><code class="function">ibus_connection_send_with_reply_and_block()</code></a>;
 
331
it does not enter the main loop or process other messages,
 
332
it simply waits for the reply in question.
 
333
</p>
 
334
<p>
 
335
If the pending call is already completed, this function returns immediately.</p>
 
336
<p>
287
337
</p>
288
338
<div class="variablelist"><table border="0">
289
339
<col align="left" valign="top">
290
340
<tbody><tr>
291
341
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
292
 
<td>
 
342
<td> An IBusPendingCall.
293
343
</td>
294
344
</tr></tbody>
295
345
</table></div>
299
349
<a name="ibus-pending-call-wait"></a><h3>ibus_pending_call_wait ()</h3>
300
350
<pre class="programlisting">void                ibus_pending_call_wait              (<a class="link" href="ibus-ibuspendingcall.html#IBusPendingCall" title="IBusPendingCall">IBusPendingCall</a> *pending);</pre>
301
351
<p>
 
352
Wait until the pending call is completed.
 
353
</p>
 
354
<p>
 
355
See also: <a class="link" href="ibus-ibuspendingcall.html#ibus-pending-call-get-completed" title="ibus_pending_call_get_completed ()"><code class="function">ibus_pending_call_get_completed()</code></a>.</p>
 
356
<p>
302
357
</p>
303
358
<div class="variablelist"><table border="0">
304
359
<col align="left" valign="top">
305
360
<tbody><tr>
306
361
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
307
 
<td>
 
362
<td> An IBusPendingCall.
308
363
</td>
309
364
</tr></tbody>
310
365
</table></div>
319
374
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
320
375
>gint</a> *slot_p);</pre>
321
376
<p>
 
377
Allocates an integer ID to be used for storing application-specific data on any IBusPendingCall.
 
378
</p>
 
379
<p>
 
380
The allocated ID may then be used with <a class="link" href="ibus-ibuspendingcall.html#ibus-pending-call-set-data" title="ibus_pending_call_set_data ()"><code class="function">ibus_pending_call_set_data()</code></a> and <a class="link" href="ibus-ibuspendingcall.html#ibus-pending-call-get-data" title="ibus_pending_call_get_data ()"><code class="function">ibus_pending_call_get_data()</code></a>.
 
381
The passed-in slot must be initialized to -1, and is filled in with the slot ID.
 
382
If the passed-in slot is not -1, it's assumed to be already allocated, and
 
383
its reference count is increased.
 
384
</p>
 
385
<p>
 
386
The allocated slot is global, i.e. all DBusPendingCall objects
 
387
will have a slot with the given integer ID reserved.</p>
 
388
<p>
322
389
</p>
323
390
<div class="variablelist"><table border="0">
324
391
<col align="left" valign="top">
325
392
<tbody>
326
393
<tr>
327
394
<td><p><span class="term"><em class="parameter"><code>slot_p</code></em> :</span></p></td>
328
 
<td>
 
395
<td> Address of a global variable storing the slot.
329
396
</td>
330
397
</tr>
331
398
<tr>
332
399
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
333
 
<td>
 
400
<td> TRUE if succeed; FALSE if insufficient memory.
334
401
</td>
335
402
</tr>
336
403
</tbody>
343
410
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
344
411
>gint</a> *slot_p);</pre>
345
412
<p>
 
413
Deallocates a global ID for IBusPendingCall data slots.
 
414
</p>
 
415
<p>
 
416
<a class="link" href="ibus-ibuspendingcall.html#ibus-pending-call-get-data" title="ibus_pending_call_get_data ()"><code class="function">ibus_pending_call_get_data()</code></a> and <a class="link" href="ibus-ibuspendingcall.html#ibus-pending-call-set-data" title="ibus_pending_call_set_data ()"><code class="function">ibus_pending_call_set_data()</code></a> may no longer be used with this slot.
 
417
Existing data stored on existing IBusPendingCall objects will be freed when
 
418
the IBusPendingCall is finalized, but may not be retrieved
 
419
(and may only be replaced if someone else reallocates the slot).
 
420
When the reference count on the passed-in slot reaches 0, it is set to -1.</p>
 
421
<p>
346
422
</p>
347
423
<div class="variablelist"><table border="0">
348
424
<col align="left" valign="top">
349
425
<tbody><tr>
350
426
<td><p><span class="term"><em class="parameter"><code>slot_p</code></em> :</span></p></td>
351
 
<td>
 
427
<td> Address of a global variable storing the slot.
352
428
</td>
353
429
</tr></tbody>
354
430
</table></div>
369
445
href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
370
446
>GDestroyNotify</a> free_data_func);</pre>
371
447
<p>
 
448
Stores a pointer on a IBusPendingCall, along with an optional function
 
449
to be used for freeing the data when the data is set again, or when the pending call is finalized.
 
450
</p>
 
451
<p>
 
452
The slot number must have been allocated with <a class="link" href="ibus-ibuspendingcall.html#ibus-pending-call-allocate-data-slot" title="ibus_pending_call_allocate_data_slot ()"><code class="function">ibus_pending_call_allocate_data_slot()</code></a>.</p>
 
453
<p>
372
454
</p>
373
455
<div class="variablelist"><table border="0">
374
456
<col align="left" valign="top">
375
457
<tbody>
376
458
<tr>
377
459
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
378
 
<td>
 
460
<td> An IBusPendingCall.
379
461
</td>
380
462
</tr>
381
463
<tr>
382
464
<td><p><span class="term"><em class="parameter"><code>slot</code></em> :</span></p></td>
383
 
<td>
 
465
<td> The slot number.
384
466
</td>
385
467
</tr>
386
468
<tr>
387
469
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
388
 
<td>
 
470
<td> The data to store
389
471
</td>
390
472
</tr>
391
473
<tr>
392
474
<td><p><span class="term"><em class="parameter"><code>free_data_func</code></em> :</span></p></td>
393
 
<td>
 
475
<td> Callback to free the data.
394
476
</td>
395
477
</tr>
396
478
<tr>
397
479
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
398
 
<td>
 
480
<td> TRUE if there was enough memory to store the data; FALSE otherwise.
399
481
</td>
400
482
</tr>
401
483
</tbody>
411
493
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
412
494
>gint</a> slot);</pre>
413
495
<p>
 
496
Retrieves data previously set with <a class="link" href="ibus-ibuspendingcall.html#ibus-pending-call-set-data" title="ibus_pending_call_set_data ()"><code class="function">ibus_pending_call_set_data()</code></a>.
 
497
</p>
 
498
<p>
 
499
The slot must still be allocated (must not have been freed).</p>
 
500
<p>
414
501
</p>
415
502
<div class="variablelist"><table border="0">
416
503
<col align="left" valign="top">
417
504
<tbody>
418
505
<tr>
419
506
<td><p><span class="term"><em class="parameter"><code>pending</code></em> :</span></p></td>
420
 
<td>
 
507
<td> An IBusPendingCall.
421
508
</td>
422
509
</tr>
423
510
<tr>
424
511
<td><p><span class="term"><em class="parameter"><code>slot</code></em> :</span></p></td>
425
 
<td>
 
512
<td> The slot number.
426
513
</td>
427
514
</tr>
428
515
<tr>
429
516
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
430
 
<td>
 
517
<td> The stored data; NULL if no such data.
431
518
</td>
432
519
</tr>
433
520
</tbody>