~adam-stokes/ubuntu/quantal/gnome-vfs/lp977940-multiarch

« back to all changes in this revision

Viewing changes to doc/html/gnome-vfs-20-gnome-vfs-mime-utils.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-08-05 10:31:15 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080805103115-5vkex0yk6qq619x5
Tags: 1:2.23.0-0ubuntu1
* New upstream version:
  - Sync xdgmime with GIO
* debian/patches/90_from_svn_no_range_for_youtube.patch:
  - the change is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html>
3
3
<head>
4
 
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>gnome-vfs-mime-utils</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
 
<link rel="start" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
 
7
<link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
8
8
<link rel="up" href="mime-registry.html" title="MIME Registry">
9
9
<link rel="prev" href="gnome-vfs-20-gnome-vfs-mime.html" title="MIME typing">
10
10
<link rel="next" href="gnome-vfs-20-gnome-vfs-mime-database.html" title="MIME Database">
11
 
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
14
14
<link rel="chapter" href="data-types.html" title="Basic Data Types">
30
30
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
31
31
<td><a accesskey="n" href="gnome-vfs-20-gnome-vfs-mime-database.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
32
</tr>
33
 
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2702084" class="shortcut">Top</a>
34
 
                  &#160;|&#160;
35
 
                  <a href="#id2702318" class="shortcut">Description</a></nobr></td></tr>
 
33
<tr><td colspan="5" class="shortcuts"><nobr><a href="#gnome-vfs-20-gnome-vfs-mime-utils.synopsis" class="shortcut">Top</a>
 
34
                   | 
 
35
                  <a href="#gnome-vfs-20-gnome-vfs-mime-utils.description" class="shortcut">Description</a></nobr></td></tr>
36
36
</table>
37
37
<div class="refentry" lang="en">
38
38
<a name="gnome-vfs-20-gnome-vfs-mime-utils"></a><div class="titlepage"></div>
39
39
<div class="refnamediv"><table width="100%"><tr>
40
40
<td valign="top">
41
 
<h2>
42
 
<a name="id2702084"></a><span class="refentrytitle">gnome-vfs-mime-utils</span>
43
 
</h2>
 
41
<h2><span class="refentrytitle"><a name="gnome-vfs-20-gnome-vfs-mime-utils.top_of_page"></a>gnome-vfs-mime-utils</span></h2>
44
42
<p>gnome-vfs-mime-utils</p>
45
43
</td>
46
44
<td valign="top" align="right"></td>
47
45
</tr></table></div>
48
46
<div class="refsynopsisdiv">
49
 
<h2>Synopsis</h2>
 
47
<a name="gnome-vfs-20-gnome-vfs-mime-utils.synopsis"></a><h2>Synopsis</h2>
50
48
<pre class="synopsis">
51
 
 
52
 
 
53
 
 
54
 
#define             <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS">GNOME_VFS_MIME_TYPE_UNKNOWN</a>
55
 
enum                <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence">GnomeVFSMimeEquivalence</a>;
56
 
<a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence">GnomeVFSMimeEquivalence</a> <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-mime-type-get-equivalence">gnome_vfs_mime_type_get_equivalence</a>
 
49
#define             <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS" title="GNOME_VFS_MIME_TYPE_UNKNOWN">GNOME_VFS_MIME_TYPE_UNKNOWN</a>
 
50
enum                <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence" title="enum GnomeVFSMimeEquivalence">GnomeVFSMimeEquivalence</a>;
 
51
<a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence" title="enum GnomeVFSMimeEquivalence">GnomeVFSMimeEquivalence</a> <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-mime-type-get-equivalence" title="gnome_vfs_mime_type_get_equivalence ()">gnome_vfs_mime_type_get_equivalence</a>
57
52
                                                        (const char *mime_type,
58
53
                                                         const char *base_mime_type);
59
 
gboolean            <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-mime-type-is-equal">gnome_vfs_mime_type_is_equal</a>        (const char *a,
 
54
<a
 
55
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
 
56
>gboolean</a>            <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-mime-type-is-equal" title="gnome_vfs_mime_type_is_equal ()">gnome_vfs_mime_type_is_equal</a>        (const char *a,
60
57
                                                         const char *b);
61
 
const char*         <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type-for-name">gnome_vfs_get_mime_type_for_name</a>    (const char *filename);
62
 
const char*         <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type-for-data">gnome_vfs_get_mime_type_for_data</a>    (gconstpointer data,
 
58
const char*         <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type-for-name" title="gnome_vfs_get_mime_type_for_name ()">gnome_vfs_get_mime_type_for_name</a>    (const char *filename);
 
59
const char*         <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type-for-data" title="gnome_vfs_get_mime_type_for_data ()">gnome_vfs_get_mime_type_for_data</a>    (<a
 
60
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
61
>gconstpointer</a> data,
63
62
                                                         int data_size);
64
 
const char*         <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type-for-name-and-data">gnome_vfs_get_mime_type_for_name_and_data</a>
 
63
const char*         <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type-for-name-and-data" title="gnome_vfs_get_mime_type_for_name_and_data ()">gnome_vfs_get_mime_type_for_name_and_data</a>
65
64
                                                        (const char *filename,
66
 
                                                         gconstpointer data,
 
65
                                                         <a
 
66
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
67
>gconstpointer</a> data,
67
68
                                                         gssize data_size);
68
 
char*               <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type">gnome_vfs_get_mime_type</a>             (const char *text_uri);
69
 
char*               <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-slow-mime-type">gnome_vfs_get_slow_mime_type</a>        (const char *text_uri);
 
69
char*               <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-mime-type" title="gnome_vfs_get_mime_type ()">gnome_vfs_get_mime_type</a>             (const char *text_uri);
 
70
char*               <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-get-slow-mime-type" title="gnome_vfs_get_slow_mime_type ()">gnome_vfs_get_slow_mime_type</a>        (const char *text_uri);
70
71
</pre>
71
72
</div>
72
73
<div class="refsect1" lang="en">
73
 
<a name="id2702318"></a><h2>Description</h2>
 
74
<a name="gnome-vfs-20-gnome-vfs-mime-utils.description"></a><h2>Description</h2>
74
75
<p>
75
76
 
76
77
</p>
77
78
</div>
78
79
<div class="refsect1" lang="en">
79
 
<a name="id2702332"></a><h2>Details</h2>
 
80
<a name="gnome-vfs-20-gnome-vfs-mime-utils.details"></a><h2>Details</h2>
80
81
<div class="refsect2" lang="en">
81
 
<a name="id2702343"></a><h3>
82
 
<a name="GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS"></a>GNOME_VFS_MIME_TYPE_UNKNOWN</h3>
83
 
<a class="indexterm" name="id2702357"></a><pre class="programlisting">#define GNOME_VFS_MIME_TYPE_UNKNOWN "application/octet-stream"
 
82
<a name="GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS"></a><h3>GNOME_VFS_MIME_TYPE_UNKNOWN</h3>
 
83
<pre class="programlisting">#define GNOME_VFS_MIME_TYPE_UNKNOWN "application/octet-stream"
84
84
</pre>
85
85
<p>
86
86
The value returned for the MIME type when a file did
92
92
</div>
93
93
<hr>
94
94
<div class="refsect2" lang="en">
95
 
<a name="id2702379"></a><h3>
96
 
<a name="GnomeVFSMimeEquivalence"></a>enum GnomeVFSMimeEquivalence</h3>
97
 
<a class="indexterm" name="id2702392"></a><pre class="programlisting">typedef enum {
 
95
<a name="GnomeVFSMimeEquivalence"></a><h3>enum GnomeVFSMimeEquivalence</h3>
 
96
<pre class="programlisting">typedef enum {
98
97
  GNOME_VFS_MIME_UNRELATED,
99
98
  GNOME_VFS_MIME_IDENTICAL,
100
99
  GNOME_VFS_MIME_PARENT
102
101
</pre>
103
102
<p>
104
103
Describes the possible relationship between two MIME types, returned by
105
 
<a href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-mime-type-get-equivalence"><code class="function">gnome_vfs_mime_type_get_equivalence()</code></a>.</p>
 
104
<a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#gnome-vfs-mime-type-get-equivalence" title="gnome_vfs_mime_type_get_equivalence ()"><code class="function">gnome_vfs_mime_type_get_equivalence()</code></a>.</p>
106
105
<p>
107
106
 
108
107
</p>
110
109
<col align="left" valign="top">
111
110
<tbody>
112
111
<tr>
113
 
<td><span class="term"><a name="GNOME-VFS-MIME-UNRELATED:CAPS"></a><code class="literal">GNOME_VFS_MIME_UNRELATED</code></span></td>
 
112
<td><p><a name="GNOME-VFS-MIME-UNRELATED:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MIME_UNRELATED</code></span></p></td>
114
113
<td> The two MIME types are not related.
115
114
</td>
116
115
</tr>
117
116
<tr>
118
 
<td><span class="term"><a name="GNOME-VFS-MIME-IDENTICAL:CAPS"></a><code class="literal">GNOME_VFS_MIME_IDENTICAL</code></span></td>
 
117
<td><p><a name="GNOME-VFS-MIME-IDENTICAL:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MIME_IDENTICAL</code></span></p></td>
119
118
<td> The two MIME types are identical.
120
119
</td>
121
120
</tr>
122
121
<tr>
123
 
<td><span class="term"><a name="GNOME-VFS-MIME-PARENT:CAPS"></a><code class="literal">GNOME_VFS_MIME_PARENT</code></span></td>
 
122
<td><p><a name="GNOME-VFS-MIME-PARENT:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MIME_PARENT</code></span></p></td>
124
123
<td> One of the two MIME types is a parent of the other one.
125
124
                           Note that this relationship is transient, i.e. if
126
125
                           <code class="literal">a</code> is a parent of <code class="literal">b</code> and <code class="literal">b</code> is a parent of <code class="literal">c</code>,
132
131
</div>
133
132
<hr>
134
133
<div class="refsect2" lang="en">
135
 
<a name="id2702562"></a><h3>
136
 
<a name="gnome-vfs-mime-type-get-equivalence"></a>gnome_vfs_mime_type_get_equivalence ()</h3>
137
 
<a class="indexterm" name="id2702576"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence">GnomeVFSMimeEquivalence</a> gnome_vfs_mime_type_get_equivalence
 
134
<a name="gnome-vfs-mime-type-get-equivalence"></a><h3>gnome_vfs_mime_type_get_equivalence ()</h3>
 
135
<pre class="programlisting"><a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence" title="enum GnomeVFSMimeEquivalence">GnomeVFSMimeEquivalence</a> gnome_vfs_mime_type_get_equivalence
138
136
                                                        (const char *mime_type,
139
137
                                                         const char *base_mime_type);</pre>
140
138
<p>
146
144
<div class="itemizedlist"><ul type="disc">
147
145
<li><p>
148
146
 If they are identical and <em class="parameter"><code>mime_type</code></em> is the same as <em class="parameter"><code>base_mime_type</code></em>,
149
 
 then <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-IDENTICAL:CAPS"><code class="literal">GNOME_VFS_MIME_IDENTICAL</code></a> is returned. This would be the case if
 
147
 then <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-IDENTICAL:CAPS"><code class="literal">GNOME_VFS_MIME_IDENTICAL</code></a> is returned. This would be the case if
150
148
 "audio/midi" and "audio/x-midi" are passed in.
151
149
</p></li>
152
150
<li><p>
153
151
If <em class="parameter"><code>base_mime_type</code></em> is a parent type of <em class="parameter"><code>mime_type</code></em>, then
154
 
<a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-PARENT:CAPS"><code class="literal">GNOME_VFS_MIME_PARENT</code></a> is returned.  As an example, "text/plain" is a parent
 
152
<a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-PARENT:CAPS"><code class="literal">GNOME_VFS_MIME_PARENT</code></a> is returned.  As an example, "text/plain" is a parent
155
153
of "text/rss", "image" is a parent of "image/png", and
156
154
"application/octet-stream" is a parent of almost all types.
157
155
</p></li>
158
156
<li><p>
159
 
Finally, if the two mime types are unrelated, then <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-UNRELATED:CAPS"><code class="literal">GNOME_VFS_MIME_UNRELATED</code></a>
 
157
Finally, if the two mime types are unrelated, then <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-UNRELATED:CAPS"><code class="literal">GNOME_VFS_MIME_UNRELATED</code></a>
160
158
is returned.
161
159
</p></li>
162
160
</ul></div>
167
165
<col align="left" valign="top">
168
166
<tbody>
169
167
<tr>
170
 
<td><span class="term"><em class="parameter"><code>mime_type</code></em>&#160;:</span></td>
 
168
<td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
171
169
<td> a const char * containing a mime type, e.g. "image/png".
172
170
</td>
173
171
</tr>
174
172
<tr>
175
 
<td><span class="term"><em class="parameter"><code>base_mime_type</code></em>&#160;:</span></td>
 
173
<td><p><span class="term"><em class="parameter"><code>base_mime_type</code></em> :</span></p></td>
176
174
<td> a const char * containing either a mime type or a base mime type.
177
175
</td>
178
176
</tr>
179
177
<tr>
180
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
181
 
<td> A <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence"><span class="type">GnomeVFSMimeEquivalence</span></a> indicating the relationship between <em class="parameter"><code>mime_type</code></em> and <em class="parameter"><code>base_mime_type</code></em>.
 
178
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
179
<td> A <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GnomeVFSMimeEquivalence" title="enum GnomeVFSMimeEquivalence"><span class="type">GnomeVFSMimeEquivalence</span></a> indicating the relationship between <em class="parameter"><code>mime_type</code></em> and <em class="parameter"><code>base_mime_type</code></em>.
182
180
</td>
183
181
</tr>
184
182
</tbody>
186
184
</div>
187
185
<hr>
188
186
<div class="refsect2" lang="en">
189
 
<a name="id2702782"></a><h3>
190
 
<a name="gnome-vfs-mime-type-is-equal"></a>gnome_vfs_mime_type_is_equal ()</h3>
191
 
<a class="indexterm" name="id2702795"></a><pre class="programlisting">gboolean            gnome_vfs_mime_type_is_equal        (const char *a,
 
187
<a name="gnome-vfs-mime-type-is-equal"></a><h3>gnome_vfs_mime_type_is_equal ()</h3>
 
188
<pre class="programlisting"><a
 
189
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
 
190
>gboolean</a>            gnome_vfs_mime_type_is_equal        (const char *a,
192
191
                                                         const char *b);</pre>
193
192
<p>
194
193
Compares two mime types to determine if they are equivalent.  They are
200
199
<col align="left" valign="top">
201
200
<tbody>
202
201
<tr>
203
 
<td><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></td>
204
 
<td> a const char * containing a mime type, e.g. "image/png".
205
 
</td>
206
 
</tr>
207
 
<tr>
208
 
<td><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></td>
209
 
<td> a const char * containing a mime type, e.g. "image/png".
210
 
</td>
211
 
</tr>
212
 
<tr>
213
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
214
 
<td> <code class="literal">TRUE</code>, if a and b are equivalent mime types.
 
202
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
 
203
<td> a const char * containing a mime type, e.g. "image/png".
 
204
</td>
 
205
</tr>
 
206
<tr>
 
207
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
 
208
<td> a const char * containing a mime type, e.g. "image/png".
 
209
</td>
 
210
</tr>
 
211
<tr>
 
212
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
213
<td> <a
 
214
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
 
215
><code class="literal">TRUE</code></a>, if a and b are equivalent mime types.
215
216
</td>
216
217
</tr>
217
218
</tbody>
219
220
</div>
220
221
<hr>
221
222
<div class="refsect2" lang="en">
222
 
<a name="id2702891"></a><h3>
223
 
<a name="gnome-vfs-get-mime-type-for-name"></a>gnome_vfs_get_mime_type_for_name ()</h3>
224
 
<a class="indexterm" name="id2702907"></a><pre class="programlisting">const char*         gnome_vfs_get_mime_type_for_name    (const char *filename);</pre>
 
223
<a name="gnome-vfs-get-mime-type-for-name"></a><h3>gnome_vfs_get_mime_type_for_name ()</h3>
 
224
<pre class="programlisting">const char*         gnome_vfs_get_mime_type_for_name    (const char *filename);</pre>
225
225
<p>
226
226
Determine the mime type for <em class="parameter"><code>filename</code></em>. The file <em class="parameter"><code>filename</code></em> may
227
227
not exist, this function does not access the actual file.
228
 
If the mime-type cannot be determined, <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a>
 
228
If the mime-type cannot be determined, <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS" title="GNOME_VFS_MIME_TYPE_UNKNOWN"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a>
229
229
is returned.</p>
230
230
<p>
231
231
 
234
234
<col align="left" valign="top">
235
235
<tbody>
236
236
<tr>
237
 
<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
 
237
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
238
238
<td> a filename.
239
239
</td>
240
240
</tr>
241
241
<tr>
242
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
242
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
243
243
<td> the mime-type for this filename or
244
 
<a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a> if mime-type could not be determined.
 
244
<a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS" title="GNOME_VFS_MIME_TYPE_UNKNOWN"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a> if mime-type could not be determined.
245
245
 
246
246
</td>
247
247
</tr>
252
252
</div>
253
253
<hr>
254
254
<div class="refsect2" lang="en">
255
 
<a name="id2703015"></a><h3>
256
 
<a name="gnome-vfs-get-mime-type-for-data"></a>gnome_vfs_get_mime_type_for_data ()</h3>
257
 
<a class="indexterm" name="id2703028"></a><pre class="programlisting">const char*         gnome_vfs_get_mime_type_for_data    (gconstpointer data,
 
255
<a name="gnome-vfs-get-mime-type-for-data"></a><h3>gnome_vfs_get_mime_type_for_data ()</h3>
 
256
<pre class="programlisting">const char*         gnome_vfs_get_mime_type_for_data    (<a
 
257
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
258
>gconstpointer</a> data,
258
259
                                                         int data_size);</pre>
259
260
<p>
260
261
Tries to guess the mime type of the data in <em class="parameter"><code>data</code></em>
266
267
<col align="left" valign="top">
267
268
<tbody>
268
269
<tr>
269
 
<td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
 
270
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
270
271
<td> a pointer to data in memory.
271
272
</td>
272
273
</tr>
273
274
<tr>
274
 
<td><span class="term"><em class="parameter"><code>data_size</code></em>&#160;:</span></td>
 
275
<td><p><span class="term"><em class="parameter"><code>data_size</code></em> :</span></p></td>
275
276
<td> size of the data.
276
277
</td>
277
278
</tr>
278
279
<tr>
279
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
280
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
280
281
<td> the mime-type for <em class="parameter"><code>data</code></em>.
281
282
</td>
282
283
</tr>
285
286
</div>
286
287
<hr>
287
288
<div class="refsect2" lang="en">
288
 
<a name="id2703125"></a><h3>
289
 
<a name="gnome-vfs-get-mime-type-for-name-and-data"></a>gnome_vfs_get_mime_type_for_name_and_data ()</h3>
290
 
<a class="indexterm" name="id2703142"></a><pre class="programlisting">const char*         gnome_vfs_get_mime_type_for_name_and_data
 
289
<a name="gnome-vfs-get-mime-type-for-name-and-data"></a><h3>gnome_vfs_get_mime_type_for_name_and_data ()</h3>
 
290
<pre class="programlisting">const char*         gnome_vfs_get_mime_type_for_name_and_data
291
291
                                                        (const char *filename,
292
 
                                                         gconstpointer data,
 
292
                                                         <a
 
293
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"
 
294
>gconstpointer</a> data,
293
295
                                                         gssize data_size);</pre>
294
296
<p>
295
297
Determine the mime-type for <em class="parameter"><code>filename</code></em> and <em class="parameter"><code>data</code></em>. This function tries
296
298
to be smart (e.g. mime subclassing) about returning the right mime-type 
297
299
by looking at both the <em class="parameter"><code>data</code></em> and the <em class="parameter"><code>filename</code></em>. The file will not be 
298
300
accessed.
299
 
If the mime-type cannot be determined, <a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a>
 
301
If the mime-type cannot be determined, <a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS" title="GNOME_VFS_MIME_TYPE_UNKNOWN"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a>
300
302
is returned.</p>
301
303
<p>
302
304
 
305
307
<col align="left" valign="top">
306
308
<tbody>
307
309
<tr>
308
 
<td><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></td>
 
310
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
309
311
<td> a filename.
310
312
</td>
311
313
</tr>
312
314
<tr>
313
 
<td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td>
 
315
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
314
316
<td> a pointer to the data in the memory
315
317
</td>
316
318
</tr>
317
319
<tr>
318
 
<td><span class="term"><em class="parameter"><code>data_size</code></em>&#160;:</span></td>
 
320
<td><p><span class="term"><em class="parameter"><code>data_size</code></em> :</span></p></td>
319
321
<td> the size of <em class="parameter"><code>data</code></em>
320
322
</td>
321
323
</tr>
322
324
<tr>
323
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
325
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
324
326
<td> the mime-type for this filename or
325
 
<a href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a> if mime-type could not be determined.
 
327
<a class="link" href="gnome-vfs-20-gnome-vfs-mime-utils.html#GNOME-VFS-MIME-TYPE-UNKNOWN:CAPS" title="GNOME_VFS_MIME_TYPE_UNKNOWN"><code class="literal">GNOME_VFS_MIME_TYPE_UNKNOWN</code></a> if mime-type could not be determined.
326
328
 
327
329
</td>
328
330
</tr>
333
335
</div>
334
336
<hr>
335
337
<div class="refsect2" lang="en">
336
 
<a name="id2703314"></a><h3>
337
 
<a name="gnome-vfs-get-mime-type"></a>gnome_vfs_get_mime_type ()</h3>
338
 
<a class="indexterm" name="id2703327"></a><pre class="programlisting">char*               gnome_vfs_get_mime_type             (const char *text_uri);</pre>
 
338
<a name="gnome-vfs-get-mime-type"></a><h3>gnome_vfs_get_mime_type ()</h3>
 
339
<pre class="programlisting">char*               gnome_vfs_get_mime_type             (const char *text_uri);</pre>
339
340
<p>
340
341
Determine the mime type of <em class="parameter"><code>text_uri</code></em>. The mime type is determined
341
 
in the same way as by <a href="gnome-vfs-20-gnome-vfs-file-info-ops.html#gnome-vfs-get-file-info"><code class="function">gnome_vfs_get_file_info()</code></a>. This is meant as
 
342
in the same way as by <a class="link" href="gnome-vfs-20-gnome-vfs-file-info-ops.html#gnome-vfs-get-file-info" title="gnome_vfs_get_file_info ()"><code class="function">gnome_vfs_get_file_info()</code></a>. This is meant as
342
343
a convenient function for times when you only want the mime type.</p>
343
344
<p>
344
345
 
347
348
<col align="left" valign="top">
348
349
<tbody>
349
350
<tr>
350
 
<td><span class="term"><em class="parameter"><code>text_uri</code></em>&#160;:</span></td>
 
351
<td><p><span class="term"><em class="parameter"><code>text_uri</code></em> :</span></p></td>
351
352
<td> path of the file for which to get the mime type.
352
353
</td>
353
354
</tr>
354
355
<tr>
355
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
356
 
<td> The mime type, or <code class="literal">NULL</code> if there is an error reading
 
356
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
357
<td> The mime type, or <a
 
358
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
 
359
><code class="literal">NULL</code></a> if there is an error reading
357
360
the file.
358
361
</td>
359
362
</tr>
362
365
</div>
363
366
<hr>
364
367
<div class="refsect2" lang="en">
365
 
<a name="id2703418"></a><h3>
366
 
<a name="gnome-vfs-get-slow-mime-type"></a>gnome_vfs_get_slow_mime_type ()</h3>
367
 
<a class="indexterm" name="id2703434"></a><pre class="programlisting">char*               gnome_vfs_get_slow_mime_type        (const char *text_uri);</pre>
 
368
<a name="gnome-vfs-get-slow-mime-type"></a><h3>gnome_vfs_get_slow_mime_type ()</h3>
 
369
<pre class="programlisting">char*               gnome_vfs_get_slow_mime_type        (const char *text_uri);</pre>
368
370
<p>
369
371
Determine the mime type of <em class="parameter"><code>text_uri</code></em>. The mime type is determined
370
 
in the same way as by <a href="gnome-vfs-20-gnome-vfs-file-info-ops.html#gnome-vfs-get-file-info"><code class="function">gnome_vfs_get_file_info()</code></a>. This is meant as
 
372
in the same way as by <a class="link" href="gnome-vfs-20-gnome-vfs-file-info-ops.html#gnome-vfs-get-file-info" title="gnome_vfs_get_file_info ()"><code class="function">gnome_vfs_get_file_info()</code></a>. This is meant as
371
373
a convenience function for times when you only want the mime type.</p>
372
374
<p>
373
375
 
376
378
<col align="left" valign="top">
377
379
<tbody>
378
380
<tr>
379
 
<td><span class="term"><em class="parameter"><code>text_uri</code></em>&#160;:</span></td>
 
381
<td><p><span class="term"><em class="parameter"><code>text_uri</code></em> :</span></p></td>
380
382
<td> URI of the file for which to get the mime type
381
383
</td>
382
384
</tr>
383
385
<tr>
384
 
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
386
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
385
387
<td> The mime type, or NULL if there is an error reading 
386
388
the file.
387
389
 
394
396
</div>
395
397
</div>
396
398
</div>
 
399
<div class="footer">
 
400
<hr>
 
401
          Generated by GTK-Doc V1.10</div>
397
402
</body>
398
403
</html>