ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / doc / html / gnome-vfs-gnome-vfs-cancellation.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>
2 Cancellation</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
3         .synopsis, .classsynopsis {
4             background: #eeeeee;
5             border: solid 1px #aaaaaa;
6             padding: 0.5em;
7         }
8         .programlisting {
9             background: #eeeeff;
10             border: solid 1px #aaaaff;
11             padding: 0.5em;
12         }
13         .variablelist {
14             padding: 4px;
15             margin-left: 3em;
16         }
17         .navigation {
18             background: #ffeeee;
19             border: solid 1px #ffaaaa;
20             margin-top: 0.5em;
21             margin-bottom: 0.5em;
22         }
23         .navigation a {
24             color: #770000;
25         }
26         .navigation a:visited {
27             color: #550000;
28         }
29         .navigation .title {
30             font-size: 200%;
31         }
32       </style><link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library"><link rel="up" href="advanced-operations.html" title="Advanced Operations"><link rel="previous" href="gnome-vfs-gnome-vfs-monitor.html" title="
33 Monitoring"><link rel="next" href="gnome-vfs-gnome-vfs-xfer.html" title="File Transfers"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="gnome-vfs-gnome-vfs-monitor.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="advanced-operations.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th><td><a accesskey="n" href="gnome-vfs-gnome-vfs-xfer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="gnome-vfs-gnome-vfs-cancellation"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">
34 Cancellation</span></h2><p>
35 Cancellation &#8212; 
36 halt in-progress operations</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
37
38
39
40 GnomeVFSCancellation* <a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-new">gnome_vfs_cancellation_new</a>
41                                             (void);
42 void        <a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-destroy">gnome_vfs_cancellation_destroy</a>  (GnomeVFSCancellation *cancellation);
43 void        <a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-cancel">gnome_vfs_cancellation_cancel</a>   (GnomeVFSCancellation *cancellation);
44 <a
45 href="../glib/glib-Basic-Types.html#gboolean"
46 >gboolean</a>    <a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-check">gnome_vfs_cancellation_check</a>    (GnomeVFSCancellation *cancellation);
47 void        <a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-ack">gnome_vfs_cancellation_ack</a>      (GnomeVFSCancellation *cancellation);
48 <a
49 href="../glib/glib-Basic-Types.html#gint"
50 >gint</a>        <a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-get-fd">gnome_vfs_cancellation_get_fd</a>   (GnomeVFSCancellation *cancellation);
51 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
52
53 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="gnome-vfs-cancellation-new"></a>gnome_vfs_cancellation_new ()</h3><pre class="programlisting">GnomeVFSCancellation* gnome_vfs_cancellation_new
54                                             (void);</pre><p>
55 Create a new GnomeVFSCancellation object for reporting cancellation to a
56 GNOME VFS module.</p><p>
57
58 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A pointer to the new GnomeVFSCancellation object.
59 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-cancellation-destroy"></a>gnome_vfs_cancellation_destroy ()</h3><pre class="programlisting">void        gnome_vfs_cancellation_destroy  (GnomeVFSCancellation *cancellation);</pre><p>
60 Destroy <i class="parameter"><tt>cancellation</tt></i>.</p><p>
61
62 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cancellation</tt></i> :</span></td><td> A GnomeVFSCancellation object
63 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-cancellation-cancel"></a>gnome_vfs_cancellation_cancel ()</h3><pre class="programlisting">void        gnome_vfs_cancellation_cancel   (GnomeVFSCancellation *cancellation);</pre><p>
64 Send a cancellation request through <i class="parameter"><tt>cancellation</tt></i>.</p><p>
65
66 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cancellation</tt></i> :</span></td><td> A GnomeVFSCancellation object
67 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-cancellation-check"></a>gnome_vfs_cancellation_check ()</h3><pre class="programlisting"><a
68 href="../glib/glib-Basic-Types.html#gboolean"
69 >gboolean</a>    gnome_vfs_cancellation_check    (GnomeVFSCancellation *cancellation);</pre><p>
70 Check for pending cancellation.</p><p>
71
72 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cancellation</tt></i> :</span></td><td> A GnomeVFSCancellation object
73 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt class="literal">TRUE</tt> if the operation should be interrupted.
74 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-cancellation-ack"></a>gnome_vfs_cancellation_ack ()</h3><pre class="programlisting">void        gnome_vfs_cancellation_ack      (GnomeVFSCancellation *cancellation);</pre><p>
75 Acknowledge a cancellation.  This should be called if
76 `<a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-check">gnome_vfs_cancellation_check</a>()' returns <tt class="literal">TRUE</tt> or if `select()' reports that
77 input is available on the file descriptor returned by
78 `<a href="gnome-vfs-gnome-vfs-cancellation.html#gnome-vfs-cancellation-get-fd">gnome_vfs_cancellation_get_fd</a>()'.</p><p>
79
80 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cancellation</tt></i> :</span></td><td> A GnomeVFSCancellation object
81 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-cancellation-get-fd"></a>gnome_vfs_cancellation_get_fd ()</h3><pre class="programlisting"><a
82 href="../glib/glib-Basic-Types.html#gint"
83 >gint</a>        gnome_vfs_cancellation_get_fd   (GnomeVFSCancellation *cancellation);</pre><p>
84 Get a file descriptor -based notificator for <i class="parameter"><tt>cancellation</tt></i>.  When
85 <i class="parameter"><tt>cancellation</tt></i> receives a cancellation request, a character will be made
86 available on the returned file descriptor for input.
87 </p><p>
88 This is very useful for detecting cancellation during I/O operations: you
89 can use the `select()' call to check for available input/output on the file
90 you are reading/writing, and on the notificator's file descriptor at the
91 same time.  If a data is available on the notificator's file descriptor, you
92 know you have to cancel the read/write operation.</p><p>
93
94 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>cancellation</tt></i> :</span></td><td> A GnomeVFSCancellation object
95 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the notificator's file descriptor, or -1 if starved of
96               file descriptors.
97 </td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="gnome-vfs-gnome-vfs-monitor.html"><b>&lt;&lt; 
98 Monitoring</b></a></td><td align="right"><a accesskey="n" href="gnome-vfs-gnome-vfs-xfer.html"><b>File Transfers &gt;&gt;</b></a></td></tr></table></body></html>