1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>GnomeVFSContext</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 {
4 border: solid 1px #aaaaaa;
9 border: solid 1px #aaaaff;
18 border: solid 1px #ffaaaa;
25 .navigation a:visited {
31 </style><link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library"><link rel="up" href="modules.html" title="Filesystem Modules"><link rel="previous" href="gnome-vfs-20-gnome-vfs-ssl.html" title="gnome-vfs-ssl"><link rel="next" href="gnome-vfs-20-gnome-vfs-socket.html" title="gnome-vfs-socket"></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-ssl.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="modules.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-socket.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-context"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">GnomeVFSContext</span></h2><p>GnomeVFSContext —
32 contexts allows modules to track thread usage and cancellation properly</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
36 GnomeVFSContext* <a href="gnome-vfs-20-gnome-vfs-context.html#gnome-vfs-context-new">gnome_vfs_context_new</a> (void);
37 void <a href="gnome-vfs-20-gnome-vfs-context.html#gnome-vfs-context-free">gnome_vfs_context_free</a> (GnomeVFSContext *ctx);
38 GnomeVFSCancellation* <a href="gnome-vfs-20-gnome-vfs-context.html#gnome-vfs-context-get-cancellation">gnome_vfs_context_get_cancellation</a>
39 (const GnomeVFSContext *ctx);
40 #define <a href="gnome-vfs-20-gnome-vfs-context.html#gnome-vfs-context-check-cancellation">gnome_vfs_context_check_cancellation</a>(x)
41 const GnomeVFSContext* <a href="gnome-vfs-20-gnome-vfs-context.html#gnome-vfs-context-peek-current">gnome_vfs_context_peek_current</a>
44 href="../glib/glib-Basic-Types.html#gboolean"
45 >gboolean</a> <a href="gnome-vfs-20-gnome-vfs-context.html#gnome-vfs-context-check-cancellation-current">gnome_vfs_context_check_cancellation_current</a>
47 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
49 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="gnome-vfs-context-new"></a>gnome_vfs_context_new ()</h3><a class="indexterm" name="id2983897"></a><pre class="programlisting">GnomeVFSContext* gnome_vfs_context_new (void);</pre><p>
50 Creates a new context and cancellation object. Must be called
51 from the main glib event loop.</p><p>
53 </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 newly allocated <span class="type">GnomeVFSContext</span>
54 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-context-free"></a>gnome_vfs_context_free ()</h3><a class="indexterm" name="id2983972"></a><pre class="programlisting">void gnome_vfs_context_free (GnomeVFSContext *ctx);</pre><p>
55 Free <i class="parameter"><tt>ctx</tt></i> and destroy the associated <span class="type">GnomeVFSCancellation</span>.</p><p>
57 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctx</tt></i> :</span></td><td> context to be freed
58 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-context-get-cancellation"></a>gnome_vfs_context_get_cancellation ()</h3><a class="indexterm" name="id2984064"></a><pre class="programlisting">GnomeVFSCancellation* gnome_vfs_context_get_cancellation
59 (const GnomeVFSContext *ctx);</pre><p>
60 Retrieve the <span class="type">GnomeVFSCancellation</span> associated with <i class="parameter"><tt>ctx</tt></i>.</p><p>
62 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>ctx</tt></i> :</span></td><td> context to get the <span class="type">GnomeVFSCancellation</span> from
63 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <i class="parameter"><tt>ctx</tt></i> 's <span class="type">GnomeVFSCancellation</span>
64 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-context-check-cancellation"></a>gnome_vfs_context_check_cancellation()</h3><a class="indexterm" name="id2984199"></a><pre class="programlisting">#define gnome_vfs_context_check_cancellation(x)</pre><p>
66 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>x</tt></i> :</span></td><td>
69 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-context-peek-current"></a>gnome_vfs_context_peek_current ()</h3><a class="indexterm" name="id2984255"></a><pre class="programlisting">const GnomeVFSContext* gnome_vfs_context_peek_current
71 Get the currently active context. It shouldn't be
72 manipulated but can be compared to context's the module
73 holds to determine whether they are active.</p><p>
75 </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> the currently active <span class="type">GnomeVFSContext</span>
76 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-context-check-cancellation-current"></a>gnome_vfs_context_check_cancellation_current ()</h3><a class="indexterm" name="id2984334"></a><pre class="programlisting"><a
77 href="../glib/glib-Basic-Types.html#gboolean"
78 >gboolean</a> gnome_vfs_context_check_cancellation_current
80 Check to see if the currently active context has been cancelled.</p><p>
82 </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> <tt class="literal">TRUE</tt> if the currently active context has been cancelled, otherwise <tt class="literal">FALSE</tt>
83 </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-ssl.html"><b><< gnome-vfs-ssl</b></a></td><td align="right"><a accesskey="n" href="gnome-vfs-20-gnome-vfs-socket.html"><b>gnome-vfs-socket >></b></a></td></tr></table></body></html>