~ubuntu-branches/ubuntu/natty/gnome-vfs/natty

« back to all changes in this revision

Viewing changes to doc/xml/gnome-vfs-mime.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-03-17 16:12:58 UTC
  • mfrom: (0.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090317161258-px3a2czt9g2ktjz3
Tags: 1:2.24.1-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<refentry id="gnome-vfs-20-gnome-vfs-mime">
 
1
<refentry id="gnome-vfs-2.0-gnome-vfs-mime">
2
2
<refmeta>
3
 
<refentrytitle role="top_of_page" id="gnome-vfs-20-gnome-vfs-mime.top_of_page">MIME typing</refentrytitle>
 
3
<refentrytitle role="top_of_page" id="gnome-vfs-2.0-gnome-vfs-mime.top_of_page">MIME typing</refentrytitle>
4
4
<manvolnum>3</manvolnum>
5
5
<refmiscinfo>GNOME-VFS-2.0 Library</refmiscinfo>
6
6
</refmeta>
10
10
<refpurpose>functions to get a mime-type for a file using its name or its content</refpurpose>
11
11
</refnamediv>
12
12
 
13
 
<refsynopsisdiv id="gnome-vfs-20-gnome-vfs-mime.synopsis" role="synopsis">
 
13
<refsynopsisdiv id="gnome-vfs-2.0-gnome-vfs-mime.synopsis" role="synopsis">
14
14
<title role="synopsis.title">Synopsis</title>
15
15
 
16
16
<synopsis>
44
44
 
45
45
 
46
46
 
47
 
<refsect1 id="gnome-vfs-20-gnome-vfs-mime.description" role="desc">
 
47
<refsect1 id="gnome-vfs-2.0-gnome-vfs-mime.description" role="desc">
48
48
<title role="desc.title">Description</title>
 
49
 
49
50
<para>
50
51
</para>
51
52
</refsect1>
52
53
 
53
 
<refsect1 id="gnome-vfs-20-gnome-vfs-mime.details" role="details">
 
54
<refsect1 id="gnome-vfs-2.0-gnome-vfs-mime.details" role="details">
54
55
<title role="details.title">Details</title>
55
56
<refsect2 id="gnome-vfs-mime-type-from-name" role="function" condition="deprecated">
56
57
<title>gnome_vfs_mime_type_from_name ()</title>
57
 
<indexterm zone="gnome-vfs-mime-type-from-name" role="deprecated"><primary sortas="gnome_vfs_mime_type_from_name">gnome_vfs_mime_type_from_name</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gnome_vfs_mime_type_from_name       (const <link linkend="char">char</link> *filename);</programlisting>
 
58
<indexterm zone="gnome-vfs-mime-type-from-name" role="deprecated"><primary>gnome_vfs_mime_type_from_name</primary></indexterm>
 
59
<programlisting>const <link linkend="char">char</link> *        gnome_vfs_mime_type_from_name       (const <link linkend="char">char</link> *filename);</programlisting>
58
60
<warning><para><literal>gnome_vfs_mime_type_from_name</literal> is deprecated and should not be used in newly-written code. This function is deprecated, use
59
61
<link linkend="gnome-vfs-get-mime-type-for-name"><function>gnome_vfs_get_mime_type_for_name()</function></link> instead.</para></warning>
60
62
<para>
65
67
<listitem><simpara> a filename (the file does not necessarily exist).
66
68
</simpara></listitem></varlistentry>
67
69
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the mime-type for this filename. Will return
68
 
<link linkend="GNOME-VFS-MIME-TYPE-UNKNOWN--CAPS"><literal>GNOME_VFS_MIME_TYPE_UNKNOWN</literal></link> if mime-type could not be found.
 
70
<link linkend="GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS"><literal>GNOME_VFS_MIME_TYPE_UNKNOWN</literal></link> if mime-type could not be found.
69
71
</simpara></listitem></varlistentry>
70
72
</variablelist></refsect2>
71
73
<refsect2 id="gnome-vfs-mime-type-from-name-or-default" role="function">
72
74
<title>gnome_vfs_mime_type_from_name_or_default ()</title>
73
 
<indexterm zone="gnome-vfs-mime-type-from-name-or-default"><primary sortas="gnome_vfs_mime_type_from_name_or_default">gnome_vfs_mime_type_from_name_or_default</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gnome_vfs_mime_type_from_name_or_default
 
75
<indexterm zone="gnome-vfs-mime-type-from-name-or-default"><primary>gnome_vfs_mime_type_from_name_or_default</primary></indexterm>
 
76
<programlisting>const <link linkend="char">char</link> *        gnome_vfs_mime_type_from_name_or_default
74
77
                                                        (const <link linkend="char">char</link> *filename,
75
78
                                                         const <link linkend="char">char</link> *defaultv);</programlisting>
76
79
<para>
90
93
</variablelist></refsect2>
91
94
<refsect2 id="gnome-vfs-get-mime-type-common" role="function">
92
95
<title>gnome_vfs_get_mime_type_common ()</title>
93
 
<indexterm zone="gnome-vfs-get-mime-type-common"><primary sortas="gnome_vfs_get_mime_type_common">gnome_vfs_get_mime_type_common</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_mime_type_common      (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
 
96
<indexterm zone="gnome-vfs-get-mime-type-common"><primary>gnome_vfs_get_mime_type_common</primary></indexterm>
 
97
<programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_mime_type_common      (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
94
98
<para>
95
99
Tries to guess the mime type of the file represented by <parameter>uri</parameter>.
96
100
Favors using the file data to the <parameter>uri</parameter> extension.
111
115
</variablelist></refsect2>
112
116
<refsect2 id="gnome-vfs-get-mime-type-from-uri" role="function">
113
117
<title>gnome_vfs_get_mime_type_from_uri ()</title>
114
 
<indexterm zone="gnome-vfs-get-mime-type-from-uri"><primary sortas="gnome_vfs_get_mime_type_from_uri">gnome_vfs_get_mime_type_from_uri</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_mime_type_from_uri    (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
 
118
<indexterm zone="gnome-vfs-get-mime-type-from-uri"><primary>gnome_vfs_get_mime_type_from_uri</primary></indexterm>
 
119
<programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_mime_type_from_uri    (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
115
120
<para>
116
121
Tries to guess the mime type of the file <parameter>uri</parameter> by
117
122
checking the file name extension. Works on non-existent
126
131
</variablelist></refsect2>
127
132
<refsect2 id="gnome-vfs-get-mime-type-from-file-data" role="function" condition="deprecated:">
128
133
<title>gnome_vfs_get_mime_type_from_file_data ()</title>
129
 
<indexterm zone="gnome-vfs-get-mime-type-from-file-data" role="deprecated"><primary sortas="gnome_vfs_get_mime_type_from_file_data">gnome_vfs_get_mime_type_from_file_data</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_mime_type_from_file_data
 
134
<indexterm zone="gnome-vfs-get-mime-type-from-file-data" role="deprecated"><primary>gnome_vfs_get_mime_type_from_file_data</primary></indexterm>
 
135
<programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_mime_type_from_file_data
130
136
                                                        (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
131
137
<warning><para><literal>gnome_vfs_get_mime_type_from_file_data</literal> is deprecated and should not be used in newly-written code. </para></warning>
132
138
<para>
142
148
</variablelist></refsect2>
143
149
<refsect2 id="gnome-vfs-get-file-mime-type-fast" role="function">
144
150
<title>gnome_vfs_get_file_mime_type_fast ()</title>
145
 
<indexterm zone="gnome-vfs-get-file-mime-type-fast"><primary sortas="gnome_vfs_get_file_mime_type_fast">gnome_vfs_get_file_mime_type_fast</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_file_mime_type_fast   (const <link linkend="char">char</link> *path,
 
151
<indexterm zone="gnome-vfs-get-file-mime-type-fast"><primary>gnome_vfs_get_file_mime_type_fast</primary></indexterm>
 
152
<programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_file_mime_type_fast   (const <link linkend="char">char</link> *path,
146
153
                                                         const <link linkend="struct-stat">struct stat</link> *optional_stat_info);</programlisting>
147
154
<para>
148
155
Tries to guess the mime type of the file represented by <parameter>path</parameter>.
164
171
</variablelist></refsect2>
165
172
<refsect2 id="gnome-vfs-get-file-mime-type" role="function">
166
173
<title>gnome_vfs_get_file_mime_type ()</title>
167
 
<indexterm zone="gnome-vfs-get-file-mime-type"><primary sortas="gnome_vfs_get_file_mime_type">gnome_vfs_get_file_mime_type</primary></indexterm><programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_file_mime_type        (const <link linkend="char">char</link> *path,
 
174
<indexterm zone="gnome-vfs-get-file-mime-type"><primary>gnome_vfs_get_file_mime_type</primary></indexterm>
 
175
<programlisting>const <link linkend="char">char</link> *        gnome_vfs_get_file_mime_type        (const <link linkend="char">char</link> *path,
168
176
                                                         const <link linkend="struct-stat">struct stat</link> *optional_stat_info,
169
177
                                                         <link linkend="gboolean">gboolean</link> suffix_only);</programlisting>
170
178
<para>
192
200
</variablelist></refsect2>
193
201
<refsect2 id="gnome-vfs-mime-type-is-supertype" role="function">
194
202
<title>gnome_vfs_mime_type_is_supertype ()</title>
195
 
<indexterm zone="gnome-vfs-mime-type-is-supertype"><primary sortas="gnome_vfs_mime_type_is_supertype">gnome_vfs_mime_type_is_supertype</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gnome_vfs_mime_type_is_supertype    (const <link linkend="char">char</link> *mime_type);</programlisting>
196
 
<para>
197
 
</para>
 
203
<indexterm zone="gnome-vfs-mime-type-is-supertype"><primary>gnome_vfs_mime_type_is_supertype</primary></indexterm>
 
204
<programlisting><link linkend="gboolean">gboolean</link>            gnome_vfs_mime_type_is_supertype    (const <link linkend="char">char</link> *mime_type);</programlisting>
198
205
<para>
199
206
</para><variablelist role="params">
200
207
<varlistentry><term><parameter>mime_type</parameter>&#160;:</term>
205
212
</variablelist></refsect2>
206
213
<refsect2 id="gnome-vfs-get-supertype-from-mime-type" role="function">
207
214
<title>gnome_vfs_get_supertype_from_mime_type ()</title>
208
 
<indexterm zone="gnome-vfs-get-supertype-from-mime-type"><primary sortas="gnome_vfs_get_supertype_from_mime_type">gnome_vfs_get_supertype_from_mime_type</primary></indexterm><programlisting><link linkend="char">char</link> *              gnome_vfs_get_supertype_from_mime_type
 
215
<indexterm zone="gnome-vfs-get-supertype-from-mime-type"><primary>gnome_vfs_get_supertype_from_mime_type</primary></indexterm>
 
216
<programlisting><link linkend="char">char</link> *              gnome_vfs_get_supertype_from_mime_type
209
217
                                                        (const <link linkend="char">char</link> *mime_type);</programlisting>
210
218
<para>
211
 
</para>
212
 
<para>
213
219
</para><variablelist role="params">
214
220
<varlistentry><term><parameter>mime_type</parameter>&#160;:</term>
215
221
<listitem><simpara> mime type to get the supertype for.
227
233
</variablelist></refsect2>
228
234
<refsect2 id="gnome-vfs-mime-info-cache-reload" role="function">
229
235
<title>gnome_vfs_mime_info_cache_reload ()</title>
230
 
<indexterm zone="gnome-vfs-mime-info-cache-reload"><primary sortas="gnome_vfs_mime_info_cache_reload">gnome_vfs_mime_info_cache_reload</primary></indexterm><programlisting><link linkend="void">void</link>                gnome_vfs_mime_info_cache_reload    (const <link linkend="char">char</link> *dir);</programlisting>
 
236
<indexterm zone="gnome-vfs-mime-info-cache-reload"><primary>gnome_vfs_mime_info_cache_reload</primary></indexterm>
 
237
<programlisting><link linkend="void">void</link>                gnome_vfs_mime_info_cache_reload    (const <link linkend="char">char</link> *dir);</programlisting>
231
238
<para>
232
239
Reload the mime information for the <parameter>dir</parameter>.</para>
233
240
<para>
238
245
</variablelist></refsect2>
239
246
<refsect2 id="gnome-vfs-mime-reload" role="function">
240
247
<title>gnome_vfs_mime_reload ()</title>
241
 
<indexterm zone="gnome-vfs-mime-reload"><primary sortas="gnome_vfs_mime_reload">gnome_vfs_mime_reload</primary></indexterm><programlisting><link linkend="void">void</link>                gnome_vfs_mime_reload               (void);</programlisting>
 
248
<indexterm zone="gnome-vfs-mime-reload"><primary>gnome_vfs_mime_reload</primary></indexterm>
 
249
<programlisting><link linkend="void">void</link>                gnome_vfs_mime_reload               (void);</programlisting>
242
250
<para>
243
251
Reload the MIME database.</para>
244
252
<para>
245
253
</para></refsect2>
246
254
<refsect2 id="gnome-vfs-mime-shutdown" role="function" condition="deprecated">
247
255
<title>gnome_vfs_mime_shutdown ()</title>
248
 
<indexterm zone="gnome-vfs-mime-shutdown" role="deprecated"><primary sortas="gnome_vfs_mime_shutdown">gnome_vfs_mime_shutdown</primary></indexterm><programlisting><link linkend="void">void</link>                gnome_vfs_mime_shutdown             (void);</programlisting>
 
256
<indexterm zone="gnome-vfs-mime-shutdown" role="deprecated"><primary>gnome_vfs_mime_shutdown</primary></indexterm>
 
257
<programlisting><link linkend="void">void</link>                gnome_vfs_mime_shutdown             (void);</programlisting>
249
258
<warning><para><literal>gnome_vfs_mime_shutdown</literal> is deprecated and should not be used in newly-written code. This function doesn't have to be called as the
250
259
operating system automatically cleans up resources when exiting.
251
260
</para>
252
261
<para>
253
262
Unload the MIME database from memory.</para></warning>
254
263
<para>
255
 
</para>
256
 
<para>
257
264
</para></refsect2>
258
265
 
259
266
</refsect1>