<refentry id="gnome-vfs-20-gnome-vfs-context">
<refmeta>
<refentrytitle id="top_of_page">GnomeVFSContext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOME-VFS-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GnomeVFSContext</refname>
<refpurpose>
contexts allows modules to track thread usage and cancellation properly</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="synopsis">
<title id="synopsis.title">Synopsis</title>

<synopsis>



<link linkend="GnomeVFSContext">GnomeVFSContext</link>* <link linkend="gnome-vfs-context-new">gnome_vfs_context_new</link>      (void);
<link linkend="void">void</link>        <link linkend="gnome-vfs-context-free">gnome_vfs_context_free</link>          (<link linkend="GnomeVFSContext">GnomeVFSContext</link> *ctx);
<link linkend="GnomeVFSCancellation">GnomeVFSCancellation</link>* <link linkend="gnome-vfs-context-get-cancellation">gnome_vfs_context_get_cancellation</link>
                                            (const <link linkend="GnomeVFSContext">GnomeVFSContext</link> *ctx);
#define     <link linkend="gnome-vfs-context-check-cancellation">gnome_vfs_context_check_cancellation</link>(x)
const <link linkend="GnomeVFSContext">GnomeVFSContext</link>* <link linkend="gnome-vfs-context-peek-current">gnome_vfs_context_peek_current</link>
                                            (void);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-context-check-cancellation-current">gnome_vfs_context_check_cancellation_current</link>
                                            (void);
</synopsis>
</refsynopsisdiv>









<refsect1 id="desc">
<title id="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="details">
<title id="details.title">Details</title>
<refsect2>
<title><anchor id="gnome-vfs-context-new" role="function"/>gnome_vfs_context_new ()</title>
<indexterm><primary>gnome_vfs_context_new</primary></indexterm><programlisting><link linkend="GnomeVFSContext">GnomeVFSContext</link>* gnome_vfs_context_new      (void);</programlisting>
<para>
Creates a new context and cancellation object. Must be called
from the main glib event loop.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated <link linkend="GnomeVFSContext"><type>GnomeVFSContext</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-context-free" role="function"/>gnome_vfs_context_free ()</title>
<indexterm><primary>gnome_vfs_context_free</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_context_free          (<link linkend="GnomeVFSContext">GnomeVFSContext</link> *ctx);</programlisting>
<para>
Free <parameter>ctx</parameter> and destroy the associated <link linkend="GnomeVFSCancellation"><type>GnomeVFSCancellation</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&nbsp;:</term>
<listitem><simpara> context to be freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-context-get-cancellation" role="function"/>gnome_vfs_context_get_cancellation ()</title>
<indexterm><primary>gnome_vfs_context_get_cancellation</primary></indexterm><programlisting><link linkend="GnomeVFSCancellation">GnomeVFSCancellation</link>* gnome_vfs_context_get_cancellation
                                            (const <link linkend="GnomeVFSContext">GnomeVFSContext</link> *ctx);</programlisting>
<para>
Retrieve the <link linkend="GnomeVFSCancellation"><type>GnomeVFSCancellation</type></link> associated with <parameter>ctx</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&nbsp;:</term>
<listitem><simpara> context to get the <link linkend="GnomeVFSCancellation"><type>GnomeVFSCancellation</type></link> from.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <parameter>ctx</parameter> 's <link linkend="GnomeVFSCancellation"><type>GnomeVFSCancellation</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-context-check-cancellation" role="macro"/>gnome_vfs_context_check_cancellation()</title>
<indexterm><primary>gnome_vfs_context_check_cancellation</primary></indexterm><programlisting>#define     gnome_vfs_context_check_cancellation(x)</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>x</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-context-peek-current" role="function"/>gnome_vfs_context_peek_current ()</title>
<indexterm><primary>gnome_vfs_context_peek_current</primary></indexterm><programlisting>const <link linkend="GnomeVFSContext">GnomeVFSContext</link>* gnome_vfs_context_peek_current
                                            (void);</programlisting>
<para>
Get the currently active context. It shouldn't be
manipulated but can be compared to contexts module
holds to determine whether they are active.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the currently active <link linkend="GnomeVFSContext"><type>GnomeVFSContext</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-context-check-cancellation-current" role="function"/>gnome_vfs_context_check_cancellation_current ()</title>
<indexterm><primary>gnome_vfs_context_check_cancellation_current</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_context_check_cancellation_current
                                            (void);</programlisting>
<para>
Check to see if the currently active context has been cancelled.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if the currently active context has been cancelled, otherwise <literal>FALSE</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
