<refentry id="ThunarVfsVolume">
<refmeta>
<refentrytitle>ThunarVfsVolume</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>THUNAR-VFS Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>ThunarVfsVolume</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>

#include &lt;thunar-vfs/thunar-vfs.h&gt;


enum        <link linkend="ThunarVfsVolumeKind">ThunarVfsVolumeKind</link>;
enum        <link linkend="ThunarVfsVolumeStatus">ThunarVfsVolumeStatus</link>;
            <link linkend="ThunarVfsVolumeIface">ThunarVfsVolumeIface</link>;
            <link linkend="ThunarVfsVolume-struct">ThunarVfsVolume</link>;
<link linkend="ThunarVfsVolumeKind">ThunarVfsVolumeKind</link> <link linkend="thunar-vfs-volume-get-kind">thunar_vfs_volume_get_kind</link>
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);
const <link linkend="gchar">gchar</link>* <link linkend="thunar-vfs-volume-get-name">thunar_vfs_volume_get_name</link>     (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);
<link linkend="ThunarVfsVolumeStatus">ThunarVfsVolumeStatus</link> <link linkend="thunar-vfs-volume-get-status">thunar_vfs_volume_get_status</link>
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);
<link linkend="ThunarVfsPath">ThunarVfsPath</link>* <link linkend="thunar-vfs-volume-get-mount-point">thunar_vfs_volume_get_mount_point</link>
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);
<link linkend="gboolean">gboolean</link>    <link linkend="thunar-vfs-volume-is-mounted">thunar_vfs_volume_is_mounted</link>    (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);
<link linkend="gboolean">gboolean</link>    <link linkend="thunar-vfs-volume-is-present">thunar_vfs_volume_is_present</link>    (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);
<link linkend="gboolean">gboolean</link>    <link linkend="thunar-vfs-volume-is-removable">thunar_vfs_volume_is_removable</link>  (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);
<link linkend="gboolean">gboolean</link>    <link linkend="thunar-vfs-volume-get-free-space">thunar_vfs_volume_get_free_space</link>
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume,
                                             <link linkend="ThunarVfsFileSize">ThunarVfsFileSize</link> *free_space_return);
const <link linkend="gchar">gchar</link>* <link linkend="thunar-vfs-volume-lookup-icon-name">thunar_vfs_volume_lookup_icon_name</link>
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume,
                                             <link linkend="GtkIconTheme">GtkIconTheme</link> *icon_theme);
<link linkend="void">void</link>        <link linkend="thunar-vfs-volume-changed">thunar_vfs_volume_changed</link>       (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GInterface">GInterface</link>
   +----ThunarVfsVolume
</synopsis>

</refsect1>

<refsect1>
<title>Prerequisites</title>
<para>
ThunarVfsVolume requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>







<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="ThunarVfsVolumeKind"/>enum ThunarVfsVolumeKind</title>
<indexterm><primary>ThunarVfsVolumeKind</primary></indexterm><programlisting>typedef enum
{
  THUNAR_VFS_VOLUME_KIND_UNKNOWN,
  THUNAR_VFS_VOLUME_KIND_CDROM,
  THUNAR_VFS_VOLUME_KIND_DVD,
  THUNAR_VFS_VOLUME_KIND_FLOPPY,
  THUNAR_VFS_VOLUME_KIND_HARDDISK,
  THUNAR_VFS_VOLUME_KIND_USBSTICK,
} ThunarVfsVolumeKind;
</programlisting>
<para>
Describes the type of a VFS volume.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_KIND_UNKNOWN</literal></term>
<listitem><simpara> Unknown volume.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_KIND_CDROM</literal></term>
<listitem><simpara> CD drives.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_KIND_DVD</literal></term>
<listitem><simpara> DVD drives.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_KIND_FLOPPY</literal></term>
<listitem><simpara> Floppy drives.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_KIND_HARDDISK</literal></term>
<listitem><simpara> Hard disk drives.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_KIND_USBSTICK</literal></term>
<listitem><simpara> USB sticks.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="ThunarVfsVolumeStatus"/>enum ThunarVfsVolumeStatus</title>
<indexterm><primary>ThunarVfsVolumeStatus</primary></indexterm><programlisting>typedef enum /*&lt; flags &gt;*/
{
  THUNAR_VFS_VOLUME_STATUS_MOUNTED = 1 &lt;&lt; 0,
  THUNAR_VFS_VOLUME_STATUS_PRESENT = 1 &lt;&lt; 1,
} ThunarVfsVolumeStatus;
</programlisting>
<para>
Describes the current status of a VFS volume.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_STATUS_MOUNTED</literal></term>
<listitem><simpara> Whether or not the media is currently mounted.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>THUNAR_VFS_VOLUME_STATUS_PRESENT</literal></term>
<listitem><simpara> Whether or not a medium is present.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="ThunarVfsVolumeIface"/>ThunarVfsVolumeIface</title>
<indexterm><primary>ThunarVfsVolumeIface</primary></indexterm><programlisting>typedef struct {
  GTypeInterface __parent__;

  /* methods */
  ThunarVfsVolumeKind   (*get_kind)         (ThunarVfsVolume   *volume);
  const gchar          *(*get_name)         (ThunarVfsVolume   *volume);
  ThunarVfsVolumeStatus (*get_status)       (ThunarVfsVolume   *volume);
  ThunarVfsPath        *(*get_mount_point)  (ThunarVfsVolume   *volume);
  gboolean              (*get_free_space)   (ThunarVfsVolume   *volume,
                                             ThunarVfsFileSize *free_space_return);
  const gchar          *(*lookup_icon_name) (ThunarVfsVolume   *volume,
                                             GtkIconTheme      *icon_theme);

  /* signals */
  void (*changed) (ThunarVfsVolume *volume);
} ThunarVfsVolumeIface;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="ThunarVfsVolume-struct"/>ThunarVfsVolume</title>
<indexterm><primary>ThunarVfsVolume</primary></indexterm><programlisting>typedef struct _ThunarVfsVolume ThunarVfsVolume;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-get-kind"/>thunar_vfs_volume_get_kind ()</title>
<indexterm><primary>thunar_vfs_volume_get_kind</primary></indexterm><programlisting><link linkend="ThunarVfsVolumeKind">ThunarVfsVolumeKind</link> thunar_vfs_volume_get_kind
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
Returns the kind of drive/device representd by <parameter>volume</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the kind of <parameter>volume</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-get-name"/>thunar_vfs_volume_get_name ()</title>
<indexterm><primary>thunar_vfs_volume_get_name</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* thunar_vfs_volume_get_name     (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
Returns the name of the <parameter>volume</parameter>. This is usually the
name of the device or the label of the medium, if a
medium is present.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the name of <parameter>volume</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-get-status"/>thunar_vfs_volume_get_status ()</title>
<indexterm><primary>thunar_vfs_volume_get_status</primary></indexterm><programlisting><link linkend="ThunarVfsVolumeStatus">ThunarVfsVolumeStatus</link> thunar_vfs_volume_get_status
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
Determines the current status of the <parameter>volume</parameter>, e.g. whether
or not the <parameter>volume</parameter> is currently mounted, or whether a
medium is present.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the status for <parameter>volume</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-get-mount-point"/>thunar_vfs_volume_get_mount_point ()</title>
<indexterm><primary>thunar_vfs_volume_get_mount_point</primary></indexterm><programlisting><link linkend="ThunarVfsPath">ThunarVfsPath</link>* thunar_vfs_volume_get_mount_point
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the path which identifies the path where
              the volume will be mounted (or is already
              mounted).
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-is-mounted"/>thunar_vfs_volume_is_mounted ()</title>
<indexterm><primary>thunar_vfs_volume_is_mounted</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    thunar_vfs_volume_is_mounted    (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
Determines whether <parameter>volume</parameter> is currently mounted into the
filesystem hierarchy.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if <parameter>volume</parameter> is mounted, else <literal>FALSE</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-is-present"/>thunar_vfs_volume_is_present ()</title>
<indexterm><primary>thunar_vfs_volume_is_present</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    thunar_vfs_volume_is_present    (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
Determines whether a medium is currently inserted for
<parameter>volume</parameter>, e.g. for a CD-ROM drive, this will be <literal>TRUE</literal>
only if a disc is present in the slot.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if <parameter>volume</parameter> is present, else <literal>FALSE</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-is-removable"/>thunar_vfs_volume_is_removable ()</title>
<indexterm><primary>thunar_vfs_volume_is_removable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    thunar_vfs_volume_is_removable  (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
Determines whether <parameter>volume</parameter> is a removable device, for example
a CD-ROM or a floppy drive.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if <parameter>volume</parameter> is a removable device, else <literal>FALSE</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-get-free-space"/>thunar_vfs_volume_get_free_space ()</title>
<indexterm><primary>thunar_vfs_volume_get_free_space</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    thunar_vfs_volume_get_free_space
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume,
                                             <link linkend="ThunarVfsFileSize">ThunarVfsFileSize</link> *free_space_return);</programlisting>
<para>
Tries to determine the number of available bytes on the specified
<parameter>volume</parameter> and places the result to the memory pointed to by
<parameter>free_space_return</parameter>. The returned amount of bytes represents the
space available to the current user, which may be different from
the total free amount.
</para>
<para>
If <parameter>volume</parameter> is unable to determine the free space, <literal>FALSE</literal> will be
returned and <parameter>free_space_return</parameter> won't be set.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>free_space_return</parameter>&nbsp;:</term>
<listitem><simpara> location to store the free space to.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if the free amount was determined successfully,
              else <literal>FALSE</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-lookup-icon-name"/>thunar_vfs_volume_lookup_icon_name ()</title>
<indexterm><primary>thunar_vfs_volume_lookup_icon_name</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* thunar_vfs_volume_lookup_icon_name
                                            (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume,
                                             <link linkend="GtkIconTheme">GtkIconTheme</link> *icon_theme);</programlisting>
<para>
Tries to find a suitable icon for <parameter>volume</parameter> in the given <parameter>icon_theme</parameter> and
returns its name. If no suitable icon is found in <parameter>icon_theme</parameter>, then
a fallback icon name will be returned. This way you can always count
on this method to return a valid string.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>icon_theme</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GtkIconTheme"><type>GtkIconTheme</type></link> instance.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the icon name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-volume-changed"/>thunar_vfs_volume_changed ()</title>
<indexterm><primary>thunar_vfs_volume_changed</primary></indexterm><programlisting><link linkend="void">void</link>        thunar_vfs_volume_changed       (<link linkend="ThunarVfsVolume">ThunarVfsVolume</link> *volume);</programlisting>
<para>
Emits the "changed" signal on <parameter>volume</parameter>. This function should
only be used by implementations of the <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link>
interface.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>volume</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsVolume"><type>ThunarVfsVolume</type></link> instance.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
