~ubuntu-branches/ubuntu/vivid/glib2.0/vivid-proposed

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/gio-GContentType.html

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2014-03-24 20:58:34 UTC
  • mfrom: (1.66.13)
  • Revision ID: package-import@ubuntu.com-20140324205834-8hsgok8k36ftocqa
Tags: 2.40.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
<tbody>
42
42
<tr>
43
43
<td class="function_type">
44
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
44
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
45
45
</td>
46
46
<td class="function_name">
47
47
<a class="link" href="gio-GContentType.html#g-content-type-equals" title="g_content_type_equals ()">g_content_type_equals</a> <span class="c_punctuation">()</span>
49
49
</tr>
50
50
<tr>
51
51
<td class="function_type">
52
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
52
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
53
53
</td>
54
54
<td class="function_name">
55
55
<a class="link" href="gio-GContentType.html#g-content-type-is-a" title="g_content_type_is_a ()">g_content_type_is_a</a> <span class="c_punctuation">()</span>
57
57
</tr>
58
58
<tr>
59
59
<td class="function_type">
60
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
60
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
61
61
</td>
62
62
<td class="function_name">
63
63
<a class="link" href="gio-GContentType.html#g-content-type-is-unknown" title="g_content_type_is_unknown ()">g_content_type_is_unknown</a> <span class="c_punctuation">()</span>
65
65
</tr>
66
66
<tr>
67
67
<td class="function_type">
68
 
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
68
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
69
69
</td>
70
70
<td class="function_name">
71
71
<a class="link" href="gio-GContentType.html#g-content-type-get-description" title="g_content_type_get_description ()">g_content_type_get_description</a> <span class="c_punctuation">()</span>
73
73
</tr>
74
74
<tr>
75
75
<td class="function_type">
76
 
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
76
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
77
77
</td>
78
78
<td class="function_name">
79
79
<a class="link" href="gio-GContentType.html#g-content-type-get-mime-type" title="g_content_type_get_mime_type ()">g_content_type_get_mime_type</a> <span class="c_punctuation">()</span>
97
97
</tr>
98
98
<tr>
99
99
<td class="function_type">
100
 
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
100
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
101
101
</td>
102
102
<td class="function_name">
103
103
<a class="link" href="gio-GContentType.html#g-content-type-get-generic-icon-name" title="g_content_type_get_generic_icon_name ()">g_content_type_get_generic_icon_name</a> <span class="c_punctuation">()</span>
105
105
</tr>
106
106
<tr>
107
107
<td class="function_type">
108
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
108
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
109
109
</td>
110
110
<td class="function_name">
111
111
<a class="link" href="gio-GContentType.html#g-content-type-can-be-executable" title="g_content_type_can_be_executable ()">g_content_type_can_be_executable</a> <span class="c_punctuation">()</span>
113
113
</tr>
114
114
<tr>
115
115
<td class="function_type">
116
 
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
116
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
117
117
</td>
118
118
<td class="function_name">
119
119
<a class="link" href="gio-GContentType.html#g-content-type-from-mime-type" title="g_content_type_from_mime_type ()">g_content_type_from_mime_type</a> <span class="c_punctuation">()</span>
121
121
</tr>
122
122
<tr>
123
123
<td class="function_type">
124
 
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
124
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
125
125
</td>
126
126
<td class="function_name">
127
127
<a class="link" href="gio-GContentType.html#g-content-type-guess" title="g_content_type_guess ()">g_content_type_guess</a> <span class="c_punctuation">()</span>
129
129
</tr>
130
130
<tr>
131
131
<td class="function_type">
132
 
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
 
132
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
133
133
</td>
134
134
<td class="function_name">
135
135
<a class="link" href="gio-GContentType.html#g-content-type-guess-for-tree" title="g_content_type_guess_for_tree ()">g_content_type_guess_for_tree</a> <span class="c_punctuation">()</span>
137
137
</tr>
138
138
<tr>
139
139
<td class="function_type">
140
 
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
 
140
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
141
141
</td>
142
142
<td class="function_name">
143
143
<a class="link" href="gio-GContentType.html#g-content-types-get-registered" title="g_content_types_get_registered ()">g_content_types_get_registered</a> <span class="c_punctuation">()</span>
165
165
<a name="gio-GContentType.functions_details"></a><h2>Functions</h2>
166
166
<div class="refsect2">
167
167
<a name="g-content-type-equals"></a><h3>g_content_type_equals ()</h3>
168
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
169
 
g_content_type_equals (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type1</code></em>,
170
 
                       <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type2</code></em>);</pre>
 
168
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
169
g_content_type_equals (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type1</code></em>,
 
170
                       <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type2</code></em>);</pre>
171
171
<p>Compares two content types for equality.</p>
172
172
<div class="refsect3">
173
173
<a name="id-1.4.8.2.6.2.5"></a><h4>Parameters</h4>
193
193
</div>
194
194
<div class="refsect3">
195
195
<a name="id-1.4.8.2.6.2.6"></a><h4>Returns</h4>
196
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the two strings are identical or equivalent,
197
 
<a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
 
196
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the two strings are identical or equivalent,
 
197
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
198
198
<p></p>
199
199
</div>
200
200
</div>
201
201
<hr>
202
202
<div class="refsect2">
203
203
<a name="g-content-type-is-a"></a><h3>g_content_type_is_a ()</h3>
204
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
205
 
g_content_type_is_a (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
206
 
                     <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *supertype</code></em>);</pre>
 
204
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
205
g_content_type_is_a (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
 
206
                     <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *supertype</code></em>);</pre>
207
207
<p>Determines if <em class="parameter"><code>type</code></em>
208
208
 is a subset of <em class="parameter"><code>supertype</code></em>
209
209
.</p>
231
231
</div>
232
232
<div class="refsect3">
233
233
<a name="id-1.4.8.2.6.3.6"></a><h4>Returns</h4>
234
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em>
 
234
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>type</code></em>
235
235
is a kind of <em class="parameter"><code>supertype</code></em>
236
236
,
237
 
<a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
 
237
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
238
238
<p></p>
239
239
</div>
240
240
</div>
241
241
<hr>
242
242
<div class="refsect2">
243
243
<a name="g-content-type-is-unknown"></a><h3>g_content_type_is_unknown ()</h3>
244
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
245
 
g_content_type_is_unknown (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
 
244
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
245
g_content_type_is_unknown (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
246
246
<p>Checks if the content type is the generic "unknown" type.
247
247
On UNIX this is the "application/octet-stream" mimetype,
248
248
while on win32 it is "*".</p>
263
263
</div>
264
264
<div class="refsect3">
265
265
<a name="id-1.4.8.2.6.4.6"></a><h4>Returns</h4>
266
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the type is the unknown type.</p>
 
266
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the type is the unknown type.</p>
267
267
<p></p>
268
268
</div>
269
269
</div>
270
270
<hr>
271
271
<div class="refsect2">
272
272
<a name="g-content-type-get-description"></a><h3>g_content_type_get_description ()</h3>
273
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
274
 
g_content_type_get_description (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
 
273
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
274
g_content_type_get_description (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
275
275
<p>Gets the human readable description of the content type.</p>
276
276
<div class="refsect3">
277
277
<a name="id-1.4.8.2.6.5.5"></a><h4>Parameters</h4>
292
292
<a name="id-1.4.8.2.6.5.6"></a><h4>Returns</h4>
293
293
<p> a short description of the content type <em class="parameter"><code>type</code></em>
294
294
. Free the
295
 
returned string with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></p>
 
295
returned string with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></p>
296
296
<p></p>
297
297
</div>
298
298
</div>
299
299
<hr>
300
300
<div class="refsect2">
301
301
<a name="g-content-type-get-mime-type"></a><h3>g_content_type_get_mime_type ()</h3>
302
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
303
 
g_content_type_get_mime_type (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
 
302
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
303
g_content_type_get_mime_type (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
304
304
<p>Gets the mime type for the content type, if one is registered.</p>
305
305
<div class="refsect3">
306
306
<a name="id-1.4.8.2.6.6.5"></a><h4>Parameters</h4>
321
321
<a name="id-1.4.8.2.6.6.6"></a><h4>Returns</h4>
322
322
<p> the registered mime type for the given <em class="parameter"><code>type</code></em>
323
323
,
324
 
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unknown. </p>
 
324
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unknown. </p>
325
325
<p><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></p>
326
326
</div>
327
327
</div>
329
329
<div class="refsect2">
330
330
<a name="g-content-type-get-icon"></a><h3>g_content_type_get_icon ()</h3>
331
331
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *
332
 
g_content_type_get_icon (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
 
332
g_content_type_get_icon (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
333
333
<p>Gets the icon for a content type.</p>
334
334
<div class="refsect3">
335
335
<a name="id-1.4.8.2.6.7.5"></a><h4>Parameters</h4>
349
349
<div class="refsect3">
350
350
<a name="id-1.4.8.2.6.7.6"></a><h4>Returns</h4>
351
351
<p> <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> corresponding to the content type. Free the returned
352
 
object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
 
352
object with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
353
353
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
354
354
</div>
355
355
</div>
357
357
<div class="refsect2">
358
358
<a name="g-content-type-get-symbolic-icon"></a><h3>g_content_type_get_symbolic_icon ()</h3>
359
359
<pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> *
360
 
g_content_type_get_symbolic_icon (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
 
360
g_content_type_get_symbolic_icon (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
361
361
<p>Gets the symbolic icon for a content type.</p>
362
362
<div class="refsect3">
363
363
<a name="id-1.4.8.2.6.8.5"></a><h4>Parameters</h4>
377
377
<div class="refsect3">
378
378
<a name="id-1.4.8.2.6.8.6"></a><h4>Returns</h4>
379
379
<p> symbolic <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> corresponding to the content type.
380
 
Free the returned object with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
 
380
Free the returned object with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
381
381
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
382
382
</div>
383
383
<p class="since">Since 2.34</p>
385
385
<hr>
386
386
<div class="refsect2">
387
387
<a name="g-content-type-get-generic-icon-name"></a><h3>g_content_type_get_generic_icon_name ()</h3>
388
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
389
 
g_content_type_get_generic_icon_name (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
 
388
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
389
g_content_type_get_generic_icon_name (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
390
390
<p>Gets the generic icon name for a content type.</p>
391
391
<p>See the
392
392
<a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec" target="_top">shared-mime-info</a>
410
410
<a name="id-1.4.8.2.6.9.7"></a><h4>Returns</h4>
411
411
<p> the registered generic icon name for the given <em class="parameter"><code>type</code></em>
412
412
,
413
 
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unknown. Free with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p>
 
413
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if unknown. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p>
414
414
<p><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></p>
415
415
</div>
416
416
<p class="since">Since 2.34</p>
418
418
<hr>
419
419
<div class="refsect2">
420
420
<a name="g-content-type-can-be-executable"></a><h3>g_content_type_can_be_executable ()</h3>
421
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
422
 
g_content_type_can_be_executable (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
 
421
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
422
g_content_type_can_be_executable (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>);</pre>
423
423
<p>Checks if a content type can be executable. Note that for instance
424
424
things like text files can be executables (i.e. scripts and batch files).</p>
425
425
<div class="refsect3">
439
439
</div>
440
440
<div class="refsect3">
441
441
<a name="id-1.4.8.2.6.10.6"></a><h4>Returns</h4>
442
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file type corresponds to a type that
443
 
can be executable, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
 
442
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file type corresponds to a type that
 
443
can be executable, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
444
444
<p></p>
445
445
</div>
446
446
</div>
447
447
<hr>
448
448
<div class="refsect2">
449
449
<a name="g-content-type-from-mime-type"></a><h3>g_content_type_from_mime_type ()</h3>
450
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
451
 
g_content_type_from_mime_type (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *mime_type</code></em>);</pre>
 
450
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
451
g_content_type_from_mime_type (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *mime_type</code></em>);</pre>
452
452
<p>Tries to find a content type based on the mime type name.</p>
453
453
<div class="refsect3">
454
454
<a name="id-1.4.8.2.6.11.5"></a><h4>Parameters</h4>
468
468
<div class="refsect3">
469
469
<a name="id-1.4.8.2.6.11.6"></a><h4>Returns</h4>
470
470
<p> Newly allocated string with content type
471
 
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Free with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p>
 
471
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p>
472
472
<p><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></p>
473
473
</div>
474
474
<p class="since">Since 2.18</p>
476
476
<hr>
477
477
<div class="refsect2">
478
478
<a name="g-content-type-guess"></a><h3>g_content_type_guess ()</h3>
479
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
480
 
g_content_type_guess (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
481
 
                      <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
482
 
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> data_size</code></em>,
483
 
                      <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *result_uncertain</code></em>);</pre>
 
479
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
 
480
g_content_type_guess (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
 
481
                      <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *data</code></em>,
 
482
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> data_size</code></em>,
 
483
                      <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *result_uncertain</code></em>);</pre>
484
484
<p>Guesses the content type based on example data. If the function is
485
485
uncertain, <em class="parameter"><code>result_uncertain</code></em>
486
 
 will be set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. Either <em class="parameter"><code>filename</code></em>
 
486
 will be set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. Either <em class="parameter"><code>filename</code></em>
487
487
 
488
488
or <em class="parameter"><code>data</code></em>
489
 
 may be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, in which case the guess will be based solely
 
489
 may be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, in which case the guess will be based solely
490
490
on the other argument.</p>
491
491
<div class="refsect3">
492
492
<a name="id-1.4.8.2.6.12.5"></a><h4>Parameters</h4>
499
499
<tbody>
500
500
<tr>
501
501
<td class="parameter_name"><p>filename</p></td>
502
 
<td class="parameter_description"><p> a string, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
502
<td class="parameter_description"><p> a string, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
503
503
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
504
504
</tr>
505
505
<tr>
506
506
<td class="parameter_name"><p>data</p></td>
507
 
<td class="parameter_description"><p> a stream of data, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
507
<td class="parameter_description"><p> a stream of data, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
508
508
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=data_size]</span></td>
509
509
</tr>
510
510
<tr>
516
516
<tr>
517
517
<td class="parameter_name"><p>result_uncertain</p></td>
518
518
<td class="parameter_description"><p> return location for the certainty
519
 
of the result, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
 
519
of the result, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
520
520
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
521
521
</tr>
522
522
</tbody>
525
525
<div class="refsect3">
526
526
<a name="id-1.4.8.2.6.12.6"></a><h4>Returns</h4>
527
527
<p> a string indicating a guessed content type for the
528
 
given data. Free with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></p>
 
528
given data. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></p>
529
529
<p></p>
530
530
</div>
531
531
</div>
532
532
<hr>
533
533
<div class="refsect2">
534
534
<a name="g-content-type-guess-for-tree"></a><h3>g_content_type_guess_for_tree ()</h3>
535
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
 
535
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **
536
536
g_content_type_guess_for_tree (<em class="parameter"><code><a class="link" href="GFile.html" title="GFile"><span class="type">GFile</span></a> *root</code></em>);</pre>
537
537
<p>Tries to guess the type of the tree with root <em class="parameter"><code>root</code></em>
538
538
, by
562
562
</div>
563
563
<div class="refsect3">
564
564
<a name="id-1.4.8.2.6.13.8"></a><h4>Returns</h4>
565
 
<p> an <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
566
 
array of zero or more content types. Free with <a href="../glib/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>. </p>
 
565
<p> an <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
 
566
array of zero or more content types. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>. </p>
567
567
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></p>
568
568
</div>
569
569
<p class="since">Since 2.18</p>
571
571
<hr>
572
572
<div class="refsect2">
573
573
<a name="g-content-types-get-registered"></a><h3>g_content_types_get_registered ()</h3>
574
 
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
 
574
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
575
575
g_content_types_get_registered (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
576
576
<p>Gets a list of strings containing all the registered content types
577
577
known to the system. The list and its data should be freed using