1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GnomeVFSVolumeMonitor</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7
<link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
8
<link rel="up" href="volumes.html" title="Volumes and Drives Handling">
9
<link rel="prev" href="gnome-vfs-2.0-gnome-vfs-drive.html" title="GnomeVFSDrive">
10
<link rel="next" href="networking.html" title="Networking">
11
<meta name="generator" content="GTK-Doc V1.12 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
14
<link rel="chapter" href="data-types.html" title="Basic Data Types">
15
<link rel="chapter" href="gnome-vfs-basic-file-ops.html" title="File Operations">
16
<link rel="chapter" href="gnome-vfs-directory-ops.html" title="Directory-Specific Operations">
17
<link rel="chapter" href="gnome-vfs-file-and-dirs-ops.html" title="Advanced File/Directory Operations">
18
<link rel="chapter" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
19
<link rel="chapter" href="volumes.html" title="Volumes and Drives Handling">
20
<link rel="chapter" href="networking.html" title="Networking">
21
<link rel="chapter" href="mime-registry.html" title="MIME Registry">
22
<link rel="chapter" href="modules.html" title="Filesystem Modules">
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
25
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
27
<td><a accesskey="p" href="gnome-vfs-2.0-gnome-vfs-drive.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
28
<td><a accesskey="u" href="volumes.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
29
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
30
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
31
<td><a accesskey="n" href="networking.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
33
<tr><td colspan="5" class="shortcuts">
34
<a href="#gnome-vfs-2.0-gnome-vfs-volume-monitor.synopsis" class="shortcut">Top</a>
36
<a href="#gnome-vfs-2.0-gnome-vfs-volume-monitor.description" class="shortcut">Description</a>
38
<a href="#gnome-vfs-2.0-gnome-vfs-volume-monitor.object-hierarchy" class="shortcut">Object Hierarchy</a>
40
<a href="#gnome-vfs-2.0-gnome-vfs-volume-monitor.signals" class="shortcut">Signals</a>
43
<div class="refentry" lang="en">
44
<a name="gnome-vfs-2.0-gnome-vfs-volume-monitor"></a><div class="titlepage"></div>
45
<div class="refnamediv"><table width="100%"><tr>
47
<h2><span class="refentrytitle"><a name="gnome-vfs-2.0-gnome-vfs-volume-monitor.top_of_page"></a>GnomeVFSVolumeMonitor</span></h2>
48
<p>GnomeVFSVolumeMonitor — Monitors volume mounts and unmounts</p>
50
<td valign="top" align="right"></td>
52
<div class="refsynopsisdiv">
53
<a name="gnome-vfs-2.0-gnome-vfs-volume-monitor.synopsis"></a><h2>Synopsis</h2>
54
<a name="GnomeVFSVolumeMonitor"></a><pre class="synopsis">
55
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GNOME-IS-VFS-VOLUME-MONITOR:CAPS" title="GNOME_IS_VFS_VOLUME_MONITOR()">GNOME_IS_VFS_VOLUME_MONITOR</a> (o)
56
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GNOME-IS-VFS-VOLUME-MONITOR-CLASS:CAPS" title="GNOME_IS_VFS_VOLUME_MONITOR_CLASS()">GNOME_IS_VFS_VOLUME_MONITOR_CLASS</a> (k)
57
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GNOME-VFS-TYPE-VOLUME-MONITOR:CAPS" title="GNOME_VFS_TYPE_VOLUME_MONITOR">GNOME_VFS_TYPE_VOLUME_MONITOR</a>
58
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GNOME-VFS-VOLUME-MONITOR:CAPS" title="GNOME_VFS_VOLUME_MONITOR()">GNOME_VFS_VOLUME_MONITOR</a> (o)
59
#define <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GNOME-VFS-VOLUME-MONITOR-CLASS:CAPS" title="GNOME_VFS_VOLUME_MONITOR_CLASS()">GNOME_VFS_VOLUME_MONITOR_CLASS</a> (k)
60
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor-struct" title="GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a>;
61
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitorClass" title="GnomeVFSVolumeMonitorClass">GnomeVFSVolumeMonitorClass</a>;
62
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> * <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-get-volume-monitor" title="gnome_vfs_get_volume_monitor ()">gnome_vfs_get_volume_monitor</a> (void);
63
GList * <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-connected-drives" title="gnome_vfs_volume_monitor_get_connected_drives ()">gnome_vfs_volume_monitor_get_connected_drives</a>
64
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);
65
<a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive">GnomeVFSDrive</a> * <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-drive-by-id" title="gnome_vfs_volume_monitor_get_drive_by_id ()">gnome_vfs_volume_monitor_get_drive_by_id</a>
66
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
68
GList * <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-mounted-volumes" title="gnome_vfs_volume_monitor_get_mounted_volumes ()">gnome_vfs_volume_monitor_get_mounted_volumes</a>
69
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);
70
GType <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-type" title="gnome_vfs_volume_monitor_get_type ()">gnome_vfs_volume_monitor_get_type</a> (void);
71
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume">GnomeVFSVolume</a> * <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-volume-by-id" title="gnome_vfs_volume_monitor_get_volume_by_id ()">gnome_vfs_volume_monitor_get_volume_by_id</a>
72
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
74
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume">GnomeVFSVolume</a> * <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-volume-for-path" title="gnome_vfs_volume_monitor_get_volume_for_path ()">gnome_vfs_volume_monitor_get_volume_for_path</a>
75
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
77
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> * <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-ref" title="gnome_vfs_volume_monitor_ref ()">gnome_vfs_volume_monitor_ref</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);
78
void <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-unref" title="gnome_vfs_volume_monitor_unref ()">gnome_vfs_volume_monitor_unref</a> (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);
81
<div class="refsect1" lang="en">
82
<a name="gnome-vfs-2.0-gnome-vfs-volume-monitor.object-hierarchy"></a><h2>Object Hierarchy</h2>
83
<pre class="synopsis">
85
+----GnomeVFSVolumeMonitor
88
<div class="refsect1" lang="en">
89
<a name="gnome-vfs-2.0-gnome-vfs-volume-monitor.signals"></a><h2>Signals</h2>
90
<pre class="synopsis">
91
"<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor-drive-connected" title='The "drive-connected" signal'>drive-connected</a>" : Run First
92
"<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor-drive-disconnected" title='The "drive-disconnected" signal'>drive-disconnected</a>" : Run First
93
"<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor-volume-mounted" title='The "volume-mounted" signal'>volume-mounted</a>" : Run First
94
"<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor-volume-pre-unmount" title='The "volume-pre-unmount" signal'>volume-pre-unmount</a>" : Run First
95
"<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor-volume-unmounted" title='The "volume-unmounted" signal'>volume-unmounted</a>" : Run First
98
<div class="refsect1" lang="en">
99
<a name="gnome-vfs-2.0-gnome-vfs-volume-monitor.description"></a><h2>Description</h2>
103
<div class="refsect1" lang="en">
104
<a name="gnome-vfs-2.0-gnome-vfs-volume-monitor.details"></a><h2>Details</h2>
105
<div class="refsect2" lang="en">
106
<a name="GNOME-IS-VFS-VOLUME-MONITOR:CAPS"></a><h3>GNOME_IS_VFS_VOLUME_MONITOR()</h3>
107
<pre class="programlisting">#define GNOME_IS_VFS_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_VFS_TYPE_VOLUME_MONITOR))
111
<div class="variablelist"><table border="0">
112
<col align="left" valign="top">
114
<td><p><span class="term"><em class="parameter"><code>o</code></em> :</span></p></td>
121
<div class="refsect2" lang="en">
122
<a name="GNOME-IS-VFS-VOLUME-MONITOR-CLASS:CAPS"></a><h3>GNOME_IS_VFS_VOLUME_MONITOR_CLASS()</h3>
123
<pre class="programlisting">#define GNOME_IS_VFS_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_VFS_TYPE_VOLUME_MONITOR))
127
<div class="variablelist"><table border="0">
128
<col align="left" valign="top">
130
<td><p><span class="term"><em class="parameter"><code>k</code></em> :</span></p></td>
137
<div class="refsect2" lang="en">
138
<a name="GNOME-VFS-TYPE-VOLUME-MONITOR:CAPS"></a><h3>GNOME_VFS_TYPE_VOLUME_MONITOR</h3>
139
<pre class="programlisting">#define GNOME_VFS_TYPE_VOLUME_MONITOR (gnome_vfs_volume_monitor_get_type ())
145
<div class="refsect2" lang="en">
146
<a name="GNOME-VFS-VOLUME-MONITOR:CAPS"></a><h3>GNOME_VFS_VOLUME_MONITOR()</h3>
147
<pre class="programlisting">#define GNOME_VFS_VOLUME_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_VFS_TYPE_VOLUME_MONITOR, GnomeVFSVolumeMonitor))
151
<div class="variablelist"><table border="0">
152
<col align="left" valign="top">
154
<td><p><span class="term"><em class="parameter"><code>o</code></em> :</span></p></td>
161
<div class="refsect2" lang="en">
162
<a name="GNOME-VFS-VOLUME-MONITOR-CLASS:CAPS"></a><h3>GNOME_VFS_VOLUME_MONITOR_CLASS()</h3>
163
<pre class="programlisting">#define GNOME_VFS_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNOME_VFS_TYPE_VOLUME_MONITOR, GnomeVFSVolumeMonitorClass))
167
<div class="variablelist"><table border="0">
168
<col align="left" valign="top">
170
<td><p><span class="term"><em class="parameter"><code>k</code></em> :</span></p></td>
177
<div class="refsect2" lang="en">
178
<a name="GnomeVFSVolumeMonitor-struct"></a><h3>GnomeVFSVolumeMonitor</h3>
179
<pre class="programlisting">typedef struct _GnomeVFSVolumeMonitor GnomeVFSVolumeMonitor;</pre>
184
<div class="refsect2" lang="en">
185
<a name="GnomeVFSVolumeMonitorClass"></a><h3>GnomeVFSVolumeMonitorClass</h3>
186
<pre class="programlisting">typedef struct {
187
GObjectClass parent_class;
190
void (* volume_mounted) (GnomeVFSVolumeMonitor *volume_monitor,
191
GnomeVFSVolume *volume);
192
void (* volume_pre_unmount) (GnomeVFSVolumeMonitor *volume_monitor,
193
GnomeVFSVolume *volume);
194
void (* volume_unmounted) (GnomeVFSVolumeMonitor *volume_monitor,
195
GnomeVFSVolume *volume);
196
void (* drive_connected) (GnomeVFSVolumeMonitor *volume_monitor,
197
GnomeVFSDrive *drive);
198
void (* drive_disconnected) (GnomeVFSVolumeMonitor *volume_monitor,
199
GnomeVFSDrive *drive);
200
} GnomeVFSVolumeMonitorClass;
206
<div class="refsect2" lang="en">
207
<a name="gnome-vfs-get-volume-monitor"></a><h3>gnome_vfs_get_volume_monitor ()</h3>
208
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> * gnome_vfs_get_volume_monitor (void);</pre>
210
Returns a pointer to the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> singleton.
211
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> is a singleton, this means it is guaranteed to
212
exist and be valid until <a class="link" href="gnome-vfs-2.0-gnome-vfs-init.html#gnome-vfs-shutdown" title="gnome_vfs_shutdown ()"><code class="function">gnome_vfs_shutdown()</code></a> is called. Consequently,
213
it doesn't need to be refcounted since gnome-vfs will hold a reference to
214
it until it is shut down.</p>
217
<div class="variablelist"><table border="0">
218
<col align="left" valign="top">
220
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
221
<td> a pointer to the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> singleton.
226
<p class="since">Since 2.6</p>
229
<div class="refsect2" lang="en">
230
<a name="gnome-vfs-volume-monitor-get-connected-drives"></a><h3>gnome_vfs_volume_monitor_get_connected_drives ()</h3>
231
<pre class="programlisting">GList * gnome_vfs_volume_monitor_get_connected_drives
232
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);</pre>
234
Returns a <span class="type">GList</span> of all drives connected to the machine.
235
The <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> objects must be unreffed by the caller when
236
no longer needed with <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#gnome-vfs-drive-unref" title="gnome_vfs_drive_unref ()"><code class="function">gnome_vfs_drive_unref()</code></a> and the <span class="type">GList</span> must
240
<div class="variablelist"><table border="0">
241
<col align="left" valign="top">
244
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
245
<td> a <span class="type">GnomeVFSVolumeMonitor.</span>
249
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
250
<td> a <span class="type">GList</span> of all connected drives.
256
<p class="since">Since 2.6</p>
259
<div class="refsect2" lang="en">
260
<a name="gnome-vfs-volume-monitor-get-drive-by-id"></a><h3>gnome_vfs_volume_monitor_get_drive_by_id ()</h3>
261
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive">GnomeVFSDrive</a> * gnome_vfs_volume_monitor_get_drive_by_id
262
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
265
Looks for a <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> whose id is <em class="parameter"><code>id</code></em>. A valid <em class="parameter"><code>volume_monitor</code></em> to pass
266
to this function can be acquired using <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-get-volume-monitor" title="gnome_vfs_get_volume_monitor ()"><code class="function">gnome_vfs_get_volume_monitor()</code></a></p>
269
<div class="variablelist"><table border="0">
270
<col align="left" valign="top">
273
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
274
<td> a <span class="type">GnomeVFSVolumeMonitor.</span>
278
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
279
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> id to look for.
283
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
284
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> corresponding to <em class="parameter"><code>id</code></em>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
285
<a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> with a matching id could be found. The caller owns a
286
reference on the returned drive, and must call <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#gnome-vfs-drive-unref" title="gnome_vfs_drive_unref ()"><code class="function">gnome_vfs_drive_unref()</code></a>
287
when it no longer needs it.
293
<p class="since">Since 2.6</p>
296
<div class="refsect2" lang="en">
297
<a name="gnome-vfs-volume-monitor-get-mounted-volumes"></a><h3>gnome_vfs_volume_monitor_get_mounted_volumes ()</h3>
298
<pre class="programlisting">GList * gnome_vfs_volume_monitor_get_mounted_volumes
299
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);</pre>
301
Gets the list of all the mounted <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> volumes.</p>
304
<div class="variablelist"><table border="0">
305
<col align="left" valign="top">
308
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
309
<td> a <span class="type">GnomeVFSVolumeMonitor.</span>
313
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
314
<td> <span class="type">GList</span> of <span class="type">GnomeVFSVolume.</span> The <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> objects must be
315
unreffed by the caller when no longer needed with <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#gnome-vfs-volume-unref" title="gnome_vfs_volume_unref ()"><code class="function">gnome_vfs_volume_unref()</code></a>
316
and the <span class="type">GList</span> must be freed.
322
<p class="since">Since 2.6</p>
325
<div class="refsect2" lang="en">
326
<a name="gnome-vfs-volume-monitor-get-type"></a><h3>gnome_vfs_volume_monitor_get_type ()</h3>
327
<pre class="programlisting">GType gnome_vfs_volume_monitor_get_type (void);</pre>
330
<div class="variablelist"><table border="0">
331
<col align="left" valign="top">
333
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
340
<div class="refsect2" lang="en">
341
<a name="gnome-vfs-volume-monitor-get-volume-by-id"></a><h3>gnome_vfs_volume_monitor_get_volume_by_id ()</h3>
342
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume">GnomeVFSVolume</a> * gnome_vfs_volume_monitor_get_volume_by_id
343
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
346
Looks for a <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> whose id is <em class="parameter"><code>id</code></em>. A valid <em class="parameter"><code>volume_monitor</code></em> to pass
347
to this function can be acquired using <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-get-volume-monitor" title="gnome_vfs_get_volume_monitor ()"><code class="function">gnome_vfs_get_volume_monitor()</code></a>.</p>
350
<div class="variablelist"><table border="0">
351
<col align="left" valign="top">
354
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
355
<td> a <span class="type">GnomeVFSVolumeMonitor.</span>
359
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
360
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> id to look for.
364
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
365
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> corresponding to <em class="parameter"><code>id</code></em>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
366
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> with a matching id could be found. The caller owns a
367
reference on the returned volume, and must call <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#gnome-vfs-volume-unref" title="gnome_vfs_volume_unref ()"><code class="function">gnome_vfs_volume_unref()</code></a>
368
when it no longer needs it.
374
<p class="since">Since 2.6</p>
377
<div class="refsect2" lang="en">
378
<a name="gnome-vfs-volume-monitor-get-volume-for-path"></a><h3>gnome_vfs_volume_monitor_get_volume_for_path ()</h3>
379
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume">GnomeVFSVolume</a> * gnome_vfs_volume_monitor_get_volume_for_path
380
(<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
381
const char *path);</pre>
383
Returns the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> corresponding to <em class="parameter"><code>path</code></em>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
386
The volume referring to <em class="parameter"><code>path</code></em> is found by calling <code class="literal">stat</code> on <em class="parameter"><code>path</code></em>,
387
and then iterating through the list of volumes that refer
388
to currently mounted local file systems.
389
The first volume in this list maching the <em class="parameter"><code>path</code></em>'s UNIX device
393
If the <code class="literal">stat</code> on <em class="parameter"><code>path</code></em> was not successful, or no volume matches <em class="parameter"><code>path</code></em>,
394
or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
397
<div class="variablelist"><table border="0">
398
<col align="left" valign="top">
401
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
402
<td> a <span class="type">GnomeVFSVolumeMonitor.</span>
406
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
407
<td> string representing a path.
411
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
412
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> corresponding to the <em class="parameter"><code>path</code></em>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. Volume returned
413
must be unreffed by the caller with <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#gnome-vfs-volume-unref" title="gnome_vfs_volume_unref ()"><code class="function">gnome_vfs_volume_unref()</code></a>.
419
<p class="since">Since 2.6</p>
422
<div class="refsect2" lang="en">
423
<a name="gnome-vfs-volume-monitor-ref"></a><h3>gnome_vfs_volume_monitor_ref ()</h3>
424
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> * gnome_vfs_volume_monitor_ref (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);</pre>
426
Increases the refcount of <em class="parameter"><code>volume_monitor</code></em> by one, if it is not <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
429
You shouldn't use this function unless you know what you are doing:
430
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> is to be used as a singleton object, see
431
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-get-volume-monitor" title="gnome_vfs_get_volume_monitor ()"><code class="function">gnome_vfs_get_volume_monitor()</code></a> for more details.</p>
434
<div class="variablelist"><table border="0">
435
<col align="left" valign="top">
438
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
439
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
443
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
444
<td> <em class="parameter"><code>volume_monitor</code></em> with its refcount increased by one,
445
or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>volume_monitor</code></em> is <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
451
<p class="since">Since 2.6</p>
454
<div class="refsect2" lang="en">
455
<a name="gnome-vfs-volume-monitor-unref"></a><h3>gnome_vfs_volume_monitor_unref ()</h3>
456
<pre class="programlisting">void gnome_vfs_volume_monitor_unref (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor);</pre>
458
Decreases the refcount of <em class="parameter"><code>volume_monitor</code></em> by one, if it is not <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
461
You shouldn't use this function unless you know what you are doing:
462
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> is to be used as a singleton object, see
463
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-get-volume-monitor" title="gnome_vfs_get_volume_monitor ()"><code class="function">gnome_vfs_get_volume_monitor()</code></a> for more details.</p>
466
<div class="variablelist"><table border="0">
467
<col align="left" valign="top">
469
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
470
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a>, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
474
<p class="since">Since 2.6</p>
477
<div class="refsect1" lang="en">
478
<a name="gnome-vfs-2.0-gnome-vfs-volume-monitor.signal-details"></a><h2>Signal Details</h2>
479
<div class="refsect2" lang="en">
480
<a name="GnomeVFSVolumeMonitor-drive-connected"></a><h3>The <code class="literal">"drive-connected"</code> signal</h3>
481
<pre class="programlisting">void user_function (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
482
<a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive">GnomeVFSDrive</a> *drive,
483
gpointer user_data) : Run First</pre>
485
This signal is emitted when the <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> <em class="parameter"><code>drive</code></em> has been connected.
488
When the <em class="parameter"><code>drive</code></em> is connected, it is present in the <em class="parameter"><code>volume_monitor</code></em>'s list of connected
489
drives, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-connected-drives" title="gnome_vfs_volume_monitor_get_connected_drives ()"><code class="function">gnome_vfs_volume_monitor_get_connected_drives()</code></a>.</p>
492
<div class="variablelist"><table border="0">
493
<col align="left" valign="top">
496
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
497
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> which received the signal.
501
<td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td>
502
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> that has been connected.
506
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
507
<td>user data set when the signal handler was connected.</td>
513
<div class="refsect2" lang="en">
514
<a name="GnomeVFSVolumeMonitor-drive-disconnected"></a><h3>The <code class="literal">"drive-disconnected"</code> signal</h3>
515
<pre class="programlisting">void user_function (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
516
<a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive">GnomeVFSDrive</a> *drive,
517
gpointer user_data) : Run First</pre>
519
This signal is emitted after the <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> <em class="parameter"><code>drive</code></em> has been disconnected.
522
When the <em class="parameter"><code>drive</code></em> is disconnected, it is removed from the <em class="parameter"><code>volume_monitor</code></em>'s list of connected
523
drives, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-connected-drives" title="gnome_vfs_volume_monitor_get_connected_drives ()"><code class="function">gnome_vfs_volume_monitor_get_connected_drives()</code></a>.</p>
526
<div class="variablelist"><table border="0">
527
<col align="left" valign="top">
530
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
531
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> which received the signal.
535
<td><p><span class="term"><em class="parameter"><code>drive</code></em> :</span></p></td>
536
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a> that has been disconnected.
540
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
541
<td>user data set when the signal handler was connected.</td>
547
<div class="refsect2" lang="en">
548
<a name="GnomeVFSVolumeMonitor-volume-mounted"></a><h3>The <code class="literal">"volume-mounted"</code> signal</h3>
549
<pre class="programlisting">void user_function (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
550
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume">GnomeVFSVolume</a> *volume,
551
gpointer user_data) : Run First</pre>
553
This signal is emitted after the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> <em class="parameter"><code>volume</code></em> has been mounted.
556
When the <em class="parameter"><code>volume</code></em> is mounted, it is present in the <em class="parameter"><code>volume_monitor</code></em>'s list of mounted
557
volumes, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-mounted-volumes" title="gnome_vfs_volume_monitor_get_mounted_volumes ()"><code class="function">gnome_vfs_volume_monitor_get_mounted_volumes()</code></a>.
560
If the <em class="parameter"><code>volume</code></em> has an associated <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a>, it also appears in the drive's
561
list of mounted volumes, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#gnome-vfs-drive-get-mounted-volumes" title="gnome_vfs_drive_get_mounted_volumes ()"><code class="function">gnome_vfs_drive_get_mounted_volumes()</code></a>.</p>
564
<div class="variablelist"><table border="0">
565
<col align="left" valign="top">
568
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
569
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> which received the signal.
573
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
574
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> that has been mounted.
578
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
579
<td>user data set when the signal handler was connected.</td>
585
<div class="refsect2" lang="en">
586
<a name="GnomeVFSVolumeMonitor-volume-pre-unmount"></a><h3>The <code class="literal">"volume-pre-unmount"</code> signal</h3>
587
<pre class="programlisting">void user_function (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
588
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume">GnomeVFSVolume</a> *volume,
589
gpointer user_data) : Run First</pre>
591
This signal is emitted when the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> <em class="parameter"><code>volume</code></em> is about to be unmounted.
594
When the <em class="parameter"><code>volume</code></em> is unmounted, it is removed from the <em class="parameter"><code>volume_monitor</code></em>'s list of mounted
595
volumes, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-mounted-volumes" title="gnome_vfs_volume_monitor_get_mounted_volumes ()"><code class="function">gnome_vfs_volume_monitor_get_mounted_volumes()</code></a>.
598
If the <em class="parameter"><code>volume</code></em> has an associated <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a>, it is also removed from in the drive's
599
list of mounted volumes, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#gnome-vfs-drive-get-mounted-volumes" title="gnome_vfs_drive_get_mounted_volumes ()"><code class="function">gnome_vfs_drive_get_mounted_volumes()</code></a>.
602
When a client application receives this signal, it must free all resources
603
associated with the <em class="parameter"><code>volume</code></em>, for instance cancel all pending file operations
604
on the <em class="parameter"><code>volume</code></em>, and cancel all pending file monitors using <a class="link" href="gnome-vfs-2.0-gnome-vfs-monitor.html#gnome-vfs-monitor-cancel" title="gnome_vfs_monitor_cancel ()"><code class="function">gnome_vfs_monitor_cancel()</code></a>.</p>
607
<div class="variablelist"><table border="0">
608
<col align="left" valign="top">
611
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
612
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> which received the signal.
616
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
617
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> that is about to be unmounted.
621
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
622
<td>user data set when the signal handler was connected.</td>
628
<div class="refsect2" lang="en">
629
<a name="GnomeVFSVolumeMonitor-volume-unmounted"></a><h3>The <code class="literal">"volume-unmounted"</code> signal</h3>
630
<pre class="programlisting">void user_function (<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor">GnomeVFSVolumeMonitor</a> *volume_monitor,
631
<a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume">GnomeVFSVolume</a> *volume,
632
gpointer user_data) : Run First</pre>
634
This signal is emitted after the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> <em class="parameter"><code>volume</code></em> has been unmounted.
637
When the <em class="parameter"><code>volume</code></em> is unmounted, it is removed from the <em class="parameter"><code>volume_monitor</code></em>'s list of mounted
638
volumes, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#gnome-vfs-volume-monitor-get-mounted-volumes" title="gnome_vfs_volume_monitor_get_mounted_volumes ()"><code class="function">gnome_vfs_volume_monitor_get_mounted_volumes()</code></a>.
641
If the <em class="parameter"><code>volume</code></em> has an associated <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#GnomeVFSDrive"><span class="type">GnomeVFSDrive</span></a>, it is also removed from in the drive's
642
list of mounted volumes, which can be queried using <a class="link" href="gnome-vfs-2.0-gnome-vfs-drive.html#gnome-vfs-drive-get-mounted-volumes" title="gnome_vfs_drive_get_mounted_volumes ()"><code class="function">gnome_vfs_drive_get_mounted_volumes()</code></a>.</p>
645
<div class="variablelist"><table border="0">
646
<col align="left" valign="top">
649
<td><p><span class="term"><em class="parameter"><code>volume_monitor</code></em> :</span></p></td>
650
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume-monitor.html#GnomeVFSVolumeMonitor"><span class="type">GnomeVFSVolumeMonitor</span></a> which received the signal.
654
<td><p><span class="term"><em class="parameter"><code>volume</code></em> :</span></p></td>
655
<td> the <a class="link" href="gnome-vfs-2.0-gnome-vfs-volume.html#GnomeVFSVolume"><span class="type">GnomeVFSVolume</span></a> that has been unmounted.
659
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
660
<td>user data set when the signal handler was connected.</td>
669
Generated by GTK-Doc V1.12</div>