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-20-gnome-vfs-cancellation.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>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">
2         .synopsis, .classsynopsis {
3             background: #eeeeee;
4             border: solid 1px #aaaaaa;
5             padding: 0.5em;
6         }
7         .programlisting {
8             background: #eeeeff;
9             border: solid 1px #aaaaff;
10             padding: 0.5em;
11         }
12         .variablelist {
13             padding: 4px;
14             margin-left: 3em;
15         }
16         .navigation {
17             background: #ffeeee;
18             border: solid 1px #ffaaaa;
19             margin-top: 0.5em;
20             margin-bottom: 0.5em;
21         }
22         .navigation a {
23             color: #770000;
24         }
25         .navigation a:visited {
26             color: #550000;
27         }
28         .navigation .title {
29             font-size: 200%;
30         }
31       </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-20-gnome-vfs-monitor.html" title="Monitoring"><link rel="next" href="gnome-vfs-20-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-20-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-20-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-20-gnome-vfs-cancellation"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">Cancellation</span></h2><p>Cancellation &#8212; 
32 halt in-progress operations</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
33
34
35
36 GnomeVFSCancellation* <a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-new">gnome_vfs_cancellation_new</a>
37                                             (void);
38 void        <a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-destroy">gnome_vfs_cancellation_destroy</a>  (GnomeVFSCancellation *cancellation);
39 void        <a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-cancel">gnome_vfs_cancellation_cancel</a>   (GnomeVFSCancellation *cancellation);
40 <a
41 href="../glib/glib-Basic-Types.html#gboolean"
42 >gboolean</a>    <a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-check">gnome_vfs_cancellation_check</a>    (GnomeVFSCancellation *cancellation);
43 void        <a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-ack">gnome_vfs_cancellation_ack</a>      (GnomeVFSCancellation *cancellation);
44 <a
45 href="../glib/glib-Basic-Types.html#gint"
46 >gint</a>        <a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-get-fd">gnome_vfs_cancellation_get_fd</a>   (GnomeVFSCancellation *cancellation);
47 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
48
49 </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><a class="indexterm" name="id2922641"></a><pre class="programlisting">GnomeVFSCancellation* gnome_vfs_cancellation_new
50                                             (void);</pre><p>
51 Create a new GnomeVFSCancellation object for reporting cancellation to a
52 GNOME VFS module.</p><p>
53
54 </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.
55 </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><a class="indexterm" name="id2922707"></a><pre class="programlisting">void        gnome_vfs_cancellation_destroy  (GnomeVFSCancellation *cancellation);</pre><p>
56 Destroy <i class="parameter"><tt>cancellation</tt></i>.</p><p>
57
58 </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
59 </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><a class="indexterm" name="id2922790"></a><pre class="programlisting">void        gnome_vfs_cancellation_cancel   (GnomeVFSCancellation *cancellation);</pre><p>
60 Send a cancellation request through <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-check"></a>gnome_vfs_cancellation_check ()</h3><a class="indexterm" name="id2922873"></a><pre class="programlisting"><a
64 href="../glib/glib-Basic-Types.html#gboolean"
65 >gboolean</a>    gnome_vfs_cancellation_check    (GnomeVFSCancellation *cancellation);</pre><p>
66 Check for pending cancellation.</p><p>
67
68 </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
69 </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.
70 </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><a class="indexterm" name="id2922967"></a><pre class="programlisting">void        gnome_vfs_cancellation_ack      (GnomeVFSCancellation *cancellation);</pre><p>
71 Acknowledge a cancellation.  This should be called if
72 `<a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-check"><tt class="function">gnome_vfs_cancellation_check()</tt></a>' returns <tt class="literal">TRUE</tt> or if `<tt class="function">select()</tt>' reports that
73 input is available on the file descriptor returned by
74 `<a href="gnome-vfs-20-gnome-vfs-cancellation.html#gnome-vfs-cancellation-get-fd"><tt class="function">gnome_vfs_cancellation_get_fd()</tt></a>'.</p><p>
75
76 </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
77 </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><a class="indexterm" name="id2923092"></a><pre class="programlisting"><a
78 href="../glib/glib-Basic-Types.html#gint"
79 >gint</a>        gnome_vfs_cancellation_get_fd   (GnomeVFSCancellation *cancellation);</pre><p>
80 Get a file descriptor -based notificator for <i class="parameter"><tt>cancellation</tt></i>.  When
81 <i class="parameter"><tt>cancellation</tt></i> receives a cancellation request, a character will be made
82 available on the returned file descriptor for input.
83 </p><p>
84 This is very useful for detecting cancellation during I/O operations: you
85 can use the `<tt class="function">select()</tt>' call to check for available input/output on the file
86 you are reading/writing, and on the notificator's file descriptor at the
87 same time.  If a data is available on the notificator's file descriptor, you
88 know you have to cancel the read/write operation.</p><p>
89
90 </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
91 </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
92               file descriptors.
93 </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-20-gnome-vfs-monitor.html"><b>&lt;&lt; Monitoring</b></a></td><td align="right"><a accesskey="n" href="gnome-vfs-20-gnome-vfs-xfer.html"><b>File Transfers &gt;&gt;</b></a></td></tr></table></body></html>