~ubuntu-branches/debian/squeeze/glib2.0/squeeze

« back to all changes in this revision

Viewing changes to docs/reference/gio/xml/gasyncresult.xml

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mfrom: (1.3.1 upstream) (69.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20090215130043-q47fbt3owmt42m2f
Tags: 2.18.4-2
* Release to unstable
* debian/rules:
- bump SHVER, since we are already forcing a 2.18.0 dependecy on the
  symbols introduced in the development versions
* debian/control.in:
- added Homepage and Vcs-* control fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
]>
6
6
<refentry id="GAsyncResult">
7
7
<refmeta>
8
 
<refentrytitle role="top_of_page">GAsyncResult</refentrytitle>
 
8
<refentrytitle role="top_of_page" id="GAsyncResult.top_of_page">GAsyncResult</refentrytitle>
9
9
<manvolnum>3</manvolnum>
10
10
<refmiscinfo>GIO Library</refmiscinfo>
11
11
</refmeta>
13
13
<refnamediv>
14
14
<refname>GAsyncResult</refname>
15
15
<refpurpose>Asynchronous Function Results</refpurpose>
16
 
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
17
16
</refnamediv>
18
17
 
19
 
<refsynopsisdiv role="synopsis">
 
18
<refsynopsisdiv id="GAsyncResult.synopsis" role="synopsis">
20
19
<title role="synopsis.title">Synopsis</title>
21
20
 
22
21
<synopsis>
23
22
 
24
23
#include &lt;gio/gio.h&gt;
25
24
 
26
 
 
27
25
                    <link linkend="GAsyncResult-struct">GAsyncResult</link>;
28
26
                    <link linkend="GAsyncResultIface">GAsyncResultIface</link>;
29
27
<link linkend="void">void</link>                (<link linkend="GAsyncReadyCallback">*GAsyncReadyCallback</link>)              (<link linkend="GObject">GObject</link> *source_object,
30
28
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
31
29
                                                         <link linkend="gpointer">gpointer</link> user_data);
32
30
<link linkend="gpointer">gpointer</link>            <link linkend="g-async-result-get-user-data">g_async_result_get_user_data</link>        (<link linkend="GAsyncResult">GAsyncResult</link> *res);
33
 
<link linkend="GObject">GObject</link>*            <link linkend="g-async-result-get-source-object">g_async_result_get_source_object</link>    (<link linkend="GAsyncResult">GAsyncResult</link> *res);
34
 
 
35
 
 
 
31
<link linkend="GObject">GObject</link> *           <link linkend="g-async-result-get-source-object">g_async_result_get_source_object</link>    (<link linkend="GAsyncResult">GAsyncResult</link> *res);
36
32
</synopsis>
37
33
</refsynopsisdiv>
38
34
 
39
 
<refsect1 role="object_hierarchy">
 
35
<refsect1 id="GAsyncResult.object-hierarchy" role="object_hierarchy">
40
36
<title role="object_hierarchy.title">Object Hierarchy</title>
41
37
<synopsis>
42
 
 
43
38
  <link linkend="GInterface">GInterface</link>
44
39
   +----GAsyncResult
45
40
</synopsis>
46
 
 
47
41
</refsect1>
48
42
 
49
 
<refsect1 role="prerequisites">
 
43
<refsect1 id="GAsyncResult.prerequisites" role="prerequisites">
50
44
<title role="prerequisites.title">Prerequisites</title>
51
45
<para>
52
46
GAsyncResult requires
53
47
 <link linkend="GObject">GObject</link>.</para>
54
 
 
55
48
</refsect1>
56
49
 
57
50
 
58
51
 
59
 
<refsect1 role="implementations">
 
52
<refsect1 id="GAsyncResult.implementations" role="implementations">
60
53
<title role="implementations.title">Known Implementations</title>
61
54
<para>
62
55
GAsyncResult is implemented by
63
56
 <link linkend="GSimpleAsyncResult">GSimpleAsyncResult</link>.</para>
64
 
 
65
57
</refsect1>
66
58
 
67
59
 
68
60
 
69
61
 
70
 
<refsect1 role="desc">
 
62
<refsect1 id="GAsyncResult.description" role="desc">
71
63
<title role="desc.title">Description</title>
72
64
<para>
73
65
Provides a base class for implementing asynchronous function results.
142
134
<para>
143
135
The callback for an asynchronous operation is called only once, and is
144
136
always called, even in the case of a cancelled operation. On cancellation
145
 
the result is a <link linkend="G-IO-ERROR-CANCELLED:CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> error.
 
137
the result is a <link linkend="G-IO-ERROR-CANCELLED--CAPS"><literal>G_IO_ERROR_CANCELLED</literal></link> error.
146
138
</para>
147
139
<para>
148
140
Some ascynchronous operations are implemented using synchronous calls. These
150
142
are sent to the Main Event Loop and processed in an idle function. So, if you
151
143
truly need asynchronous operations, make sure to initialize <link linkend="GThread"><type>GThread</type></link>.</para>
152
144
<para>
153
 
 
154
145
</para>
155
146
</refsect1>
156
147
 
157
 
<refsect1 role="details">
 
148
<refsect1 id="GAsyncResult.details" role="details">
158
149
<title role="details.title">Details</title>
159
 
<refsect2>
160
 
<title><anchor id="GAsyncResult-struct" role="struct"/>GAsyncResult</title>
161
 
<indexterm><primary>GAsyncResult</primary></indexterm><programlisting>typedef struct _GAsyncResult GAsyncResult;</programlisting>
 
150
<refsect2 id="GAsyncResult-struct" role="struct">
 
151
<title>GAsyncResult</title>
 
152
<indexterm zone="GAsyncResult-struct"><primary sortas="GAsyncResult">GAsyncResult</primary></indexterm><programlisting>typedef struct _GAsyncResult GAsyncResult;</programlisting>
162
153
<para>
163
 
Holds results information for an asynchronous operation, 
 
154
Holds results information for an asynchronous operation,
164
155
usually passed directly to a asynchronous <link linkend="finish"><function>_finish()</function></link> operation.</para>
165
156
<para>
166
 
 
167
157
</para></refsect2>
168
 
<refsect2>
169
 
<title><anchor id="GAsyncResultIface" role="struct"/>GAsyncResultIface</title>
170
 
<indexterm><primary>GAsyncResultIface</primary></indexterm><programlisting>typedef struct {
 
158
<refsect2 id="GAsyncResultIface" role="struct">
 
159
<title>GAsyncResultIface</title>
 
160
<indexterm zone="GAsyncResultIface"><primary sortas="GAsyncResultIface">GAsyncResultIface</primary></indexterm><programlisting>typedef struct {
171
161
  GTypeInterface g_iface;
172
162
 
173
163
  /* Virtual Table */
174
164
 
175
 
  gpointer   (*get_user_data)      (GAsyncResult                *async_result);
176
 
  GObject *  (*get_source_object)  (GAsyncResult                *async_result);
 
165
  gpointer  (* get_user_data)     (GAsyncResult *async_result);
 
166
  GObject * (* get_source_object) (GAsyncResult *async_result);
177
167
} GAsyncResultIface;
178
168
</programlisting>
179
169
<para>
180
170
Interface definition for <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.</para>
181
171
<para>
182
 
 
183
172
</para><variablelist role="struct">
184
173
<varlistentry>
185
 
<term><link linkend="GTypeInterface">GTypeInterface</link>&nbsp;<structfield>g_iface</structfield>;</term>
186
 
<listitem><simpara> The parent interface. 
 
174
<term><link linkend="GTypeInterface">GTypeInterface</link>&#160;<structfield>g_iface</structfield>;</term>
 
175
<listitem><simpara> The parent interface.
187
176
</simpara></listitem>
188
177
</varlistentry>
189
178
<varlistentry>
190
 
<term><structfield>get_user_data</structfield>&nbsp;()</term>
 
179
<term><structfield>get_user_data</structfield>&#160;()</term>
191
180
<listitem><simpara> Gets the user data passed to the callback.
192
181
</simpara></listitem>
193
182
</varlistentry>
194
183
<varlistentry>
195
 
<term><structfield>get_source_object</structfield>&nbsp;()</term>
 
184
<term><structfield>get_source_object</structfield>&#160;()</term>
196
185
<listitem><simpara> Gets the source object that issued the asynchronous operation.
197
186
</simpara></listitem>
198
187
</varlistentry>
199
188
</variablelist></refsect2>
200
 
<refsect2>
201
 
<title><anchor id="GAsyncReadyCallback" role="function"/>GAsyncReadyCallback ()</title>
202
 
<indexterm><primary>GAsyncReadyCallback</primary></indexterm><programlisting><link linkend="void">void</link>                (*GAsyncReadyCallback)              (<link linkend="GObject">GObject</link> *source_object,
 
189
<refsect2 id="GAsyncReadyCallback" role="function">
 
190
<title>GAsyncReadyCallback ()</title>
 
191
<indexterm zone="GAsyncReadyCallback"><primary sortas="GAsyncReadyCallback">GAsyncReadyCallback</primary></indexterm><programlisting><link linkend="void">void</link>                (*GAsyncReadyCallback)              (<link linkend="GObject">GObject</link> *source_object,
203
192
                                                         <link linkend="GAsyncResult">GAsyncResult</link> *res,
204
193
                                                         <link linkend="gpointer">gpointer</link> user_data);</programlisting>
205
194
<para>
206
 
Type definition for a function that will be called back when an asynchronous 
 
195
Type definition for a function that will be called back when an asynchronous
207
196
operation within GIO has been completed.</para>
208
197
<para>
209
 
 
210
198
</para><variablelist role="params">
211
 
<varlistentry><term><parameter>source_object</parameter>&nbsp;:</term>
 
199
<varlistentry><term><parameter>source_object</parameter>&#160;:</term>
212
200
<listitem><simpara> the object the asynchronous operation was started with.
213
201
</simpara></listitem></varlistentry>
214
 
<varlistentry><term><parameter>res</parameter>&nbsp;:</term>
 
202
<varlistentry><term><parameter>res</parameter>&#160;:</term>
215
203
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
216
204
</simpara></listitem></varlistentry>
217
 
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
205
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
218
206
<listitem><simpara> user data passed to the callback.
219
207
</simpara></listitem></varlistentry>
220
208
</variablelist></refsect2>
221
 
<refsect2>
222
 
<title><anchor id="g-async-result-get-user-data" role="function"/>g_async_result_get_user_data ()</title>
223
 
<indexterm><primary>g_async_result_get_user_data</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            g_async_result_get_user_data        (<link linkend="GAsyncResult">GAsyncResult</link> *res);</programlisting>
 
209
<refsect2 id="g-async-result-get-user-data" role="function">
 
210
<title>g_async_result_get_user_data ()</title>
 
211
<indexterm zone="g-async-result-get-user-data"><primary sortas="g_async_result_get_user_data">g_async_result_get_user_data</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            g_async_result_get_user_data        (<link linkend="GAsyncResult">GAsyncResult</link> *res);</programlisting>
224
212
<para>
225
213
Gets the user data from a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.</para>
226
214
<para>
227
 
 
228
215
</para><variablelist role="params">
229
 
<varlistentry><term><parameter>res</parameter>&nbsp;:</term>
 
216
<varlistentry><term><parameter>res</parameter>&#160;:</term>
230
217
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
231
218
</simpara></listitem></varlistentry>
232
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the user data for <parameter>res</parameter>. 
 
219
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the user data for <parameter>res</parameter>. 
233
220
</simpara></listitem></varlistentry>
234
221
</variablelist></refsect2>
235
 
<refsect2>
236
 
<title><anchor id="g-async-result-get-source-object" role="function"/>g_async_result_get_source_object ()</title>
237
 
<indexterm><primary>g_async_result_get_source_object</primary></indexterm><programlisting><link linkend="GObject">GObject</link>*            g_async_result_get_source_object    (<link linkend="GAsyncResult">GAsyncResult</link> *res);</programlisting>
 
222
<refsect2 id="g-async-result-get-source-object" role="function">
 
223
<title>g_async_result_get_source_object ()</title>
 
224
<indexterm zone="g-async-result-get-source-object"><primary sortas="g_async_result_get_source_object">g_async_result_get_source_object</primary></indexterm><programlisting><link linkend="GObject">GObject</link> *           g_async_result_get_source_object    (<link linkend="GAsyncResult">GAsyncResult</link> *res);</programlisting>
238
225
<para>
239
226
Gets the source object from a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.</para>
240
227
<para>
241
 
 
242
228
</para><variablelist role="params">
243
 
<varlistentry><term><parameter>res</parameter>&nbsp;:</term>
 
229
<varlistentry><term><parameter>res</parameter>&#160;:</term>
244
230
<listitem><simpara> a <link linkend="GAsyncResult"><type>GAsyncResult</type></link>.
245
231
</simpara></listitem></varlistentry>
246
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the source object for the <parameter>res</parameter>.
 
232
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the source object for the <parameter>res</parameter>.
247
233
</simpara></listitem></varlistentry>
248
234
</variablelist></refsect2>
249
235
 
251
237
 
252
238
 
253
239
 
254
 
<refsect1>
 
240
<refsect1 id="GAsyncResult.see-also">
255
241
<title>See Also</title>
256
 
<link linkend="GSimpleAsyncResult"><type>GSimpleAsyncResult</type></link>
 
242
#GSimpleAsyncResult
257
243
</refsect1>
258
244
 
259
 
 
260
 
<refsect1><refsect2 /><refsect2 /></refsect1>
261
245
</refentry>