1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 /* gnome-vfs-application-registry.h
5 * Copyright (C) 1998 Miguel de Icaza
6 * Copyright (C) 2000 Eazel, Inc
8 * The Gnome Library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * The Gnome Library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with the Gnome Library; see the file COPYING.LIB. If not,
20 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 * Authors: George Lebl
25 * Based on original mime-info database code by Miguel de Icaza
28 #ifndef GNOME_VFS_APPLICATION_REGISTRY_H
29 #define GNOME_VFS_APPLICATION_REGISTRY_H
31 #include <libgnomevfs/gnome-vfs-mime-handlers.h>
36 * GNOME_VFS_APPLICATION_REGISTRY_COMMAND:
38 * Application registry key for fetching the command to execute
41 #define GNOME_VFS_APPLICATION_REGISTRY_COMMAND "command"
44 * GNOME_VFS_APPLICATION_REGISTRY_NAME:
46 * Application registry key for fetching the name of an application.
48 #define GNOME_VFS_APPLICATION_REGISTRY_NAME "name"
51 * GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES:
53 * Application registry key for determining if an application
54 * can open multiple files in the same invocation.
56 #define GNOME_VFS_APPLICATION_REGISTRY_CAN_OPEN_MULTIPLE_FILES "can_open_multiple_files"
59 * GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL:
61 * Application registry key for determining if an application
62 * needs to run from within a terminal (for example, mpg123)
64 #define GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL "requires_terminal"
68 * Application registry key for determining if an application
69 * is using gnome-vfs and thus can open any URI supported by
72 #define GNOME_VFS_APPLICATION_REGISTRY_USES_GNOMEVFS "uses_gnomevfs"
75 * GNOME_VFS_APPLICATION_REGISTRY_STARTUP_NOTIFY:
77 * Application registry key for determining if an application
78 * supports freedesktop.org-style startup notification.
80 #define GNOME_VFS_APPLICATION_REGISTRY_STARTUP_NOTIFY "startup_notify"
85 gboolean gnome_vfs_application_registry_exists (const char *app_id);
88 * Getting arbitrary keys
90 GList *gnome_vfs_application_registry_get_keys (const char *app_id);
91 const char *gnome_vfs_application_registry_peek_value (const char *app_id,
93 gboolean gnome_vfs_application_registry_get_bool_value (const char *app_id,
100 void gnome_vfs_application_registry_remove_application(const char *app_id);
101 void gnome_vfs_application_registry_set_value (const char *app_id,
104 void gnome_vfs_application_registry_set_bool_value (const char *app_id,
107 void gnome_vfs_application_registry_unset_key (const char *app_id,
113 GList *gnome_vfs_application_registry_get_applications(const char *mime_type);
114 GList *gnome_vfs_application_registry_get_mime_types (const char *app_id);
116 gboolean gnome_vfs_application_registry_supports_mime_type (const char *app_id,
117 const char *mime_type);
118 gboolean gnome_vfs_application_registry_supports_uri_scheme (const char *app_id,
119 const char *uri_scheme);
120 gboolean gnome_vfs_application_is_user_owned_application (const GnomeVFSMimeApplication *application);
123 * Mime type functions
124 * Note that mime_type can be a specific (image/png) or generic (image/<star>) type
127 void gnome_vfs_application_registry_clear_mime_types (const char *app_id);
128 void gnome_vfs_application_registry_add_mime_type (const char *app_id,
129 const char *mime_type);
130 void gnome_vfs_application_registry_remove_mime_type (const char *app_id,
131 const char *mime_type);
135 * Commit function, should be called if ANY stuff changes have been made.
136 * Stuff is saved into the user directory.
138 GnomeVFSResult gnome_vfs_application_registry_sync (void);
140 void gnome_vfs_application_registry_shutdown (void);
141 void gnome_vfs_application_registry_reload (void);
144 * Integrating with gnome-vfs-mime-handlers
146 GnomeVFSMimeApplication *
147 gnome_vfs_application_registry_get_mime_application(const char *app_id);
148 void gnome_vfs_application_registry_save_mime_application(const GnomeVFSMimeApplication *application);
153 #endif /* GNOME_VFS_APPLICATION_REGISTRY_H */