4 >Application Registry</TITLE
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64
10 TITLE="GnomeVFS - Filesystem Abstraction library"
11 HREF="index.html"><LINK
13 TITLE="MIME types & the Application Registry"
14 HREF="mime-registry.html"><LINK
16 TITLE="Algorithmic Sniff Buffer"
17 HREF="gnome-vfs-mime-sniff-buffer.html"><LINK
19 TITLE="Magic MIME Detection"
20 HREF="gnome-vfs-mime-magic.html"></HEAD
43 >GnomeVFS - Filesystem Abstraction library</FONT
52 HREF="gnome-vfs-mime-sniff-buffer.html"
57 ><<< Previous Page</B
90 HREF="mime-registry.html"
106 HREF="gnome-vfs-mime-magic.html"
111 >Next Page >>></B
120 NAME="GNOME-VFS-APPLICATION-REGISTRY"
121 >Application Registry</A
130 >Application Registry -- a database of the available applications and their capabilities</DIV
132 CLASS="REFSYNOPSISDIV"
150 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-COMMAND-CAPS"
151 >GNOME_VFS_APPLICATION_REGISTRY_COMMAND</A
154 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-NAME-CAPS"
155 >GNOME_VFS_APPLICATION_REGISTRY_NAME</A
158 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-CAN-OPEN-MULTIPLE-FILES-CAPS"
159 >GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES</A
162 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-REQUIRES-TERMINAL-CAPS"
163 >GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL</A
166 HREF=../glib/glib-basic-types.html#GBOOLEAN
168 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-EXISTS"
169 >gnome_vfs_application_registry_exists</A
171 (const char *app_id);
173 HREF=../glib/glib-doubly-linked-lists.html#GLIST
175 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-GET-KEYS"
176 >gnome_vfs_application_registry_get_keys</A
178 (const char *app_id);
180 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-PEEK-VALUE"
181 >gnome_vfs_application_registry_peek_value</A
186 HREF=../glib/glib-basic-types.html#GBOOLEAN
188 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-GET-BOOL-VALUE"
189 >gnome_vfs_application_registry_get_bool_value</A
194 HREF=../glib/glib-basic-types.html#GBOOLEAN
195 >gboolean</A> *got_key);
197 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-REMOVE-APPLICATION"
198 >gnome_vfs_application_registry_remove_application</A
200 (const char *app_id);
202 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-SET-VALUE"
203 >gnome_vfs_application_registry_set_value</A
209 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-SET-BOOL-VALUE"
210 >gnome_vfs_application_registry_set_bool_value</A
215 HREF=../glib/glib-basic-types.html#GBOOLEAN
216 >gboolean</A> value);
218 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-UNSET-KEY"
219 >gnome_vfs_application_registry_unset_key</A
224 HREF=../glib/glib-doubly-linked-lists.html#GLIST
226 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-GET-APPLICATIONS"
227 >gnome_vfs_application_registry_get_applications</A
229 (const char *mime_type);
231 HREF=../glib/glib-doubly-linked-lists.html#GLIST
233 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-GET-MIME-TYPES"
234 >gnome_vfs_application_registry_get_mime_types</A
236 (const char *app_id);
238 HREF=../glib/glib-basic-types.html#GBOOLEAN
240 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-SUPPORTS-MIME-TYPE"
241 >gnome_vfs_application_registry_supports_mime_type</A
244 const char *mime_type);
246 HREF=../glib/glib-basic-types.html#GBOOLEAN
248 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-SUPPORTS-URI-SCHEME"
249 >gnome_vfs_application_registry_supports_uri_scheme</A
252 const char *uri_scheme);
254 HREF=../glib/glib-basic-types.html#GBOOLEAN
256 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-IS-USER-OWNED-APPLICATION"
257 >gnome_vfs_application_is_user_owned_application</A
260 HREF="gnome-vfs-mime-handlers.html#GNOMEVFSMIMEAPPLICATION"
261 >GnomeVFSMimeApplication</A
264 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-CLEAR-MIME-TYPES"
265 >gnome_vfs_application_registry_clear_mime_types</A
267 (const char *app_id);
269 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-ADD-MIME-TYPE"
270 >gnome_vfs_application_registry_add_mime_type</A
273 const char *mime_type);
275 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-REMOVE-MIME-TYPE"
276 >gnome_vfs_application_registry_remove_mime_type</A
279 const char *mime_type);
281 HREF="gnome-vfs-types.html#GNOMEVFSRESULT"
284 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-SYNC"
285 >gnome_vfs_application_registry_sync</A
289 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-SHUTDOWN"
290 >gnome_vfs_application_registry_shutdown</A
294 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-RELOAD"
295 >gnome_vfs_application_registry_reload</A
299 HREF="gnome-vfs-mime-handlers.html#GNOMEVFSMIMEAPPLICATION"
300 >GnomeVFSMimeApplication</A
302 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-GET-MIME-APPLICATION"
303 >gnome_vfs_application_registry_get_mime_application</A
305 (const char *app_id);
307 HREF="gnome-vfs-application-registry.html#GNOME-VFS-APPLICATION-REGISTRY-SAVE-MIME-APPLICATION"
308 >gnome_vfs_application_registry_save_mime_application</A
311 HREF="gnome-vfs-mime-handlers.html#GNOMEVFSMIMEAPPLICATION"
312 >GnomeVFSMimeApplication</A
313 > *application);</PRE
342 NAME="GNOME-VFS-APPLICATION-REGISTRY-COMMAND-CAPS"
344 >GNOME_VFS_APPLICATION_REGISTRY_COMMAND</H3
353 CLASS="PROGRAMLISTING"
354 >#define GNOME_VFS_APPLICATION_REGISTRY_COMMAND "command"</PRE
368 NAME="GNOME-VFS-APPLICATION-REGISTRY-NAME-CAPS"
370 >GNOME_VFS_APPLICATION_REGISTRY_NAME</H3
379 CLASS="PROGRAMLISTING"
380 >#define GNOME_VFS_APPLICATION_REGISTRY_NAME "name"</PRE
394 NAME="GNOME-VFS-APPLICATION-REGISTRY-CAN-OPEN-MULTIPLE-FILES-CAPS"
396 >GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES</H3
405 CLASS="PROGRAMLISTING"
406 >#define GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES "can_open_multiple_files"</PRE
420 NAME="GNOME-VFS-APPLICATION-REGISTRY-REQUIRES-TERMINAL-CAPS"
422 >GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL</H3
431 CLASS="PROGRAMLISTING"
432 >#define GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL "requires_terminal"</PRE
446 NAME="GNOME-VFS-APPLICATION-REGISTRY-EXISTS"
448 >gnome_vfs_application_registry_exists ()</H3
457 CLASS="PROGRAMLISTING"
459 HREF=../glib/glib-basic-types.html#GBOOLEAN
460 >gboolean</A> gnome_vfs_application_registry_exists
461 (const char *app_id);</PRE
466 >This function will return TRUE if there is an entry for <TT
472 the registry, otherwise FALSE.</P
476 CLASS="INFORMALTABLE"
505 > an application ID</TD
520 > TRUE if the application is in the registry, FALSE if not </TD
535 NAME="GNOME-VFS-APPLICATION-REGISTRY-GET-KEYS"
537 >gnome_vfs_application_registry_get_keys ()</H3
546 CLASS="PROGRAMLISTING"
548 HREF=../glib/glib-doubly-linked-lists.html#GLIST
549 >GList</A>* gnome_vfs_application_registry_get_keys
550 (const char *app_id);</PRE
555 >This function wil return a list of strings which is the list of
561 > in the application registry.</P
565 CLASS="INFORMALTABLE"
594 > the application ID for which to get keys</TD
609 > A list of the keys set for <TT
629 NAME="GNOME-VFS-APPLICATION-REGISTRY-PEEK-VALUE"
631 >gnome_vfs_application_registry_peek_value ()</H3
640 CLASS="PROGRAMLISTING"
641 >const char* gnome_vfs_application_registry_peek_value
643 const char *key);</PRE
648 >This will return the value associated with <TT
659 application registry. There is no need to free the return value.</P
663 CLASS="INFORMALTABLE"
692 > the application ID for which to look up a value</TD
709 > the key to look up</TD
724 > the value associated with the key, or NULL if there is no
725 associated value </TD
740 NAME="GNOME-VFS-APPLICATION-REGISTRY-GET-BOOL-VALUE"
742 >gnome_vfs_application_registry_get_bool_value ()</H3
751 CLASS="PROGRAMLISTING"
753 HREF=../glib/glib-basic-types.html#GBOOLEAN
754 >gboolean</A> gnome_vfs_application_registry_get_bool_value
758 HREF=../glib/glib-basic-types.html#GBOOLEAN
759 >gboolean</A> *got_key);</PRE
764 >This will look up a key in the structure pointed to by app_id and return the
765 boolean value of that key. It will return false if there are no
766 applications associated with the app_id.</P
770 CLASS="INFORMALTABLE"
799 > registry id of the application</TD
833 > TRUE if a setting was dound, otherwise FALSE</TD
853 > is set to "true" or "yes" for <TT
858 >, otherwise FALSE </TD
873 NAME="GNOME-VFS-APPLICATION-REGISTRY-REMOVE-APPLICATION"
875 >gnome_vfs_application_registry_remove_application ()</H3
884 CLASS="PROGRAMLISTING"
885 >void gnome_vfs_application_registry_remove_application
886 (const char *app_id);</PRE
891 >Given the registry id this function will remove all applications that has
892 been set by the user. You will need to call
893 gnome_vfs_application_registry_sync to save the changes.</P
897 CLASS="INFORMALTABLE"
926 > registry id of the application</TD
941 NAME="GNOME-VFS-APPLICATION-REGISTRY-SET-VALUE"
943 >gnome_vfs_application_registry_set_value ()</H3
952 CLASS="PROGRAMLISTING"
953 >void gnome_vfs_application_registry_set_value
956 const char *value);</PRE
961 >This function will set values pertaining to registry entry pointed to by
962 app_id. You will need to call gnome_vfs_application_registry_sync to
963 realize the changes.</P
967 CLASS="INFORMALTABLE"
996 > registry id of the application</TD
1030 > value to set the target key to</TD
1045 NAME="GNOME-VFS-APPLICATION-REGISTRY-SET-BOOL-VALUE"
1047 >gnome_vfs_application_registry_set_bool_value ()</H3
1056 CLASS="PROGRAMLISTING"
1057 >void gnome_vfs_application_registry_set_bool_value
1058 (const char *app_id,
1061 HREF=../glib/glib-basic-types.html#GBOOLEAN
1062 >gboolean</A> value);</PRE
1069 CLASS="INFORMALTABLE"
1147 NAME="GNOME-VFS-APPLICATION-REGISTRY-UNSET-KEY"
1149 >gnome_vfs_application_registry_unset_key ()</H3
1158 CLASS="PROGRAMLISTING"
1159 >void gnome_vfs_application_registry_unset_key
1160 (const char *app_id,
1161 const char *key);</PRE
1166 >This function given the application and the target will wipe the current
1167 value that the key contains.</P
1171 CLASS="INFORMALTABLE"
1200 > registry id of the application</TD
1232 NAME="GNOME-VFS-APPLICATION-REGISTRY-GET-APPLICATIONS"
1234 >gnome_vfs_application_registry_get_applications ()</H3
1243 CLASS="PROGRAMLISTING"
1245 HREF=../glib/glib-doubly-linked-lists.html#GLIST
1246 >GList</A>* gnome_vfs_application_registry_get_applications
1247 (const char *mime_type);</PRE
1252 >This will return all applications from the registry that are associated with
1253 the given mime type string.</P
1257 CLASS="INFORMALTABLE"
1286 > mime type string</TD
1301 > a list of the application IDs for all applications which
1302 support the given mime type. </TD
1317 NAME="GNOME-VFS-APPLICATION-REGISTRY-GET-MIME-TYPES"
1319 >gnome_vfs_application_registry_get_mime_types ()</H3
1328 CLASS="PROGRAMLISTING"
1330 HREF=../glib/glib-doubly-linked-lists.html#GLIST
1331 >GList</A>* gnome_vfs_application_registry_get_mime_types
1332 (const char *app_id);</PRE
1337 >This function returns a list of strings that represent the mime
1338 types that can be handled by an application.</P
1342 CLASS="INFORMALTABLE"
1371 > registry id of application</TD
1386 > a list of the mime types supported </TD
1401 NAME="GNOME-VFS-APPLICATION-REGISTRY-SUPPORTS-MIME-TYPE"
1403 >gnome_vfs_application_registry_supports_mime_type ()</H3
1412 CLASS="PROGRAMLISTING"
1414 HREF=../glib/glib-basic-types.html#GBOOLEAN
1415 >gboolean</A> gnome_vfs_application_registry_supports_mime_type
1416 (const char *app_id,
1417 const char *mime_type);</PRE
1422 >Use this function to see if there is an application associated with a given
1423 mime type. The function will return true or false.</P
1427 CLASS="INFORMALTABLE"
1456 > registry id of application</TD
1473 > mime type string</TD
1498 >, otherwise FALSE. </TD
1513 NAME="GNOME-VFS-APPLICATION-REGISTRY-SUPPORTS-URI-SCHEME"
1515 >gnome_vfs_application_registry_supports_uri_scheme ()</H3
1524 CLASS="PROGRAMLISTING"
1526 HREF=../glib/glib-basic-types.html#GBOOLEAN
1527 >gboolean</A> gnome_vfs_application_registry_supports_uri_scheme
1528 (const char *app_id,
1529 const char *uri_scheme);</PRE
1534 >Given the id of the application this function will determine if the
1535 uri scheme will given is supported.</P
1539 CLASS="INFORMALTABLE"
1568 > registry id of application</TD
1585 > uri schme string</TD
1610 >, otherwise FALSE </TD
1625 NAME="GNOME-VFS-APPLICATION-IS-USER-OWNED-APPLICATION"
1627 >gnome_vfs_application_is_user_owned_application ()</H3
1636 CLASS="PROGRAMLISTING"
1638 HREF=../glib/glib-basic-types.html#GBOOLEAN
1639 >gboolean</A> gnome_vfs_application_is_user_owned_application
1641 HREF="gnome-vfs-mime-handlers.html#GNOMEVFSMIMEAPPLICATION"
1642 >GnomeVFSMimeApplication</A
1643 > *application);</PRE
1648 >This function will determine if a mime application is user owned or not. By
1649 user ownered this means that the application is not a system application
1650 located in the prerequisite /usr area but rather in the user's area.</P
1654 CLASS="INFORMALTABLE"
1683 > data structure of the mime application</TD
1713 NAME="GNOME-VFS-APPLICATION-REGISTRY-CLEAR-MIME-TYPES"
1715 >gnome_vfs_application_registry_clear_mime_types ()</H3
1724 CLASS="PROGRAMLISTING"
1725 >void gnome_vfs_application_registry_clear_mime_types
1726 (const char *app_id);</PRE
1731 >This function will remove the mime types associated with the application.
1732 Changes are not realized until the gnome_vfs_application_registry_sync
1733 function is called to save the changes to the file.</P
1737 CLASS="INFORMALTABLE"
1766 > Application id</TD
1781 NAME="GNOME-VFS-APPLICATION-REGISTRY-ADD-MIME-TYPE"
1783 >gnome_vfs_application_registry_add_mime_type ()</H3
1792 CLASS="PROGRAMLISTING"
1793 >void gnome_vfs_application_registry_add_mime_type
1794 (const char *app_id,
1795 const char *mime_type);</PRE
1800 >This function will associate a mime type with an application given the
1801 application registry id and the mime type. Changes are not realized until
1802 the gnome_vfs_application_registry_sync function is called to save the
1803 changes to the file.</P
1807 CLASS="INFORMALTABLE"
1836 > registry id of application</TD
1853 > mime type string</TD
1868 NAME="GNOME-VFS-APPLICATION-REGISTRY-REMOVE-MIME-TYPE"
1870 >gnome_vfs_application_registry_remove_mime_type ()</H3
1879 CLASS="PROGRAMLISTING"
1880 >void gnome_vfs_application_registry_remove_mime_type
1881 (const char *app_id,
1882 const char *mime_type);</PRE
1887 >This function will de-associate a mime type from an application registry.
1888 Given the application registry id and the mime type. Changes are not
1889 realized until the gnome_vfs_application_registry_sync function is called to
1890 save the changes to the file.</P
1894 CLASS="INFORMALTABLE"
1923 > registry id of the application</TD
1940 > mime type string</TD
1955 NAME="GNOME-VFS-APPLICATION-REGISTRY-SYNC"
1957 >gnome_vfs_application_registry_sync ()</H3
1966 CLASS="PROGRAMLISTING"
1968 HREF="gnome-vfs-types.html#GNOMEVFSRESULT"
1970 > gnome_vfs_application_registry_sync
1976 >This function will sync the registry. Typically you would use this function
1977 after a modification of the registry. When you modify the registry a dirty
1978 flag is set. Calling this function will save your modifications to disk and
1981 >If successful, will return GNOME_VFS_OK</P
1985 CLASS="INFORMALTABLE"
2012 > GnomeVFSResult </TD
2027 NAME="GNOME-VFS-APPLICATION-REGISTRY-SHUTDOWN"
2029 >gnome_vfs_application_registry_shutdown ()</H3
2038 CLASS="PROGRAMLISTING"
2039 >void gnome_vfs_application_registry_shutdown
2045 >Synchronize gnome-vfs application registry data to disk, and free
2057 NAME="GNOME-VFS-APPLICATION-REGISTRY-RELOAD"
2059 >gnome_vfs_application_registry_reload ()</H3
2068 CLASS="PROGRAMLISTING"
2069 >void gnome_vfs_application_registry_reload
2075 >If this function is called for the first time it will initialize the
2076 registry. Subsequent calls to the function will clear out the current
2077 registry contents and load registry contents from the save file. Make
2078 certain that you've saved your registry before calling this function. It
2079 will destroy unsaved changes.</P
2090 NAME="GNOME-VFS-APPLICATION-REGISTRY-GET-MIME-APPLICATION"
2092 >gnome_vfs_application_registry_get_mime_application ()</H3
2101 CLASS="PROGRAMLISTING"
2103 HREF="gnome-vfs-mime-handlers.html#GNOMEVFSMIMEAPPLICATION"
2104 >GnomeVFSMimeApplication</A
2105 >* gnome_vfs_application_registry_get_mime_application
2106 (const char *app_id);</PRE
2111 >Returns a structure that contains the application that handles
2112 the mime type associated by the application referred by app_id.</P
2116 CLASS="INFORMALTABLE"
2145 > registry id of the application</TD
2160 > GnomeVFSMimeApplication </TD
2175 NAME="GNOME-VFS-APPLICATION-REGISTRY-SAVE-MIME-APPLICATION"
2177 >gnome_vfs_application_registry_save_mime_application ()</H3
2186 CLASS="PROGRAMLISTING"
2187 >void gnome_vfs_application_registry_save_mime_application
2189 HREF="gnome-vfs-mime-handlers.html#GNOMEVFSMIMEAPPLICATION"
2190 >GnomeVFSMimeApplication</A
2191 > *application);</PRE
2196 >This will save to the registry the application that will be associated with
2197 a defined mime type. The defined mime type is located within the
2198 GnomeVFSMimeApplication structure. Changes are not realized until the
2199 gnome_vfs_application_registry_sync function is called.</P
2203 CLASS="INFORMALTABLE"
2232 > application associated with the mime type</TD
2244 CLEAR="all"><BR><TABLE
2256 HREF="gnome-vfs-mime-sniff-buffer.html"
2261 ><<< Previous Page</B
2294 HREF="mime-registry.html"
2310 HREF="gnome-vfs-mime-magic.html"
2315 >Next Page >>></B
2328 >Algorithmic Sniff Buffer</B
2338 >Magic MIME Detection</B