21
20
enum <link linkend="ExoMountPointFlags">ExoMountPointFlags</link>;
22
21
<link linkend="ExoMountPoint">ExoMountPoint</link>;
23
<link linkend="ExoMountPoint">ExoMountPoint</link>* <link linkend="exo-mount-point-dup">exo_mount_point_dup</link> (const <link linkend="ExoMountPoint">ExoMountPoint</link> *mount_point);
22
<link linkend="ExoMountPoint">ExoMountPoint</link> * <link linkend="exo-mount-point-dup">exo_mount_point_dup</link> (const <link linkend="ExoMountPoint">ExoMountPoint</link> *mount_point);
24
23
<link linkend="void">void</link> <link linkend="exo-mount-point-free">exo_mount_point_free</link> (<link linkend="ExoMountPoint">ExoMountPoint</link> *mount_point);
25
24
enum <link linkend="ExoMountPointMatchMask">ExoMountPointMatchMask</link>;
26
<link linkend="GSList">GSList</link>* <link linkend="exo-mount-point-list-matched">exo_mount_point_list_matched</link> (<link linkend="ExoMountPointMatchMask">ExoMountPointMatchMask</link> mask,
25
<link linkend="GSList">GSList</link> * <link linkend="exo-mount-point-list-matched">exo_mount_point_list_matched</link> (<link linkend="ExoMountPointMatchMask">ExoMountPointMatchMask</link> mask,
27
26
const <link linkend="gchar">gchar</link> *device,
28
27
const <link linkend="gchar">gchar</link> *folder,
29
28
const <link linkend="gchar">gchar</link> *fstype,
84
81
<filename>/etc/vfstab</filename>).
85
82
</para><variablelist role="struct">
87
<term><link linkend="ExoMountPointFlags">ExoMountPointFlags</link> <structfield>flags</structfield>;</term>
84
<term><link linkend="ExoMountPointFlags">ExoMountPointFlags</link> <structfield>flags</structfield>;</term>
88
85
<listitem><simpara>see <link linkend="ExoMountPointFlags"><type>ExoMountPointFlags</type></link>.
89
86
</simpara></listitem>
92
<term><link linkend="gchar">gchar</link> *<structfield>device</structfield>;</term>
89
<term><link linkend="gchar">gchar</link> *<structfield>device</structfield>;</term>
93
90
<listitem><simpara>the device file path.
94
91
</simpara></listitem>
97
<term><link linkend="gchar">gchar</link> *<structfield>folder</structfield>;</term>
94
<term><link linkend="gchar">gchar</link> *<structfield>folder</structfield>;</term>
98
95
<listitem><simpara>the folder where the device is mounted (or may be mounted).
99
96
</simpara></listitem>
102
<term><link linkend="gchar">gchar</link> *<structfield>fstype</structfield>;</term>
99
<term><link linkend="gchar">gchar</link> *<structfield>fstype</structfield>;</term>
103
100
<listitem><simpara>the type of the file system used for the device.
105
101
</simpara></listitem>
107
103
</variablelist></refsect2>
108
104
<refsect2 id="exo-mount-point-dup" role="function" condition="since:0.3.1.13">
109
105
<title>exo_mount_point_dup ()</title>
110
<indexterm zone="exo-mount-point-dup" role="0.3.1.13"><primary>exo_mount_point_dup</primary></indexterm><programlisting><link linkend="ExoMountPoint">ExoMountPoint</link>* exo_mount_point_dup (const <link linkend="ExoMountPoint">ExoMountPoint</link> *mount_point);</programlisting>
106
<indexterm zone="exo-mount-point-dup" role="0.3.1.13"><primary sortas="exo_mount_point_dup">exo_mount_point_dup</primary></indexterm><programlisting><link linkend="ExoMountPoint">ExoMountPoint</link> * exo_mount_point_dup (const <link linkend="ExoMountPoint">ExoMountPoint</link> *mount_point);</programlisting>
112
108
Duplicates the specified <parameter>mount_point</parameter> and returns
113
the duplicate. If <parameter>mount_point</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, this simply
114
returns <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
109
the duplicate. If <parameter>mount_point</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, this simply
110
returns <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
117
113
The caller is responsible to free the returned mount
118
114
point using <link linkend="exo-mount-point-free"><function>exo_mount_point_free()</function></link> when no longer
122
117
</para><variablelist role="params">
123
<varlistentry><term><parameter>mount_point</parameter> :</term>
118
<varlistentry><term><parameter>mount_point</parameter> :</term>
124
119
<listitem><simpara> an <link linkend="ExoMountPoint"><type>ExoMountPoint</type></link>.
125
120
</simpara></listitem></varlistentry>
126
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a copy of the specified <parameter>mount_point</parameter>.
121
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a copy of the specified <parameter>mount_point</parameter>.
128
123
</simpara></listitem></varlistentry>
129
</variablelist><para role="since">Since 0.3.1.13
124
</variablelist><para role="since">Since 0.3.1.13</para></refsect2>
131
125
<refsect2 id="exo-mount-point-free" role="function" condition="since:0.3.1.13">
132
126
<title>exo_mount_point_free ()</title>
133
<indexterm zone="exo-mount-point-free" role="0.3.1.13"><primary>exo_mount_point_free</primary></indexterm><programlisting><link linkend="void">void</link> exo_mount_point_free (<link linkend="ExoMountPoint">ExoMountPoint</link> *mount_point);</programlisting>
127
<indexterm zone="exo-mount-point-free" role="0.3.1.13"><primary sortas="exo_mount_point_free">exo_mount_point_free</primary></indexterm><programlisting><link linkend="void">void</link> exo_mount_point_free (<link linkend="ExoMountPoint">ExoMountPoint</link> *mount_point);</programlisting>
135
129
Frees the resources allocated to the specified <parameter>mount_point</parameter>.
136
If <parameter>mount_point</parameter> is <link linkend="NULL:CAPS"><literal>NULL</literal></link>, this function does nothing.</para>
130
If <parameter>mount_point</parameter> is <link linkend="NULL--CAPS"><literal>NULL</literal></link>, this function does nothing.</para>
139
132
</para><variablelist role="params">
140
<varlistentry><term><parameter>mount_point</parameter> :</term>
133
<varlistentry><term><parameter>mount_point</parameter> :</term>
141
134
<listitem><simpara> an <link linkend="ExoMountPoint"><type>ExoMountPoint</type></link>.
142
135
</simpara></listitem></varlistentry>
143
</variablelist><para role="since">Since 0.3.1.13
136
</variablelist><para role="since">Since 0.3.1.13</para></refsect2>
145
137
<refsect2 id="ExoMountPointMatchMask" role="enum" condition="since:0.3.1.13">
146
138
<title>enum ExoMountPointMatchMask</title>
147
<indexterm zone="ExoMountPointMatchMask" role="0.3.1.13"><primary>ExoMountPointMatchMask</primary></indexterm><programlisting>typedef enum /*< skip >*/
139
<indexterm zone="ExoMountPointMatchMask" role="0.3.1.13"><primary sortas="ExoMountPointMatchMask">ExoMountPointMatchMask</primary></indexterm><programlisting>typedef enum /*< skip >*/
149
141
EXO_MOUNT_POINT_MATCH_ACTIVE = (0L << 0),
150
142
EXO_MOUNT_POINT_MATCH_CONFIGURED = (1L << 0),
158
150
will be returned. The fewer match options are specified, the more mount
159
151
points will usually match (surprising, eh?).</para>
162
153
</para><variablelist role="enum">
163
</variablelist><para role="since">Since 0.3.1.13
154
</variablelist><para role="since">Since 0.3.1.13</para></refsect2>
165
155
<refsect2 id="exo-mount-point-list-matched" role="function" condition="since:0.3.1.13">
166
156
<title>exo_mount_point_list_matched ()</title>
167
<indexterm zone="exo-mount-point-list-matched" role="0.3.1.13"><primary>exo_mount_point_list_matched</primary></indexterm><programlisting><link linkend="GSList">GSList</link>* exo_mount_point_list_matched (<link linkend="ExoMountPointMatchMask">ExoMountPointMatchMask</link> mask,
157
<indexterm zone="exo-mount-point-list-matched" role="0.3.1.13"><primary sortas="exo_mount_point_list_matched">exo_mount_point_list_matched</primary></indexterm><programlisting><link linkend="GSList">GSList</link> * exo_mount_point_list_matched (<link linkend="ExoMountPointMatchMask">ExoMountPointMatchMask</link> mask,
168
158
const <link linkend="gchar">gchar</link> *device,
169
159
const <link linkend="gchar">gchar</link> *folder,
170
160
const <link linkend="gchar">gchar</link> *fstype,
171
161
<link linkend="GError">GError</link> **error);</programlisting>
173
163
Lists mount points matching the given <parameter>mask</parameter> and optionally the parameters <parameter>device</parameter>,
174
<parameter>folder</parameter> and <parameter>fstype</parameter>. If an error occurrs and <parameter>error</parameter> is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, the <parameter>error</parameter> will
175
be set to point to a <link linkend="GError"><type>GError</type></link> describing the problem, and <link linkend="NULL:CAPS"><literal>NULL</literal></link> will be returned.
176
Note, however, that <link linkend="NULL:CAPS"><literal>NULL</literal></link> may also be returned if no mount points match.
164
<parameter>folder</parameter> and <parameter>fstype</parameter>. If an error occurrs and <parameter>error</parameter> is non-<link linkend="NULL--CAPS"><literal>NULL</literal></link>, the <parameter>error</parameter> will
165
be set to point to a <link linkend="GError"><type>GError</type></link> describing the problem, and <link linkend="NULL--CAPS"><literal>NULL</literal></link> will be returned.
166
Note, however, that <link linkend="NULL--CAPS"><literal>NULL</literal></link> may also be returned if no mount points match.
179
If <parameter>mask</parameter> includes <link linkend="EXO-MOUNT-POINT-MATCH-ACTIVE:CAPS"><literal>EXO_MOUNT_POINT_MATCH_ACTIVE</literal></link>, the currently active mount points will
169
If <parameter>mask</parameter> includes <link linkend="EXO-MOUNT-POINT-MATCH-ACTIVE--CAPS"><literal>EXO_MOUNT_POINT_MATCH_ACTIVE</literal></link>, the currently active mount points will
180
170
be matched, that is, the currently mounted file systems, queried from the kernel. Otherwise
181
if <link linkend="EXO-MOUNT-POINT-MATCH-CONFIGURED:CAPS"><literal>EXO_MOUNT_POINT_MATCH_CONFIGURED</literal></link> is specified, the configured mount points from the
171
if <link linkend="EXO-MOUNT-POINT-MATCH-CONFIGURED--CAPS"><literal>EXO_MOUNT_POINT_MATCH_CONFIGURED</literal></link> is specified, the configured mount points from the
182
172
file system table (usually <filename>/etc/fstab</filename> or <filename>/etc/vfstab</filename>)
190
180
</programlisting></informalexample>
191
181
when no longer needed.</para>
194
183
</para><variablelist role="params">
195
<varlistentry><term><parameter>mask</parameter> :</term>
184
<varlistentry><term><parameter>mask</parameter> :</term>
196
185
<listitem><simpara> the mask of flags that have to match for a mount point to be returned.
197
186
</simpara></listitem></varlistentry>
198
<varlistentry><term><parameter>device</parameter> :</term>
199
<listitem><simpara> the device file to match if <link linkend="EXO-MOUNT-POINT-MATCH-DEVICE:CAPS"><literal>EXO_MOUNT_POINT_MATCH_DEVICE</literal></link> is specified.
200
</simpara></listitem></varlistentry>
201
<varlistentry><term><parameter>folder</parameter> :</term>
202
<listitem><simpara> the folder to match if <link linkend="EXO-MOUNT-POINT-MATCH-FOLDER:CAPS"><literal>EXO_MOUNT_POINT_MATCH_FOLDER</literal></link> is specified.
203
</simpara></listitem></varlistentry>
204
<varlistentry><term><parameter>fstype</parameter> :</term>
205
<listitem><simpara> the file system type to match if <link linkend="EXO-MOUNT-POINT-MATCH-FSTYPE:CAPS"><literal>EXO_MOUNT_POINT_MATCH_FSTYPE</literal></link> is specified.
206
</simpara></listitem></varlistentry>
207
<varlistentry><term><parameter>error</parameter> :</term>
208
<listitem><simpara> return location for errors or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
209
</simpara></listitem></varlistentry>
210
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the list of matching <link linkend="ExoMountPoint"><type>ExoMountPoint</type></link><!---->s.
187
<varlistentry><term><parameter>device</parameter> :</term>
188
<listitem><simpara> the device file to match if <link linkend="EXO-MOUNT-POINT-MATCH-DEVICE--CAPS"><literal>EXO_MOUNT_POINT_MATCH_DEVICE</literal></link> is specified.
189
</simpara></listitem></varlistentry>
190
<varlistentry><term><parameter>folder</parameter> :</term>
191
<listitem><simpara> the folder to match if <link linkend="EXO-MOUNT-POINT-MATCH-FOLDER--CAPS"><literal>EXO_MOUNT_POINT_MATCH_FOLDER</literal></link> is specified.
192
</simpara></listitem></varlistentry>
193
<varlistentry><term><parameter>fstype</parameter> :</term>
194
<listitem><simpara> the file system type to match if <link linkend="EXO-MOUNT-POINT-MATCH-FSTYPE--CAPS"><literal>EXO_MOUNT_POINT_MATCH_FSTYPE</literal></link> is specified.
195
</simpara></listitem></varlistentry>
196
<varlistentry><term><parameter>error</parameter> :</term>
197
<listitem><simpara> return location for errors or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
198
</simpara></listitem></varlistentry>
199
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the list of matching <link linkend="ExoMountPoint"><type>ExoMountPoint</type></link><!---->s.
212
201
</simpara></listitem></varlistentry>
213
</variablelist><para role="since">Since 0.3.1.13
202
</variablelist><para role="since">Since 0.3.1.13</para></refsect2>
215
203
<refsect2 id="exo-mount-point-list-active" role="macro" condition="since:0.3.1.13">
216
204
<title>exo_mount_point_list_active()</title>
217
<indexterm zone="exo-mount-point-list-active" role="0.3.1.13"><primary>exo_mount_point_list_active</primary></indexterm><programlisting>#define exo_mount_point_list_active(error)</programlisting>
205
<indexterm zone="exo-mount-point-list-active" role="0.3.1.13"><primary sortas="exo_mount_point_list_active">exo_mount_point_list_active</primary></indexterm><programlisting>#define exo_mount_point_list_active(error)</programlisting>
219
207
Convenience wrapper for <link linkend="exo-mount-point-list-matched"><function>exo_mount_point_list_matched()</function></link>, that returns the
220
currently active mount points, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> in case of an error.
208
currently active mount points, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> in case of an error.
223
211
The caller is responsible to free the returned list using
227
215
</programlisting></informalexample>
228
216
when no longer needed.</para>
231
218
</para><variablelist role="params">
232
<varlistentry><term><parameter>error</parameter> :</term>
233
<listitem><simpara> return location for errors or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
219
<varlistentry><term><parameter>error</parameter> :</term>
220
<listitem><simpara> return location for errors or <link linkend="NULL--CAPS"><literal>NULL</literal></link>.
234
221
</simpara></listitem></varlistentry>
235
</variablelist><para role="since">Since 0.3.1.13
222
</variablelist><para role="since">Since 0.3.1.13</para></refsect2>
237
223
<refsect2 id="exo-mount-point-list-configured" role="macro" condition="since:0.3.1.13">
238
224
<title>exo_mount_point_list_configured()</title>
239
<indexterm zone="exo-mount-point-list-configured" role="0.3.1.13"><primary>exo_mount_point_list_configured</primary></indexterm><programlisting>#define exo_mount_point_list_configured(error)</programlisting>
225
<indexterm zone="exo-mount-point-list-configured" role="0.3.1.13"><primary sortas="exo_mount_point_list_configured">exo_mount_point_list_configured</primary></indexterm><programlisting>#define exo_mount_point_list_configured(error)</programlisting>
241
227
Convenience wrapper for <link linkend="exo-mount-point-list-matched"><function>exo_mount_point_list_matched()</function></link>, that returns the
242
228
configured mount points, i.e. the entries from the file system table (which