<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="GVolumeMonitor">
<refmeta>
<refentrytitle role="top_of_page" id="GVolumeMonitor.top_of_page">GVolumeMonitor</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GIO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GVolumeMonitor</refname>
<refpurpose>Volume Monitor</refpurpose>
</refnamediv>

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

<synopsis>

#include &lt;gio/gio.h&gt;

                    <link linkend="GVolumeMonitor-struct">GVolumeMonitor</link>;
#define             <link linkend="G-VOLUME-MONITOR-EXTENSION-POINT-NAME--CAPS">G_VOLUME_MONITOR_EXTENSION_POINT_NAME</link>
<link linkend="GVolumeMonitor">GVolumeMonitor</link> *    <link linkend="g-volume-monitor-get">g_volume_monitor_get</link>                (void);
<link linkend="GList">GList</link> *             <link linkend="g-volume-monitor-get-connected-drives">g_volume_monitor_get_connected_drives</link>
                                                        (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor);
<link linkend="GList">GList</link> *             <link linkend="g-volume-monitor-get-volumes">g_volume_monitor_get_volumes</link>        (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor);
<link linkend="GList">GList</link> *             <link linkend="g-volume-monitor-get-mounts">g_volume_monitor_get_mounts</link>         (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor);
<link linkend="GVolume">GVolume</link> *           <link linkend="g-volume-monitor-adopt-orphan-mount">g_volume_monitor_adopt_orphan_mount</link> (<link linkend="GMount">GMount</link> *mount);
<link linkend="GMount">GMount</link> *            <link linkend="g-volume-monitor-get-mount-for-uuid">g_volume_monitor_get_mount_for_uuid</link> (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                         const <link linkend="char">char</link> *uuid);
<link linkend="GVolume">GVolume</link> *           <link linkend="g-volume-monitor-get-volume-for-uuid">g_volume_monitor_get_volume_for_uuid</link>
                                                        (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                         const <link linkend="char">char</link> *uuid);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GVolumeMonitor.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GVolumeMonitor
</synopsis>
</refsect1>






<refsect1 id="GVolumeMonitor.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GVolumeMonitor-drive-changed">drive-changed</link>&quot;                                  : Run Last
  &quot;<link linkend="GVolumeMonitor-drive-connected">drive-connected</link>&quot;                                : Run Last
  &quot;<link linkend="GVolumeMonitor-drive-disconnected">drive-disconnected</link>&quot;                             : Run Last
  &quot;<link linkend="GVolumeMonitor-drive-eject-button">drive-eject-button</link>&quot;                             : Run Last
  &quot;<link linkend="GVolumeMonitor-drive-stop-button">drive-stop-button</link>&quot;                              : Run Last
  &quot;<link linkend="GVolumeMonitor-mount-added">mount-added</link>&quot;                                    : Run Last
  &quot;<link linkend="GVolumeMonitor-mount-changed">mount-changed</link>&quot;                                  : Run Last
  &quot;<link linkend="GVolumeMonitor-mount-pre-unmount">mount-pre-unmount</link>&quot;                              : Run Last
  &quot;<link linkend="GVolumeMonitor-mount-removed">mount-removed</link>&quot;                                  : Run Last
  &quot;<link linkend="GVolumeMonitor-volume-added">volume-added</link>&quot;                                   : Run Last
  &quot;<link linkend="GVolumeMonitor-volume-changed">volume-changed</link>&quot;                                 : Run Last
  &quot;<link linkend="GVolumeMonitor-volume-removed">volume-removed</link>&quot;                                 : Run Last
</synopsis>
</refsect1>


<refsect1 id="GVolumeMonitor.description" role="desc">
<title role="desc.title">Description</title>
<para>
<link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link> is for listing the user interesting devices and volumes
on the computer. In other words, what a file selector or file manager
would show in a sidebar. 
</para>
<para>
<link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link> is not <link
linkend="g-main-context-push-thread-default">thread-default-context
aware</link>, and so should not be used other than from the main
thread, with no thread-default-context active.</para>
<para>
</para>
</refsect1>

<refsect1 id="GVolumeMonitor.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GVolumeMonitor-struct" role="struct">
<title>GVolumeMonitor</title>
<indexterm zone="GVolumeMonitor-struct"><primary sortas="VolumeMonitor">GVolumeMonitor</primary></indexterm><programlisting>typedef struct _GVolumeMonitor GVolumeMonitor;</programlisting>
<para>
A Volume Monitor that watches for volume events.</para>
<para>
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="G-VOLUME-MONITOR-EXTENSION-POINT-NAME--CAPS" role="macro">
<title>G_VOLUME_MONITOR_EXTENSION_POINT_NAME</title>
<indexterm zone="G-VOLUME-MONITOR-EXTENSION-POINT-NAME--CAPS"><primary sortas="VOLUME_MONITOR_EXTENSION_POINT_NAME">G_VOLUME_MONITOR_EXTENSION_POINT_NAME</primary></indexterm><programlisting>#define G_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-volume-monitor"
</programlisting>
<para>
Extension point for volume monitor functionality.
See <link linkend="extending-gio">Extending GIO</link>.</para>
<para>
</para></refsect2>
<refsect2 id="g-volume-monitor-get" role="function">
<title>g_volume_monitor_get ()</title>
<indexterm zone="g-volume-monitor-get"><primary sortas="volume_monitor_get">g_volume_monitor_get</primary></indexterm><programlisting><link linkend="GVolumeMonitor">GVolumeMonitor</link> *    g_volume_monitor_get                (void);</programlisting>
<para>
Gets the volume monitor used by gio.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a reference to the <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link> used by gio. Call
   <link linkend="g-object-unref"><function>g_object_unref()</function></link> when done with it.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-volume-monitor-get-connected-drives" role="function">
<title>g_volume_monitor_get_connected_drives ()</title>
<indexterm zone="g-volume-monitor-get-connected-drives"><primary sortas="volume_monitor_get_connected_drives">g_volume_monitor_get_connected_drives</primary></indexterm><programlisting><link linkend="GList">GList</link> *             g_volume_monitor_get_connected_drives
                                                        (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor);</programlisting>
<para>
Gets a list of drives connected to the system.
</para>
<para>
The returned list should be freed with <link linkend="g-list-free"><function>g_list_free()</function></link>, after
its elements have been unreffed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of connected <link linkend="GDrive"><type>GDrive</type></link> objects.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-volume-monitor-get-volumes" role="function">
<title>g_volume_monitor_get_volumes ()</title>
<indexterm zone="g-volume-monitor-get-volumes"><primary sortas="volume_monitor_get_volumes">g_volume_monitor_get_volumes</primary></indexterm><programlisting><link linkend="GList">GList</link> *             g_volume_monitor_get_volumes        (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor);</programlisting>
<para>
Gets a list of the volumes on the system.
</para>
<para>
The returned list should be freed with <link linkend="g-list-free"><function>g_list_free()</function></link>, after
its elements have been unreffed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="GVolume"><type>GVolume</type></link> objects.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-volume-monitor-get-mounts" role="function">
<title>g_volume_monitor_get_mounts ()</title>
<indexterm zone="g-volume-monitor-get-mounts"><primary sortas="volume_monitor_get_mounts">g_volume_monitor_get_mounts</primary></indexterm><programlisting><link linkend="GList">GList</link> *             g_volume_monitor_get_mounts         (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor);</programlisting>
<para>
Gets a list of the mounts on the system.
</para>
<para>
The returned list should be freed with <link linkend="g-list-free"><function>g_list_free()</function></link>, after
its elements have been unreffed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="GMount"><type>GMount</type></link> objects.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-volume-monitor-adopt-orphan-mount" role="function" condition="deprecated">
<title>g_volume_monitor_adopt_orphan_mount ()</title>
<indexterm zone="g-volume-monitor-adopt-orphan-mount" role="deprecated"><primary sortas="volume_monitor_adopt_orphan_mount">g_volume_monitor_adopt_orphan_mount</primary></indexterm><programlisting><link linkend="GVolume">GVolume</link> *           g_volume_monitor_adopt_orphan_mount (<link linkend="GMount">GMount</link> *mount);</programlisting>
<warning><para><literal>g_volume_monitor_adopt_orphan_mount</literal> has been deprecated since version 2.20 and should not be used in newly-written code. Instead of using this function, <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>
implementations should instead create shadow mounts with the URI of
the mount they intend to adopt. See the proxy volume monitor in
gvfs for an example of this. Also see <link linkend="g-mount-is-shadowed"><function>g_mount_is_shadowed()</function></link>,
<link linkend="g-mount-shadow"><function>g_mount_shadow()</function></link> and <link linkend="g-mount-unshadow"><function>g_mount_unshadow()</function></link> functions.</para></warning>
<para>
This function should be called by any <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>
implementation when a new <link linkend="GMount"><type>GMount</type></link> object is created that is not
associated with a <link linkend="GVolume"><type>GVolume</type></link> object. It must be called just before
emitting the <parameter>mount_added</parameter> signal.
</para>
<para>
If the return value is not <link linkend="NULL--CAPS"><literal>NULL</literal></link>, the caller must associate the
returned <link linkend="GVolume"><type>GVolume</type></link> object with the <link linkend="GMount"><type>GMount</type></link>. This involves returning
it in its <link linkend="g-mount-get-volume"><function>g_mount_get_volume()</function></link> implementation. The caller must
also listen for the "removed" signal on the returned object
and give up its reference when handling that signal
</para>
<para>
Similary, if implementing <link linkend="g-volume-monitor-adopt-orphan-mount"><function>g_volume_monitor_adopt_orphan_mount()</function></link>,
the implementor must take a reference to <parameter>mount</parameter> and return it in
its <link linkend="g-volume-get-mount"><function>g_volume_get_mount()</function></link> implemented. Also, the implementor must
listen for the "unmounted" signal on <parameter>mount</parameter> and give up its
reference upon handling that signal.
</para>
<para>
There are two main use cases for this function.
</para>
<para>
One is when implementing a user space file system driver that reads
blocks of a block device that is already represented by the native
volume monitor (for example a CD Audio file system driver). Such
a driver will generate its own <link linkend="GMount"><type>GMount</type></link> object that needs to be
assoicated with the <link linkend="GVolume"><type>GVolume</type></link> object that represents the volume.
</para>
<para>
The other is for implementing a <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link> whose sole purpose
is to return <link linkend="GVolume"><type>GVolume</type></link> objects representing entries in the users
"favorite servers" list or similar.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>mount</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> object to find a parent for
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GVolume"><type>GVolume</type></link> object that is the parent for <parameter>mount</parameter> or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
if no wants to adopt the <link linkend="GMount"><type>GMount</type></link>.

</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-volume-monitor-get-mount-for-uuid" role="function">
<title>g_volume_monitor_get_mount_for_uuid ()</title>
<indexterm zone="g-volume-monitor-get-mount-for-uuid"><primary sortas="volume_monitor_get_mount_for_uuid">g_volume_monitor_get_mount_for_uuid</primary></indexterm><programlisting><link linkend="GMount">GMount</link> *            g_volume_monitor_get_mount_for_uuid (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                         const <link linkend="char">char</link> *uuid);</programlisting>
<para>
Finds a <link linkend="GMount"><type>GMount</type></link> object by its UUID (see <link linkend="g-mount-get-uuid"><function>g_mount_get_uuid()</function></link>)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uuid</parameter>&#160;:</term>
<listitem><simpara> the UUID to look for
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if no such mount is available.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-volume-monitor-get-volume-for-uuid" role="function">
<title>g_volume_monitor_get_volume_for_uuid ()</title>
<indexterm zone="g-volume-monitor-get-volume-for-uuid"><primary sortas="volume_monitor_get_volume_for_uuid">g_volume_monitor_get_volume_for_uuid</primary></indexterm><programlisting><link linkend="GVolume">GVolume</link> *           g_volume_monitor_get_volume_for_uuid
                                                        (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                         const <link linkend="char">char</link> *uuid);</programlisting>
<para>
Finds a <link linkend="GVolume"><type>GVolume</type></link> object by its UUID (see <link linkend="g-volume-get-uuid"><function>g_volume_get_uuid()</function></link>)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolumeMonitor"><type>GVolumeMonitor</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uuid</parameter>&#160;:</term>
<listitem><simpara> the UUID to look for
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link> or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if no such volume is available.
    Free the returned object with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

<refsect1 id="GVolumeMonitor.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GVolumeMonitor-drive-changed" role="signal"><title>The <literal>&quot;drive-changed&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-drive-changed"><primary sortas="VolumeMonitor::drive-changed">GVolumeMonitor::drive-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GDrive">GDrive</link>         *drive,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a drive changes.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drive</parameter>&#160;:</term>
<listitem><simpara> the drive that changed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-drive-connected" role="signal"><title>The <literal>&quot;drive-connected&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-drive-connected"><primary sortas="VolumeMonitor::drive-connected">GVolumeMonitor::drive-connected</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GDrive">GDrive</link>         *drive,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a drive is connected to the system.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drive</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GDrive"><type>GDrive</type></link> that was connected.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-drive-disconnected" role="signal"><title>The <literal>&quot;drive-disconnected&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-drive-disconnected"><primary sortas="VolumeMonitor::drive-disconnected">GVolumeMonitor::drive-disconnected</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GDrive">GDrive</link>         *drive,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a drive is disconnected from the system.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drive</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GDrive"><type>GDrive</type></link> that was disconnected.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-drive-eject-button" role="signal"><title>The <literal>&quot;drive-eject-button&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-drive-eject-button" role="2.18"><primary sortas="VolumeMonitor::drive-eject-button">GVolumeMonitor::drive-eject-button</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GDrive">GDrive</link>         *drive,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when the eject button is pressed on <parameter>drive</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drive</parameter>&#160;:</term>
<listitem><simpara> the drive where the eject button was pressed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.18</para></refsect2><refsect2 id="GVolumeMonitor-drive-stop-button" role="signal"><title>The <literal>&quot;drive-stop-button&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-drive-stop-button" role="2.22"><primary sortas="VolumeMonitor::drive-stop-button">GVolumeMonitor::drive-stop-button</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GDrive">GDrive</link>         *drive,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when the stop button is pressed on <parameter>drive</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>drive</parameter>&#160;:</term>
<listitem><simpara> the drive where the stop button was pressed
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.22</para></refsect2><refsect2 id="GVolumeMonitor-mount-added" role="signal"><title>The <literal>&quot;mount-added&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-mount-added"><primary sortas="VolumeMonitor::mount-added">GVolumeMonitor::mount-added</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GMount">GMount</link>         *mount,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a mount is added.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> that was added.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-mount-changed" role="signal"><title>The <literal>&quot;mount-changed&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-mount-changed"><primary sortas="VolumeMonitor::mount-changed">GVolumeMonitor::mount-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GMount">GMount</link>         *mount,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a mount changes.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> that changed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-mount-pre-unmount" role="signal"><title>The <literal>&quot;mount-pre-unmount&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-mount-pre-unmount"><primary sortas="VolumeMonitor::mount-pre-unmount">GVolumeMonitor::mount-pre-unmount</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GMount">GMount</link>         *mount,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a mount is about to be removed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> that is being unmounted.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-mount-removed" role="signal"><title>The <literal>&quot;mount-removed&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-mount-removed"><primary sortas="VolumeMonitor::mount-removed">GVolumeMonitor::mount-removed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GMount">GMount</link>         *mount,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a mount is removed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mount</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GMount"><type>GMount</type></link> that was removed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-volume-added" role="signal"><title>The <literal>&quot;volume-added&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-volume-added"><primary sortas="VolumeMonitor::volume-added">GVolumeMonitor::volume-added</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GVolume">GVolume</link>        *volume,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a mountable volume is added to the system.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link> that was added.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-volume-changed" role="signal"><title>The <literal>&quot;volume-changed&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-volume-changed"><primary sortas="VolumeMonitor::volume-changed">GVolumeMonitor::volume-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GVolume">GVolume</link>        *volume,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when mountable volume is changed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link> that changed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GVolumeMonitor-volume-removed" role="signal"><title>The <literal>&quot;volume-removed&quot;</literal> signal</title>
<indexterm zone="GVolumeMonitor-volume-removed"><primary sortas="VolumeMonitor::volume-removed">GVolumeMonitor::volume-removed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GVolumeMonitor">GVolumeMonitor</link> *volume_monitor,
                                                        <link linkend="GVolume">GVolume</link>        *volume,
                                                        <link linkend="gpointer">gpointer</link>        user_data)           : Run Last</programlisting>
<para>
Emitted when a mountable volume is removed from the system.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>volume_monitor</parameter>&#160;:</term>
<listitem><simpara> The volume monitor emitting the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>volume</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GVolume"><type>GVolume</type></link> that was removed.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>


<refsect1 id="GVolumeMonitor.see-also">
<title>See Also</title>
#GFileMonitor
</refsect1>

</refentry>
