4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>camel-operation</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
7
<link rel="home" href="index.html" title="Camel Reference Manual">
8
8
<link rel="up" href="Fundamentals.html" title="Fundamentals">
9
9
<link rel="prev" href="CamelObject.html" title="CamelObject">
10
10
<link rel="next" href="camel-camel-url.html" title="camel-url">
11
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
38
38
<div class="refsynopsisdiv">
39
39
<a name="camel-camel-operation.synopsis"></a><h2>Synopsis</h2>
40
40
<pre class="synopsis">struct <a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation">CamelOperation</a>;
41
<a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="returnvalue">GCancellable</span></a> * <a class="link" href="camel-camel-operation.html#camel-operation-new" title="camel_operation_new ()">camel_operation_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
41
<span class="returnvalue">GCancellable</span> * <a class="link" href="camel-camel-operation.html#camel-operation-new" title="camel_operation_new ()">camel_operation_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
42
42
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-cancel" title="camel_operation_cancel ()">camel_operation_cancel</a> (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);
43
43
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-uncancel" title="camel_operation_uncancel ()">camel_operation_uncancel</a> (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);
44
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="camel-camel-operation.html#camel-operation-cancel-check" title="camel_operation_cancel_check ()">camel_operation_cancel_check</a> (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);
45
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="camel-camel-operation.html#camel-operation-cancel-fd" title="camel_operation_cancel_fd ()">camel_operation_cancel_fd</a> (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);
44
<span class="returnvalue">gboolean</span> <a class="link" href="camel-camel-operation.html#camel-operation-cancel-check" title="camel_operation_cancel_check ()">camel_operation_cancel_check</a> (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);
45
<span class="returnvalue">gint</span> <a class="link" href="camel-camel-operation.html#camel-operation-cancel-fd" title="camel_operation_cancel_fd ()">camel_operation_cancel_fd</a> (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);
46
46
struct <span class="returnvalue">PRFileDesc</span> * <a class="link" href="camel-camel-operation.html#camel-operation-cancel-prfd" title="camel_operation_cancel_prfd ()">camel_operation_cancel_prfd</a> (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);
47
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-push-message" title="camel_operation_push_message ()">camel_operation_push_message</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
48
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
47
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-push-message" title="camel_operation_push_message ()">camel_operation_push_message</a> (<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
48
<em class="parameter"><code>const <span class="type">gchar</span> *format</code></em>,
49
49
<em class="parameter"><code>...</code></em>);
50
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-pop-message" title="camel_operation_pop_message ()">camel_operation_pop_message</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);
51
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-progress" title="camel_operation_progress ()">camel_operation_progress</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> percent</code></em>);
50
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-pop-message" title="camel_operation_pop_message ()">camel_operation_pop_message</a> (<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>);
51
<span class="returnvalue">void</span> <a class="link" href="camel-camel-operation.html#camel-operation-progress" title="camel_operation_progress ()">camel_operation_progress</a> (<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
52
<em class="parameter"><code><span class="type">gint</span> percent</code></em>);
55
55
<div class="refsect1">
73
73
<div class="refsect2">
74
74
<a name="camel-operation-new"></a><h3>camel_operation_new ()</h3>
75
<pre class="programlisting"><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="returnvalue">GCancellable</span></a> * camel_operation_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
75
<pre class="programlisting"><span class="returnvalue">GCancellable</span> * camel_operation_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
77
77
Create a new camel operation handle. Camel operation handles can
78
78
be used in a multithreaded application (or a single operation
93
93
<a name="camel-operation-cancel"></a><h3>camel_operation_cancel ()</h3>
94
94
<pre class="programlisting"><span class="returnvalue">void</span> camel_operation_cancel (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);</pre>
96
Cancel a given operation. If <em class="parameter"><code>operation</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then all outstanding
96
Cancel a given operation. If <em class="parameter"><code>operation</code></em> is <a href="/home/chen/opt-unstable/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> then all outstanding
97
97
operations are cancelled.
99
99
<div class="variablelist"><table border="0">
130
130
<div class="refsect2">
131
131
<a name="camel-operation-cancel-check"></a><h3>camel_operation_cancel_check ()</h3>
132
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> camel_operation_cancel_check (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);</pre>
132
<pre class="programlisting"><span class="returnvalue">gboolean</span> camel_operation_cancel_check (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);</pre>
134
134
Check if cancellation has been applied to <em class="parameter"><code>operation</code></em>.
153
153
<div class="refsect2">
154
154
<a name="camel-operation-cancel-fd"></a><h3>camel_operation_cancel_fd ()</h3>
155
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> camel_operation_cancel_fd (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);</pre>
155
<pre class="programlisting"><span class="returnvalue">gint</span> camel_operation_cancel_fd (<em class="parameter"><code><a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> *operation</code></em>);</pre>
157
157
Retrieve a file descriptor that can be waited on (select, or poll)
158
158
for read, to asynchronously detect cancellation.
201
201
<div class="refsect2">
202
202
<a name="camel-operation-push-message"></a><h3>camel_operation_push_message ()</h3>
203
<pre class="programlisting"><span class="returnvalue">void</span> camel_operation_push_message (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
204
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>,
203
<pre class="programlisting"><span class="returnvalue">void</span> camel_operation_push_message (<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
204
<em class="parameter"><code>const <span class="type">gchar</span> *format</code></em>,
205
205
<em class="parameter"><code>...</code></em>);</pre>
207
207
Call this function to describe an operation being performed.
212
212
This function only works if <em class="parameter"><code>cancellable</code></em> is a <a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> cast as a
213
<a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>. If <em class="parameter"><code>cancellable</code></em> is a plain <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the
213
<span class="type">GCancellable</span>. If <em class="parameter"><code>cancellable</code></em> is a plain <span class="type">GCancellable</span> or <a href="/home/chen/opt-unstable/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>, the
214
214
function does nothing and returns silently.
216
216
<div class="variablelist"><table border="0">
220
220
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
221
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
221
<td>a <span class="type">GCancellable</span> or <a href="/home/chen/opt-unstable/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
225
225
<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
226
226
<td>a standard <code class="function">printf()</code> format string</td>
229
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
230
<td>the parameters to insert into the format string</td>
236
232
<div class="refsect2">
237
233
<a name="camel-operation-pop-message"></a><h3>camel_operation_pop_message ()</h3>
238
<pre class="programlisting"><span class="returnvalue">void</span> camel_operation_pop_message (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
234
<pre class="programlisting"><span class="returnvalue">void</span> camel_operation_pop_message (<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>);</pre>
240
236
Pops the most recently pushed message.
243
239
This function only works if <em class="parameter"><code>cancellable</code></em> is a <a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> cast as a
244
<a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>. If <em class="parameter"><code>cancellable</code></em> is a plain <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the
240
<span class="type">GCancellable</span>. If <em class="parameter"><code>cancellable</code></em> is a plain <span class="type">GCancellable</span> or <a href="/home/chen/opt-unstable/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>, the
245
241
function does nothing and returns silently.
247
243
<div class="variablelist"><table border="0">
248
244
<col align="left" valign="top">
250
246
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
251
<td>a <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>
247
<td>a <span class="type">GCancellable</span>
257
253
<div class="refsect2">
258
254
<a name="camel-operation-progress"></a><h3>camel_operation_progress ()</h3>
259
<pre class="programlisting"><span class="returnvalue">void</span> camel_operation_progress (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
260
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> percent</code></em>);</pre>
255
<pre class="programlisting"><span class="returnvalue">void</span> camel_operation_progress (<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
256
<em class="parameter"><code><span class="type">gint</span> percent</code></em>);</pre>
262
258
Report progress on the current operation. <em class="parameter"><code>percent</code></em> reports the current
263
259
percentage of completion, which should be in the range of 0 to 100.
266
262
This function only works if <em class="parameter"><code>cancellable</code></em> is a <a class="link" href="camel-camel-operation.html#CamelOperation" title="struct CamelOperation"><span class="type">CamelOperation</span></a> cast as a
267
<a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a>. If <em class="parameter"><code>cancellable</code></em> is a plain <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the
263
<span class="type">GCancellable</span>. If <em class="parameter"><code>cancellable</code></em> is a plain <span class="type">GCancellable</span> or <a href="/home/chen/opt-unstable/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>, the
268
264
function does nothing and returns silently.
270
266
<div class="variablelist"><table border="0">