ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / doc / html / gnome-vfs-20-gnome-vfs-mime-database.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>File Types</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
2         .synopsis, .classsynopsis {
3             background: #eeeeee;
4             border: solid 1px #aaaaaa;
5             padding: 0.5em;
6         }
7         .programlisting {
8             background: #eeeeff;
9             border: solid 1px #aaaaff;
10             padding: 0.5em;
11         }
12         .variablelist {
13             padding: 4px;
14             margin-left: 3em;
15         }
16         .navigation {
17             background: #ffeeee;
18             border: solid 1px #ffaaaa;
19             margin-top: 0.5em;
20             margin-bottom: 0.5em;
21         }
22         .navigation a {
23             color: #770000;
24         }
25         .navigation a:visited {
26             color: #550000;
27         }
28         .navigation .title {
29             font-size: 200%;
30         }
31       </style><link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library"><link rel="up" href="mime-registry.html" title="MIME Registry"><link rel="previous" href="gnome-vfs-20-gnome-vfs-application-registry.html" title="Application Registry"><link rel="next" href="gnome-vfs-20-gnome-vfs-mime-monitor.html" title="MIME Database Monitor"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="gnome-vfs-20-gnome-vfs-application-registry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="mime-registry.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th><td><a accesskey="n" href="gnome-vfs-20-gnome-vfs-mime-monitor.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="gnome-vfs-20-gnome-vfs-mime-database"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">File Types</span></h2><p>File Types &#8212; 
32 functions for getting information about files based on their MIME type</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
33
34
35
36 #define     <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GNOME-VFS-MIME-TYPE-UNKNOWN-CAPS">GNOME_VFS_MIME_TYPE_UNKNOWN</a>
37 const char* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-get-mime-type-for-data">gnome_vfs_get_mime_type_for_data</a>
38                                             (<a
39 href="../glib/glib-Basic-Types.html#gconstpointer"
40 >gconstpointer</a> data,
41                                              int data_size);
42 char*       <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-get-mime-type">gnome_vfs_get_mime_type</a>         (const char *text_uri);
43 enum        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeActionType">GnomeVFSMimeActionType</a>;
44 enum        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplicationArgumentType">GnomeVFSMimeApplicationArgumentType</a>;
45 typedef     <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a>;
46 <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a>* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-application-copy">gnome_vfs_mime_application_copy</a>
47                                             (<a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a> *application);
48 <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeActionType">GnomeVFSMimeActionType</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-default-action-type">gnome_vfs_mime_get_default_action_type</a>
49                                             (const char *mime_type);
50 GnomeVFSMimeAction* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-default-action">gnome_vfs_mime_get_default_action</a>
51                                             (const char *mime_type);
52 <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a>* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-default-application">gnome_vfs_mime_get_default_application</a>
53                                             (const char *mime_type);
54 Bonobo_ServerInfo* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-default-component">gnome_vfs_mime_get_default_component</a>
55                                             (const char *mime_type);
56 <a
57 href="../glib/glib-Doubly-Linked-Lists.html#GList"
58 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-applications">gnome_vfs_mime_get_short_list_applications</a>
59                                             (const char *mime_type);
60 <a
61 href="../glib/glib-Doubly-Linked-Lists.html#GList"
62 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-components">gnome_vfs_mime_get_short_list_components</a>
63                                             (const char *mime_type);
64 <a
65 href="../glib/glib-Doubly-Linked-Lists.html#GList"
66 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-all-applications">gnome_vfs_mime_get_all_applications</a>
67                                             (const char *mime_type);
68 <a
69 href="../glib/glib-Doubly-Linked-Lists.html#GList"
70 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-all-components">gnome_vfs_mime_get_all_components</a>
71                                             (const char *mime_type);
72 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-default-action-type">gnome_vfs_mime_set_default_action_type</a>
73                                             (const char *mime_type,
74                                              <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeActionType">GnomeVFSMimeActionType</a> action_type);
75 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-default-application">gnome_vfs_mime_set_default_application</a>
76                                             (const char *mime_type,
77                                              const char *application_id);
78 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-default-component">gnome_vfs_mime_set_default_component</a>
79                                             (const char *mime_type,
80                                              const char *component_iid);
81 const char* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-icon">gnome_vfs_mime_get_icon</a>         (const char *mime_type);
82 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-icon">gnome_vfs_mime_set_icon</a>      (const char *mime_type,
83                                              const char *filename);
84 const char* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-description">gnome_vfs_mime_get_description</a>  (const char *mime_type);
85 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-description">gnome_vfs_mime_set_description</a>
86                                             (const char *mime_type,
87                                              const char *description);
88 <a
89 href="../glib/glib-Basic-Types.html#gboolean"
90 >gboolean</a>    <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-can-be-executable">gnome_vfs_mime_can_be_executable</a>
91                                             (const char *mime_type);
92 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-can-be-executable">gnome_vfs_mime_set_can_be_executable</a>
93                                             (const char *mime_type,
94                                              <a
95 href="../glib/glib-Basic-Types.html#gboolean"
96 >gboolean</a> new_value);
97 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-short-list-applications">gnome_vfs_mime_set_short_list_applications</a>
98                                             (const char *mime_type,
99                                              <a
100 href="../glib/glib-Doubly-Linked-Lists.html#GList"
101 >GList</a> *application_ids);
102 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-short-list-components">gnome_vfs_mime_set_short_list_components</a>
103                                             (const char *mime_type,
104                                              <a
105 href="../glib/glib-Doubly-Linked-Lists.html#GList"
106 >GList</a> *component_iids);
107 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-add-application-to-short-list">gnome_vfs_mime_add_application_to_short_list</a>
108                                             (const char *mime_type,
109                                              const char *application_id);
110 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-remove-application-from-short-list">gnome_vfs_mime_remove_application_from_short_list</a>
111                                             (const char *mime_type,
112                                              const char *application_id);
113 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-add-component-to-short-list">gnome_vfs_mime_add_component_to_short_list</a>
114                                             (const char *mime_type,
115                                              const char *iid);
116 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-remove-component-from-short-list">gnome_vfs_mime_remove_component_from_short_list</a>
117                                             (const char *mime_type,
118                                              const char *iid);
119 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-add-extension">gnome_vfs_mime_add_extension</a> (const char *mime_type,
120                                              const char *extension);
121 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-remove-extension">gnome_vfs_mime_remove_extension</a>
122                                             (const char *mime_type,
123                                              const char *extension);
124 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-extend-all-applications">gnome_vfs_mime_extend_all_applications</a>
125                                             (const char *mime_type,
126                                              <a
127 href="../glib/glib-Doubly-Linked-Lists.html#GList"
128 >GList</a> *application_ids);
129 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-remove-from-all-applications">gnome_vfs_mime_remove_from_all_applications</a>
130                                             (const char *mime_type,
131                                              <a
132 href="../glib/glib-Doubly-Linked-Lists.html#GList"
133 >GList</a> *application_ids);
134 <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a>* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-application-new-from-id">gnome_vfs_mime_application_new_from_id</a>
135                                             (const char *id);
136 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-application-free">gnome_vfs_mime_application_free</a> (<a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a> *application);
137 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-action-free">gnome_vfs_mime_action_free</a>      (GnomeVFSMimeAction *action);
138 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-application-list-free">gnome_vfs_mime_application_list_free</a>
139                                             (<a
140 href="../glib/glib-Doubly-Linked-Lists.html#GList"
141 >GList</a> *list);
142 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-component-list-free">gnome_vfs_mime_component_list_free</a>
143                                             (<a
144 href="../glib/glib-Doubly-Linked-Lists.html#GList"
145 >GList</a> *list);
146 <a
147 href="../glib/glib-Basic-Types.html#gboolean"
148 >gboolean</a>    <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-id-in-application-list">gnome_vfs_mime_id_in_application_list</a>
149                                             (const char *id,
150                                              <a
151 href="../glib/glib-Doubly-Linked-Lists.html#GList"
152 >GList</a> *applications);
153 <a
154 href="../glib/glib-Basic-Types.html#gboolean"
155 >gboolean</a>    <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-id-in-component-list">gnome_vfs_mime_id_in_component_list</a>
156                                             (const char *iid,
157                                              <a
158 href="../glib/glib-Doubly-Linked-Lists.html#GList"
159 >GList</a> *components);
160 <a
161 href="../glib/glib-Doubly-Linked-Lists.html#GList"
162 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-remove-application-from-list">gnome_vfs_mime_remove_application_from_list</a>
163                                             (<a
164 href="../glib/glib-Doubly-Linked-Lists.html#GList"
165 >GList</a> *applications,
166                                              const char *application_id,
167                                              <a
168 href="../glib/glib-Basic-Types.html#gboolean"
169 >gboolean</a> *did_remove);
170 <a
171 href="../glib/glib-Doubly-Linked-Lists.html#GList"
172 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-remove-component-from-list">gnome_vfs_mime_remove_component_from_list</a>
173                                             (<a
174 href="../glib/glib-Doubly-Linked-Lists.html#GList"
175 >GList</a> *components,
176                                              const char *iid,
177                                              <a
178 href="../glib/glib-Basic-Types.html#gboolean"
179 >gboolean</a> *did_remove);
180 <a
181 href="../glib/glib-Doubly-Linked-Lists.html#GList"
182 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-id-list-from-component-list">gnome_vfs_mime_id_list_from_component_list</a>
183                                             (<a
184 href="../glib/glib-Doubly-Linked-Lists.html#GList"
185 >GList</a> *components);
186 <a
187 href="../glib/glib-Doubly-Linked-Lists.html#GList"
188 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-id-list-from-application-list">gnome_vfs_mime_id_list_from_application_list</a>
189                                             (<a
190 href="../glib/glib-Doubly-Linked-Lists.html#GList"
191 >GList</a> *applications);
192 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-freeze">gnome_vfs_mime_freeze</a>           (void);
193 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-thaw">gnome_vfs_mime_thaw</a>             (void);
194 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-info-reload">gnome_vfs_mime_info_reload</a>      (void);
195 <a
196 href="../glib/glib-Basic-Types.html#gboolean"
197 >gboolean</a>    <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-type-is-known">gnome_vfs_mime_type_is_known</a>    (const char *mime_type);
198 const char* <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-value">gnome_vfs_mime_get_value</a>        (const char *mime_type,
199                                              const char *key);
200 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-value">gnome_vfs_mime_set_value</a>     (const char *mime_type,
201                                              const char *key,
202                                              const char *value);
203 <a
204 href="../glib/glib-Doubly-Linked-Lists.html#GList"
205 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-key-list">gnome_vfs_mime_get_key_list</a>     (const char *mime_type);
206 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-keys-list-free">gnome_vfs_mime_keys_list_free</a>   (<a
207 href="../glib/glib-Doubly-Linked-Lists.html#GList"
208 >GList</a> *mime_type_list);
209 <a
210 href="../glib/glib-Doubly-Linked-Lists.html#GList"
211 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-extensions-list">gnome_vfs_mime_get_extensions_list</a>
212                                             (const char *mime_type);
213 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-extensions-list-free">gnome_vfs_mime_extensions_list_free</a>
214                                             (<a
215 href="../glib/glib-Doubly-Linked-Lists.html#GList"
216 >GList</a> *list);
217 char*       <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-extensions-string">gnome_vfs_mime_get_extensions_string</a>
218                                             (const char *mime_type);
219 char*       <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-extensions-pretty-string">gnome_vfs_mime_get_extensions_pretty_string</a>
220                                             (const char *mime_type);
221 <a
222 href="../glib/glib-Doubly-Linked-Lists.html#GList"
223 >GList</a>*      <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-get-registered-mime-types">gnome_vfs_get_registered_mime_types</a>
224                                             (void);
225 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-registered-mime-type-list-free">gnome_vfs_mime_registered_mime_type_list_free</a>
226                                             (<a
227 href="../glib/glib-Doubly-Linked-Lists.html#GList"
228 >GList</a> *list);
229 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-registered-type-key">gnome_vfs_mime_set_registered_type_key</a>
230                                             (const char *mime_type,
231                                              const char *key,
232                                              const char *data);
233 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-set-extensions-list">gnome_vfs_mime_set_extensions_list</a>
234                                             (const char *mime_type,
235                                              const char *extensions_list);
236 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-registered-mime-type-delete">gnome_vfs_mime_registered_mime_type_delete</a>
237                                             (const char *mime_type);
238 void        <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-reset">gnome_vfs_mime_reset</a>            (void);
239 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
240
241 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="GNOME-VFS-MIME-TYPE-UNKNOWN-CAPS"></a>GNOME_VFS_MIME_TYPE_UNKNOWN</h3><a class="indexterm" name="id2956033"></a><pre class="programlisting">#define GNOME_VFS_MIME_TYPE_UNKNOWN "application/octet-stream"
242 </pre><p>
243 The value returned for the MIME type when a file did
244 not match any entries in the MIME database. May be
245 treated as a file of an unknown type.</p><p>
246
247 </p></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-get-mime-type-for-data"></a>gnome_vfs_get_mime_type_for_data ()</h3><a class="indexterm" name="id2956073"></a><pre class="programlisting">const char* gnome_vfs_get_mime_type_for_data
248                                             (<a
249 href="../glib/glib-Basic-Types.html#gconstpointer"
250 >gconstpointer</a> data,
251                                              int data_size);</pre><p>
252 Tries to guess the mime type of the data in <i class="parameter"><tt>data</tt></i>
253 using the magic patterns.</p><p>
254
255 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>data</tt></i> :</span></td><td> A pointer to data in memory.
256 </td></tr><tr><td><span class="term"><i class="parameter"><tt>data_size</tt></i> :</span></td><td> Size of the data.
257 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>the mime-type for this filename.
258 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-get-mime-type"></a>gnome_vfs_get_mime_type ()</h3><a class="indexterm" name="id2956197"></a><pre class="programlisting">char*       gnome_vfs_get_mime_type         (const char *text_uri);</pre><p>
259 Determine the mime type of <i class="parameter"><tt>text_uri</tt></i>. The mime type is determined
260 in the same way as by <a href="gnome-vfs-20-gnome-vfs-file-info-ops.html#gnome-vfs-get-file-info"><tt class="function">gnome_vfs_get_file_info()</tt></a>. This is meant as
261 a convenience function for times when you only want the mime type.</p><p>
262
263 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>text_uri</tt></i> :</span></td><td> URI of the file for which to get the mime type
264 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The mime type, or NULL if there is an error reading 
265 the file.
266 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSMimeActionType"></a>enum GnomeVFSMimeActionType</h3><a class="indexterm" name="id2956308"></a><pre class="programlisting">typedef enum {
267         GNOME_VFS_MIME_ACTION_TYPE_NONE,
268         GNOME_VFS_MIME_ACTION_TYPE_APPLICATION,
269         GNOME_VFS_MIME_ACTION_TYPE_COMPONENT
270 } GnomeVFSMimeActionType;
271 </pre><p>
272
273 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSMimeApplicationArgumentType"></a>enum GnomeVFSMimeApplicationArgumentType</h3><a class="indexterm" name="id2956343"></a><pre class="programlisting">typedef enum {
274         GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS,
275         GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_PATHS,
276         GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS_FOR_NON_FILES
277 } GnomeVFSMimeApplicationArgumentType;
278 </pre><p>
279
280 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSMimeApplication"></a>GnomeVFSMimeApplication</h3><a class="indexterm" name="id2956380"></a><pre class="programlisting">typedef struct {
281         char *id;
282         char *name;
283         char *command;
284         gboolean can_open_multiple_files;
285         GnomeVFSMimeApplicationArgumentType expects_uris;
286         GList *supported_uri_schemes;
287         gboolean requires_terminal;
288
289         /* Padded to avoid future breaks in ABI compatibility */
290         void *reserved1;
291         void *reserved2;
292
293 } GnomeVFSMimeApplication;
294 </pre><p>
295
296 </p></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-application-copy"></a>gnome_vfs_mime_application_copy ()</h3><a class="indexterm" name="id2956419"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a>* gnome_vfs_mime_application_copy
297                                             (<a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a> *application);</pre><p>
298 Creates a newly referenced copy of a GnomeVFSMimeApplication object.</p><p>
299
300 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>application</tt></i> :</span></td><td> The GnomeVFSMimeApplication to be duplicated.
301 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A copy of <i class="parameter"><tt>application</tt></i>
302 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-default-action-type"></a>gnome_vfs_mime_get_default_action_type ()</h3><a class="indexterm" name="id2956518"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeActionType">GnomeVFSMimeActionType</a> gnome_vfs_mime_get_default_action_type
303                                             (const char *mime_type);</pre><p>
304 Query the MIME database for the type of action to be performed on a particular MIME type by default.</p><p>
305
306 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
307 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The type of action to be performed on a file of 
308 MIME type, <i class="parameter"><tt>mime_type</tt></i> by default.
309 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-default-action"></a>gnome_vfs_mime_get_default_action ()</h3><a class="indexterm" name="id2956618"></a><pre class="programlisting">GnomeVFSMimeAction* gnome_vfs_mime_get_default_action
310                                             (const char *mime_type);</pre><p>
311 Query the MIME database for default action associated with a particular MIME type <i class="parameter"><tt>mime_type</tt></i>.</p><p>
312
313 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
314 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSMimeAction representing the default action to perform upon
315 file of type <i class="parameter"><tt>mime_type</tt></i>.
316 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-default-application"></a>gnome_vfs_mime_get_default_application ()</h3><a class="indexterm" name="id2956725"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a>* gnome_vfs_mime_get_default_application
317                                             (const char *mime_type);</pre><p>
318 Query the MIME database for the application to be executed on files of MIME type
319 <i class="parameter"><tt>mime_type</tt></i> by default.</p><p>
320
321 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "image/png"
322 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSMimeApplication representing the default handler of <i class="parameter"><tt>mime_type</tt></i>
323 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-default-component"></a>gnome_vfs_mime_get_default_component ()</h3><a class="indexterm" name="id2956832"></a><pre class="programlisting">Bonobo_ServerInfo* gnome_vfs_mime_get_default_component
324                                             (const char *mime_type);</pre><p>
325 Query the MIME database for the default Bonobo component to be activated to 
326 view files of MIME type <i class="parameter"><tt>mime_type</tt></i>.</p><p>
327
328 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "image/png"
329 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> An Bonobo_ServerInfo * representing the OAF server to be activated
330 to get a reference to the proper component.
331 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-short-list-applications"></a>gnome_vfs_mime_get_short_list_applications ()</h3><a class="indexterm" name="id2956934"></a><pre class="programlisting"><a
332 href="../glib/glib-Doubly-Linked-Lists.html#GList"
333 >GList</a>*      gnome_vfs_mime_get_short_list_applications
334                                             (const char *mime_type);</pre><p>
335 Return an alphabetically sorted list of GnomeVFSMimeApplication
336 data structures for the requested mime type.    The short list contains
337 "select" applications recommended for handling this MIME type, appropriate for
338 display to the user.</p><p>
339
340 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "image/png"
341 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GList * where the elements are GnomeVFSMimeApplication *
342 representing various applications to display in the short list for <i class="parameter"><tt>mime_type</tt></i>.
343 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-short-list-components"></a>gnome_vfs_mime_get_short_list_components ()</h3><a class="indexterm" name="id2957036"></a><pre class="programlisting"><a
344 href="../glib/glib-Doubly-Linked-Lists.html#GList"
345 >GList</a>*      gnome_vfs_mime_get_short_list_components
346                                             (const char *mime_type);</pre><p>
347 Return an unsorted sorted list of Bonobo_ServerInfo *
348 data structures for the requested mime type.    The short list contains
349 "select" components recommended for handling this MIME type, appropriate for
350 display to the user.</p><p>
351
352 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "image/png"
353 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GList * where the elements are Bonobo_ServerInfo *
354 representing various components to display in the short list for <i class="parameter"><tt>mime_type</tt></i>.
355 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-all-applications"></a>gnome_vfs_mime_get_all_applications ()</h3><a class="indexterm" name="id2957138"></a><pre class="programlisting"><a
356 href="../glib/glib-Doubly-Linked-Lists.html#GList"
357 >GList</a>*      gnome_vfs_mime_get_all_applications
358                                             (const char *mime_type);</pre><p>
359 Return an alphabetically sorted list of GnomeVFSMimeApplication
360 data structures representing all applications in the MIME database registered
361 to handle files of MIME type <i class="parameter"><tt>mime_type</tt></i> (and supertypes).</p><p>
362
363 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "image/png"
364 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GList * where the elements are GnomeVFSMimeApplication *
365 representing applications that handle MIME type <i class="parameter"><tt>mime_type</tt></i>.
366 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-all-components"></a>gnome_vfs_mime_get_all_components ()</h3><a class="indexterm" name="id2957247"></a><pre class="programlisting"><a
367 href="../glib/glib-Doubly-Linked-Lists.html#GList"
368 >GList</a>*      gnome_vfs_mime_get_all_components
369                                             (const char *mime_type);</pre><p>
370 Return an alphabetically sorted list of Bonobo_ServerInfo
371 data structures representing all Bonobo components registered
372 to handle files of MIME type <i class="parameter"><tt>mime_type</tt></i> (and supertypes).</p><p>
373
374 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "image/png"
375 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GList * where the elements are Bonobo_ServerInfo *
376 representing components that can handle MIME type <i class="parameter"><tt>mime_type</tt></i>.
377 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-default-action-type"></a>gnome_vfs_mime_set_default_action_type ()</h3><a class="indexterm" name="id2957355"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_default_action_type
378                                             (const char *mime_type,
379                                              <a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeActionType">GnomeVFSMimeActionType</a> action_type);</pre><p>
380 Sets the default action type to be performed on files of MIME type <i class="parameter"><tt>mime_type</tt></i>.</p><p>
381
382 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "image/png"
383 </td></tr><tr><td><span class="term"><i class="parameter"><tt>action_type</tt></i> :</span></td><td> A GnomeVFSMimeActionType containing the action to perform by default
384 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
385 any errors encountered.
386 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-default-application"></a>gnome_vfs_mime_set_default_application ()</h3><a class="indexterm" name="id2957482"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_default_application
387                                             (const char *mime_type,
388                                              const char *application_id);</pre><p>
389 Sets the default application to be run on files of MIME type <i class="parameter"><tt>mime_type</tt></i>.</p><p>
390
391 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
392 </td></tr><tr><td><span class="term"><i class="parameter"><tt>application_id</tt></i> :</span></td><td> A key representing an application in the MIME database 
393 (GnomeVFSMimeApplication-&gt;id, for example)
394 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
395 any errors encountered.
396 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-default-component"></a>gnome_vfs_mime_set_default_component ()</h3><a class="indexterm" name="id2957610"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_default_component
397                                             (const char *mime_type,
398                                              const char *component_iid);</pre><p>
399 Sets the default component to be activated for files of MIME type <i class="parameter"><tt>mime_type</tt></i>.</p><p>
400
401 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
402 </td></tr><tr><td><span class="term"><i class="parameter"><tt>component_iid</tt></i> :</span></td><td> The OAFIID of a component
403 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
404 any errors encountered.
405 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-icon"></a>gnome_vfs_mime_get_icon ()</h3><a class="indexterm" name="id2957735"></a><pre class="programlisting">const char* gnome_vfs_mime_get_icon         (const char *mime_type);</pre><p>
406 Query the MIME database for an icon representing the specified MIME type.</p><p>
407
408 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a  MIME type
409 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The filename of the icon as listed in the MIME database. This is
410 usually a filename without path information, e.g. "i-chardev.png", and sometimes
411 does not have an extension, e.g. "i-regular" if the icon is supposed to be image
412 type agnostic between icon themes. Icons are generic, and not theme specific. These
413 will not necessarily match with the icons a user sees in Nautilus, you have been warned.
414 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-icon"></a>gnome_vfs_mime_set_icon ()</h3><a class="indexterm" name="id2957832"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_icon      (const char *mime_type,
415                                              const char *filename);</pre><p>
416 Set the icon entry for a particular MIME type in the MIME database. Note that
417 icon entries need not necessarily contain the full path, and do not necessarily need to
418 specify an extension. So "i-regular", "my-special-icon.png", and "some-icon"
419 are all valid icon filenames.</p><p>
420
421 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a  MIME type
422 </td></tr><tr><td><span class="term"><i class="parameter"><tt>filename</tt></i> :</span></td><td> a const char * containing an image filename
423 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation
424 or any errors that may have occurred.
425 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-description"></a>gnome_vfs_mime_get_description ()</h3><a class="indexterm" name="id2957953"></a><pre class="programlisting">const char* gnome_vfs_mime_get_description  (const char *mime_type);</pre><p>
426 Query the MIME database for a description of the specified MIME type.</p><p>
427
428 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> the mime type
429 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A description of MIME type <i class="parameter"><tt>mime_type</tt></i>
430 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-description"></a>gnome_vfs_mime_set_description ()</h3><a class="indexterm" name="id2958049"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_description
431                                             (const char *mime_type,
432                                              const char *description);</pre><p>
433 Set the description of this MIME type in the MIME database. The description
434 should be something like "Gnumeric spreadsheet".</p><p>
435
436 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type
437 </td></tr><tr><td><span class="term"><i class="parameter"><tt>description</tt></i> :</span></td><td> A description of this MIME type
438 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation or any
439 errors that may have occurred.
440 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-can-be-executable"></a>gnome_vfs_mime_can_be_executable ()</h3><a class="indexterm" name="id2958167"></a><pre class="programlisting"><a
441 href="../glib/glib-Basic-Types.html#gboolean"
442 >gboolean</a>    gnome_vfs_mime_can_be_executable
443                                             (const char *mime_type);</pre><p>
444 Check whether files of this MIME type might conceivably be executable.
445 Default for known types if FALSE. Default for unknown types is TRUE.</p><p>
446
447 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type
448 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> gboolean containing TRUE if some files of this MIME type
449 are registered as being executable, and false otherwise.
450 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-can-be-executable"></a>gnome_vfs_mime_set_can_be_executable ()</h3><a class="indexterm" name="id2958261"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_can_be_executable
451                                             (const char *mime_type,
452                                              <a
453 href="../glib/glib-Basic-Types.html#gboolean"
454 >gboolean</a> new_value);</pre><p>
455 Set whether files of this MIME type might conceivably be executable.</p><p>
456
457 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type
458 </td></tr><tr><td><span class="term"><i class="parameter"><tt>new_value</tt></i> :</span></td><td> A boolean value indicating whether <i class="parameter"><tt>mime_type</tt></i> could be executable.
459 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation or any
460 errors that may have occurred.
461 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-short-list-applications"></a>gnome_vfs_mime_set_short_list_applications ()</h3><a class="indexterm" name="id2958388"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_short_list_applications
462                                             (const char *mime_type,
463                                              <a
464 href="../glib/glib-Doubly-Linked-Lists.html#GList"
465 >GList</a> *application_ids);</pre><p>
466 Set the short list of applications for the specified MIME type. The short list
467 contains applications recommended for possible selection by the user.</p><p>
468
469 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
470 </td></tr><tr><td><span class="term"><i class="parameter"><tt>application_ids</tt></i> :</span></td><td> GList of const char * application ids
471 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
472 any errors encountered.
473 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-short-list-components"></a>gnome_vfs_mime_set_short_list_components ()</h3><a class="indexterm" name="id2958508"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_short_list_components
474                                             (const char *mime_type,
475                                              <a
476 href="../glib/glib-Doubly-Linked-Lists.html#GList"
477 >GList</a> *component_iids);</pre><p>
478 Set the short list of components for the specified MIME type. The short list
479 contains companents recommended for possible selection by the user. *</p><p>
480
481 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
482 </td></tr><tr><td><span class="term"><i class="parameter"><tt>component_iids</tt></i> :</span></td><td> GList of const char * OAF IIDs
483 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
484 any errors encountered.
485 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-add-application-to-short-list"></a>gnome_vfs_mime_add_application_to_short_list ()</h3><a class="indexterm" name="id2958628"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_add_application_to_short_list
486                                             (const char *mime_type,
487                                              const char *application_id);</pre><p>
488 Add an application to the short list for MIME type <i class="parameter"><tt>mime_type</tt></i>. The short list contains
489 applications recommended for display as choices to the user for a particular MIME type.</p><p>
490
491 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
492 </td></tr><tr><td><span class="term"><i class="parameter"><tt>application_id</tt></i> :</span></td><td> const char * containing the application's id in the MIME database
493 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
494 any errors encountered.
495 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-remove-application-from-short-list"></a>gnome_vfs_mime_remove_application_from_short_list ()</h3><a class="indexterm" name="id2958758"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_remove_application_from_short_list
496                                             (const char *mime_type,
497                                              const char *application_id);</pre><p>
498 Remove an application from the short list for MIME type <i class="parameter"><tt>mime_type</tt></i>. The short list contains
499 applications recommended for display as choices to the user for a particular MIME type.</p><p>
500
501 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
502 </td></tr><tr><td><span class="term"><i class="parameter"><tt>application_id</tt></i> :</span></td><td> const char * containing the application's id in the MIME database
503 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
504 any errors encountered.
505 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-add-component-to-short-list"></a>gnome_vfs_mime_add_component_to_short_list ()</h3><a class="indexterm" name="id2958886"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_add_component_to_short_list
506                                             (const char *mime_type,
507                                              const char *iid);</pre><p>
508 Add a component to the short list for MIME type <i class="parameter"><tt>mime_type</tt></i>. The short list contains
509 components recommended for display as choices to the user for a particular MIME type.</p><p>
510
511 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
512 </td></tr><tr><td><span class="term"><i class="parameter"><tt>iid</tt></i> :</span></td><td> const char * containing the component's OAF IID
513 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
514 any errors encountered.
515 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-remove-component-from-short-list"></a>gnome_vfs_mime_remove_component_from_short_list ()</h3><a class="indexterm" name="id2959015"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_remove_component_from_short_list
516                                             (const char *mime_type,
517                                              const char *iid);</pre><p>
518 Remove a component from the short list for MIME type <i class="parameter"><tt>mime_type</tt></i>. The short list contains
519 components recommended for display as choices to the user for a particular MIME type.</p><p>
520
521 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
522 </td></tr><tr><td><span class="term"><i class="parameter"><tt>iid</tt></i> :</span></td><td> const char * containing the component's OAF IID
523 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
524 any errors encountered.
525 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-add-extension"></a>gnome_vfs_mime_add_extension ()</h3><a class="indexterm" name="id2959143"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_add_extension (const char *mime_type,
526                                              const char *extension);</pre><p>
527 Add a file extension to the specificed MIME type in the MIME database.</p><p>
528
529 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> The mime type to add the mapping to.
530 </td></tr><tr><td><span class="term"><i class="parameter"><tt>extension</tt></i> :</span></td><td> The extension to add (e.g. "txt")
531 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation or any
532 errors that may have occurred.
533 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-remove-extension"></a>gnome_vfs_mime_remove_extension ()</h3><a class="indexterm" name="id2959260"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_remove_extension
534                                             (const char *mime_type,
535                                              const char *extension);</pre><p>
536 Removes a file extension from the specificed MIME type in the MIME database.</p><p>
537
538 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> The mime type to remove the extension from
539 </td></tr><tr><td><span class="term"><i class="parameter"><tt>extension</tt></i> :</span></td><td> The extension to remove
540 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSResult indicating the success of the operation or any
541 errors that may have occurred.
542 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-extend-all-applications"></a>gnome_vfs_mime_extend_all_applications ()</h3><a class="indexterm" name="id2959379"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_extend_all_applications
543                                             (const char *mime_type,
544                                              <a
545 href="../glib/glib-Doubly-Linked-Lists.html#GList"
546 >GList</a> *application_ids);</pre><p>
547 Register <i class="parameter"><tt>mime_type</tt></i> as being handled by all applications list in <i class="parameter"><tt>application_ids</tt></i>.</p><p>
548
549 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
550 </td></tr><tr><td><span class="term"><i class="parameter"><tt>application_ids</tt></i> :</span></td><td> a GList of const char * containing application ids
551 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
552 any errors encountered.
553 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-remove-from-all-applications"></a>gnome_vfs_mime_remove_from_all_applications ()</h3><a class="indexterm" name="id2959513"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_remove_from_all_applications
554                                             (const char *mime_type,
555                                              <a
556 href="../glib/glib-Doubly-Linked-Lists.html#GList"
557 >GList</a> *application_ids);</pre><p>
558 Remove <i class="parameter"><tt>mime_type</tt></i> as a handled type from every application in <i class="parameter"><tt>application_ids</tt></i></p><p>
559
560 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> A const char * containing a mime type, e.g. "application/x-php"
561 </td></tr><tr><td><span class="term"><i class="parameter"><tt>application_ids</tt></i> :</span></td><td> a GList of const char * containing application ids
562 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A GnomeVFSResult indicating the success of the operation or reporting 
563 any errors encountered.
564 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-application-new-from-id"></a>gnome_vfs_mime_application_new_from_id ()</h3><a class="indexterm" name="id2959644"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a>* gnome_vfs_mime_application_new_from_id
565                                             (const char *id);</pre><p>
566 Fetches the GnomeVFSMimeApplication associated with the specified
567 application ID from the MIME database.</p><p>
568
569 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>id</tt></i> :</span></td><td> A const char * containing an application id
570 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GnomeVFSMimeApplication * corresponding to <i class="parameter"><tt>id</tt></i>
571 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-application-free"></a>gnome_vfs_mime_application_free ()</h3><a class="indexterm" name="id2959742"></a><pre class="programlisting">void        gnome_vfs_mime_application_free (<a href="gnome-vfs-20-gnome-vfs-mime-database.html#GnomeVFSMimeApplication">GnomeVFSMimeApplication</a> *application);</pre><p>
572 Frees a GnomeVFSMimeApplication *.</p><p>
573
574 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>application</tt></i> :</span></td><td> The GnomeVFSMimeApplication to be freed
575 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-action-free"></a>gnome_vfs_mime_action_free ()</h3><a class="indexterm" name="id2959819"></a><pre class="programlisting">void        gnome_vfs_mime_action_free      (GnomeVFSMimeAction *action);</pre><p>
576 Frees a GnomeVFSMimeAction *.</p><p>
577
578 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>action</tt></i> :</span></td><td> The GnomeVFSMimeAction to be freed
579 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-application-list-free"></a>gnome_vfs_mime_application_list_free ()</h3><a class="indexterm" name="id2959895"></a><pre class="programlisting">void        gnome_vfs_mime_application_list_free
580                                             (<a
581 href="../glib/glib-Doubly-Linked-Lists.html#GList"
582 >GList</a> *list);</pre><p>
583 Frees lists of GnomeVFSApplications, as returned from functions such
584 as <tt class="function">gnome_vfs_get_all_applications()</tt>.</p><p>
585
586 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>list</tt></i> :</span></td><td> a GList of GnomeVFSApplication * to be freed
587 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-component-list-free"></a>gnome_vfs_mime_component_list_free ()</h3><a class="indexterm" name="id2959987"></a><pre class="programlisting">void        gnome_vfs_mime_component_list_free
588                                             (<a
589 href="../glib/glib-Doubly-Linked-Lists.html#GList"
590 >GList</a> *list);</pre><p>
591 Frees lists of Bonobo_ServerInfo * (as returned from functions such
592 as <i class="parameter"><tt>gnome_vfs_get_all_components</tt></i>)</p><p>
593
594 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>list</tt></i> :</span></td><td> a GList of Bonobo_ServerInfo * to be freed
595 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-id-in-application-list"></a>gnome_vfs_mime_id_in_application_list ()</h3><a class="indexterm" name="id2960073"></a><pre class="programlisting"><a
596 href="../glib/glib-Basic-Types.html#gboolean"
597 >gboolean</a>    gnome_vfs_mime_id_in_application_list
598                                             (const char *id,
599                                              <a
600 href="../glib/glib-Doubly-Linked-Lists.html#GList"
601 >GList</a> *applications);</pre><p>
602 Check whether an application id is in a list of GnomeVFSMimeApplications.</p><p>
603
604 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>id</tt></i> :</span></td><td> An application id.
605 </td></tr><tr><td><span class="term"><i class="parameter"><tt>applications</tt></i> :</span></td><td> A GList * whose nodes are GnomeVFSMimeApplications, such as the
606 result of <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-applications"><tt class="function">gnome_vfs_mime_get_short_list_applications()</tt></a>.
607 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE if an application whose id matches <i class="parameter"><tt>id</tt></i> is in <i class="parameter"><tt>applications</tt></i>.
608 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-id-in-component-list"></a>gnome_vfs_mime_id_in_component_list ()</h3><a class="indexterm" name="id2960217"></a><pre class="programlisting"><a
609 href="../glib/glib-Basic-Types.html#gboolean"
610 >gboolean</a>    gnome_vfs_mime_id_in_component_list
611                                             (const char *iid,
612                                              <a
613 href="../glib/glib-Doubly-Linked-Lists.html#GList"
614 >GList</a> *components);</pre><p>
615 Check whether a component iid is in a list of Bonobo_ServerInfos.</p><p>
616
617 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>iid</tt></i> :</span></td><td> A component iid.
618 </td></tr><tr><td><span class="term"><i class="parameter"><tt>components</tt></i> :</span></td><td> A GList * whose nodes are Bonobo_ServerInfos, such as the
619 result of <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-components"><tt class="function">gnome_vfs_mime_get_short_list_components()</tt></a>.
620 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE if a component whose iid matches <i class="parameter"><tt>iid</tt></i> is in <i class="parameter"><tt>components</tt></i>.
621 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-remove-application-from-list"></a>gnome_vfs_mime_remove_application_from_list ()</h3><a class="indexterm" name="id2960363"></a><pre class="programlisting"><a
622 href="../glib/glib-Doubly-Linked-Lists.html#GList"
623 >GList</a>*      gnome_vfs_mime_remove_application_from_list
624                                             (<a
625 href="../glib/glib-Doubly-Linked-Lists.html#GList"
626 >GList</a> *applications,
627                                              const char *application_id,
628                                              <a
629 href="../glib/glib-Basic-Types.html#gboolean"
630 >gboolean</a> *did_remove);</pre><p>
631 Remove an application specified by id from a list of GnomeVFSMimeApplications.</p><p>
632
633 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>applications</tt></i> :</span></td><td> A GList * whose nodes are GnomeVFSMimeApplications, such as the
634 result of <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-applications"><tt class="function">gnome_vfs_mime_get_short_list_applications()</tt></a>.
635 </td></tr><tr><td><span class="term"><i class="parameter"><tt>application_id</tt></i> :</span></td><td> The id of an application to remove from <i class="parameter"><tt>applications</tt></i>.
636 </td></tr><tr><td><span class="term"><i class="parameter"><tt>did_remove</tt></i> :</span></td><td> If non-NULL, this is filled in with TRUE if the application
637 was found in the list, FALSE otherwise.
638 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The modified list. If the application is not found, the list will 
639 be unchanged.
640 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-remove-component-from-list"></a>gnome_vfs_mime_remove_component_from_list ()</h3><a class="indexterm" name="id2960531"></a><pre class="programlisting"><a
641 href="../glib/glib-Doubly-Linked-Lists.html#GList"
642 >GList</a>*      gnome_vfs_mime_remove_component_from_list
643                                             (<a
644 href="../glib/glib-Doubly-Linked-Lists.html#GList"
645 >GList</a> *components,
646                                              const char *iid,
647                                              <a
648 href="../glib/glib-Basic-Types.html#gboolean"
649 >gboolean</a> *did_remove);</pre><p>
650 Remove a component specified by iid from a list of Bonobo_ServerInfos.</p><p>
651
652 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>components</tt></i> :</span></td><td> A GList * whose nodes are Bonobo_ServerInfos, such as the
653 result of <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-components"><tt class="function">gnome_vfs_mime_get_short_list_components()</tt></a>.
654 </td></tr><tr><td><span class="term"><i class="parameter"><tt>iid</tt></i> :</span></td><td> The iid of a component to remove from <i class="parameter"><tt>components</tt></i>.
655 </td></tr><tr><td><span class="term"><i class="parameter"><tt>did_remove</tt></i> :</span></td><td> If non-NULL, this is filled in with TRUE if the component
656 was found in the list, FALSE otherwise.
657 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The modified list. If the component is not found, the list will 
658 be unchanged.
659 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-id-list-from-component-list"></a>gnome_vfs_mime_id_list_from_component_list ()</h3><a class="indexterm" name="id2960684"></a><pre class="programlisting"><a
660 href="../glib/glib-Doubly-Linked-Lists.html#GList"
661 >GList</a>*      gnome_vfs_mime_id_list_from_component_list
662                                             (<a
663 href="../glib/glib-Doubly-Linked-Lists.html#GList"
664 >GList</a> *components);</pre><p>
665 Create a list of component iids from a list of Bonobo_ServerInfos.</p><p>
666
667 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>components</tt></i> :</span></td><td> A GList * whose nodes are Bonobo_ServerInfos, such as the
668 result of <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-components"><tt class="function">gnome_vfs_mime_get_short_list_components()</tt></a>.
669 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A new list where each Bonobo_ServerInfo in the original
670 list is replaced by a char * with the component's iid. The original list is
671 not modified.
672 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-id-list-from-application-list"></a>gnome_vfs_mime_id_list_from_application_list ()</h3><a class="indexterm" name="id2960803"></a><pre class="programlisting"><a
673 href="../glib/glib-Doubly-Linked-Lists.html#GList"
674 >GList</a>*      gnome_vfs_mime_id_list_from_application_list
675                                             (<a
676 href="../glib/glib-Doubly-Linked-Lists.html#GList"
677 >GList</a> *applications);</pre><p>
678 Create a list of application ids from a list of GnomeVFSMimeApplications.</p><p>
679
680 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>applications</tt></i> :</span></td><td> A GList * whose nodes are GnomeVFSMimeApplications, such as the
681 result of <a href="gnome-vfs-20-gnome-vfs-mime-database.html#gnome-vfs-mime-get-short-list-applications"><tt class="function">gnome_vfs_mime_get_short_list_applications()</tt></a>.
682 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> A new list where each GnomeVFSMimeApplication in the original
683 list is replaced by a char * with the application's id. The original list is
684 not modified.
685 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-freeze"></a>gnome_vfs_mime_freeze ()</h3><a class="indexterm" name="id2960911"></a><pre class="programlisting">void        gnome_vfs_mime_freeze           (void);</pre><p>
686 Freezes the mime data so that you can do multiple
687 updates to the dat in one batch without needing
688 to back the files to disk or readind them</p><p>
689
690 </p></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-thaw"></a>gnome_vfs_mime_thaw ()</h3><a class="indexterm" name="id2960957"></a><pre class="programlisting">void        gnome_vfs_mime_thaw             (void);</pre><p>
691 UnFreezes the mime data so that you can do multiple
692 updates to the dat in one batch without needing
693 to back the files to disk or readind them</p><p>
694
695 </p></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-info-reload"></a>gnome_vfs_mime_info_reload ()</h3><a class="indexterm" name="id2961003"></a><pre class="programlisting">void        gnome_vfs_mime_info_reload      (void);</pre><p>
696 Reload the MIME database from disk and notify any listeners
697 holding active <span class="type">GnomeVFSMIMEMonitor</span> objects.</p><p>
698
699 </p></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-type-is-known"></a>gnome_vfs_mime_type_is_known ()</h3><a class="indexterm" name="id2961060"></a><pre class="programlisting"><a
700 href="../glib/glib-Basic-Types.html#gboolean"
701 >gboolean</a>    gnome_vfs_mime_type_is_known    (const char *mime_type);</pre><p>
702 This function returns TRUE if <i class="parameter"><tt>mime_type</tt></i> is in the MIME database at all.</p><p>
703
704 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> a mime type.
705 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE if anything is known about <i class="parameter"><tt>mime_type</tt></i>, otherwise FALSE
706 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-value"></a>gnome_vfs_mime_get_value ()</h3><a class="indexterm" name="id2961161"></a><pre class="programlisting">const char* gnome_vfs_mime_get_value        (const char *mime_type,
707                                              const char *key);</pre><p>
708 This function retrieves the value associated with <i class="parameter"><tt>key</tt></i> in
709 the given GnomeMimeContext.  The string is private, you
710 should not free the result.</p><p>
711
712 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> a mime type.
713 </td></tr><tr><td><span class="term"><i class="parameter"><tt>key</tt></i> :</span></td><td> A key to lookup for the given mime-type
714 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GNOME_VFS_OK if the operation succeeded, otherwise an error code
715 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-value"></a>gnome_vfs_mime_set_value ()</h3><a class="indexterm" name="id2961284"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_value     (const char *mime_type,
716                                              const char *key,
717                                              const char *value);</pre><p>
718 This function is going to set the value
719 associated to the key and it will save it
720 to the user' file if necessary.
721 You should not free the key/values passed to
722 this function. They are used internally.</p><p>
723
724 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> a mime type.
725 </td></tr><tr><td><span class="term"><i class="parameter"><tt>key</tt></i> :</span></td><td> a key to store the value in.
726 </td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i> :</span></td><td> the value to store in the key.
727 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GNOME_VFS_OK if the operation succeeded, otherwise an error code
728
729 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-key-list"></a>gnome_vfs_mime_get_key_list ()</h3><a class="indexterm" name="id2961429"></a><pre class="programlisting"><a
730 href="../glib/glib-Doubly-Linked-Lists.html#GList"
731 >GList</a>*      gnome_vfs_mime_get_key_list     (const char *mime_type);</pre><p>
732 Gets a list of all keys associated with <i class="parameter"><tt>mime_type</tt></i>.</p><p>
733
734 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> the MIME type to lookup
735 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a GList of const char * representing keys associated
736 with <i class="parameter"><tt>mime_type</tt></i>
737 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-keys-list-free"></a>gnome_vfs_mime_keys_list_free ()</h3><a class="indexterm" name="id2961531"></a><pre class="programlisting">void        gnome_vfs_mime_keys_list_free   (<a
738 href="../glib/glib-Doubly-Linked-Lists.html#GList"
739 >GList</a> *mime_type_list);</pre><p>
740 Frees the mime type list.</p><p>
741
742 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type_list</tt></i> :</span></td><td> A mime type list to free.
743 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-extensions-list"></a>gnome_vfs_mime_get_extensions_list ()</h3><a class="indexterm" name="id2961606"></a><pre class="programlisting"><a
744 href="../glib/glib-Doubly-Linked-Lists.html#GList"
745 >GList</a>*      gnome_vfs_mime_get_extensions_list
746                                             (const char *mime_type);</pre><p>
747 Get the file extensions associated with mime type <i class="parameter"><tt>mime_type</tt></i>.</p><p>
748
749 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> type to get the extensions of
750 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a GList of char *s
751 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-extensions-list-free"></a>gnome_vfs_mime_extensions_list_free ()</h3><a class="indexterm" name="id2961702"></a><pre class="programlisting">void        gnome_vfs_mime_extensions_list_free
752                                             (<a
753 href="../glib/glib-Doubly-Linked-Lists.html#GList"
754 >GList</a> *list);</pre><p>
755 Call this function on the list returned by gnome_vfs_mime_extensions
756 to free the list and all of its elements.</p><p>
757
758 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>list</tt></i> :</span></td><td> the extensions list
759 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-extensions-string"></a>gnome_vfs_mime_get_extensions_string ()</h3><a class="indexterm" name="id2961780"></a><pre class="programlisting">char*       gnome_vfs_mime_get_extensions_string
760                                             (const char *mime_type);</pre><p>
761 Retrieves the extensions associated with <i class="parameter"><tt>mime_type</tt></i> as a single
762 space seperated string.</p><p>
763
764 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> the mime type
765 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a string containing space seperated extensions for <i class="parameter"><tt>mime_type</tt></i>
766 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-get-extensions-pretty-string"></a>gnome_vfs_mime_get_extensions_pretty_string ()</h3><a class="indexterm" name="id2961885"></a><pre class="programlisting">char*       gnome_vfs_mime_get_extensions_pretty_string
767                                             (const char *mime_type);</pre><p>
768 Returns the supported extensions for <i class="parameter"><tt>mime_type</tt></i> as a comma-seperated list.</p><p>
769
770 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> the mime type
771 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a string containing comma seperated extensions for this mime-type
772 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-get-registered-mime-types"></a>gnome_vfs_get_registered_mime_types ()</h3><a class="indexterm" name="id2961982"></a><pre class="programlisting"><a
773 href="../glib/glib-Doubly-Linked-Lists.html#GList"
774 >GList</a>*      gnome_vfs_get_registered_mime_types
775                                             (void);</pre><p>
776
777 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
778
779
780 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-registered-mime-type-list-free"></a>gnome_vfs_mime_registered_mime_type_list_free ()</h3><a class="indexterm" name="id2962042"></a><pre class="programlisting">void        gnome_vfs_mime_registered_mime_type_list_free
781                                             (<a
782 href="../glib/glib-Doubly-Linked-Lists.html#GList"
783 >GList</a> *list);</pre><p>
784 Call this function on the list returned by gnome_vfs_get_registered_mime_types
785 to free the list and all of its elements.</p><p>
786
787 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>list</tt></i> :</span></td><td> the extensions list
788 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-registered-type-key"></a>gnome_vfs_mime_set_registered_type_key ()</h3><a class="indexterm" name="id2962121"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_registered_type_key
789                                             (const char *mime_type,
790                                              const char *key,
791                                              const char *data);</pre><p>
792 This function sets the key data for the registered mime
793 type's hash table.</p><p>
794
795 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td>  Mime type to set key for
796 </td></tr><tr><td><span class="term"><i class="parameter"><tt>key</tt></i> :</span></td><td>    The key to set
797 </td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i> :</span></td><td>   The data to set for the key
798 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GNOME_VFS_OK if the operation succeeded, otherwise an error code
799 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-set-extensions-list"></a>gnome_vfs_mime_set_extensions_list ()</h3><a class="indexterm" name="id2962263"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_mime_set_extensions_list
800                                             (const char *mime_type,
801                                              const char *extensions_list);</pre><p>
802 Sets the extensions for a given mime type. Overrides
803 the previously set extensions.</p><p>
804
805 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> the mime type.
806 </td></tr><tr><td><span class="term"><i class="parameter"><tt>extensions_list</tt></i> :</span></td><td> a whitespace-separated list of the
807                   extensions to set for this mime type.
808 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> GNOME_VFS_OK if the operation succeeded, otherwise an error code.
809 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-registered-mime-type-delete"></a>gnome_vfs_mime_registered_mime_type_delete ()</h3><a class="indexterm" name="id2962383"></a><pre class="programlisting">void        gnome_vfs_mime_registered_mime_type_delete
810                                             (const char *mime_type);</pre><p>
811 Delete a mime type for the user which runs this command.
812 You can undo this only by calling gnome_vfs_mime_reset</p><p>
813
814 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>mime_type</tt></i> :</span></td><td> string representing the existing type to delete
815 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-mime-reset"></a>gnome_vfs_mime_reset ()</h3><a class="indexterm" name="id2962460"></a><pre class="programlisting">void        gnome_vfs_mime_reset            (void);</pre><p>
816 resets the user's mime database to the system defaults.</p><p>
817
818 </p></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="gnome-vfs-20-gnome-vfs-application-registry.html"><b>&lt;&lt; Application Registry</b></a></td><td align="right"><a accesskey="n" href="gnome-vfs-20-gnome-vfs-mime-monitor.html"><b>MIME Database Monitor &gt;&gt;</b></a></td></tr></table></body></html>