00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _LIBGNOMEVFSMM_APPLICATION_REGISTRY_H
00022 #define _LIBGNOMEVFSMM_APPLICATION_REGISTRY_H
00023
00024 #include <glibmm.h>
00025
00026 #include <libgnomevfsmm/enums.h>
00027 #include <libgnomevfsmm/exception.h>
00028 #include <libgnomevfsmm/mime-application.h>
00029 #include <libgnomevfs/gnome-vfs-application-registry.h>
00030
00031
00032 namespace Gnome
00033 {
00034
00035 namespace Vfs
00036 {
00037
00038
00039
00040
00041 namespace ApplicationRegistry
00042 {
00043
00044 typedef Glib::ListHandle<Glib::ustring> ListHandleStrings;
00045
00046
00052 bool exists(const Glib::ustring& app_id);
00053
00054
00055
00061 ListHandleStrings get_keys(const Glib::ustring& app_id);
00062
00069 Glib::ustring peek_value(const Glib::ustring& app_id, const Glib::ustring& key);
00070
00071
00072
00073
00074
00082 bool get_bool_value(const Glib::ustring& app_id, const Glib::ustring& key, bool& got_key);
00083
00089 void remove_application(const Glib::ustring& app_id);
00090
00098 void set_value(const Glib::ustring& app_id, const Glib::ustring& key, const Glib::ustring& value);
00099
00100
00101
00102
00110 void set_value(const Glib::ustring& app_id, const Glib::ustring& key, bool value = true);
00111
00112
00119 void unset_key(const Glib::ustring& app_id, const Glib::ustring& key);
00120
00121
00122
00123
00124
00130 ListHandleStrings get_applications(const Glib::ustring& mime_type);
00131
00137 ListHandleStrings get_mime_types(const Glib::ustring& app_id);
00138
00145 bool supports_mime_type(const Glib::ustring& app_id, const Glib::ustring& mime_type);
00146
00154 bool supports_uri_scheme(const Glib::ustring& app_id, const Glib::ustring& uri_scheme);
00155
00156
00157
00158
00159
00160
00166 void clear_mime_types(const Glib::ustring& app_id);
00167
00174 void add_mime_type(const Glib::ustring& app_id, const Glib::ustring& mime_type);
00175
00182 void remove_mime_type(const Glib::ustring& app_id, const Glib::ustring& mime_type);
00183
00184
00188 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00189 void sync() throw(exception);
00190 #else
00191 void sync(std::auto_ptr<Gnome::Vfs::exception>& error);
00192 #endif
00193
00194
00195
00198 void shutdown();
00199
00200
00204 void reload();
00205
00206
00207
00208
00209
00210
00216 MimeApplication get_mime_application(const Glib::ustring& app_id);
00217
00221 void save_mime_application(const MimeApplication& application);
00222
00223 }
00224
00225 }
00226 }
00227
00228
00229
00230
00231 #endif
00232