00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _LIBGNOMEVFSMM_MIME_HANDLERS_H
00020 #define _LIBGNOMEVFSMM_MIME_HANDLERS_H
00021
00022 #include <glibmm.h>
00023
00024 #include <libgnomevfsmm/enums.h>
00025 #include <libgnomevfsmm/exception.h>
00026 #include <libgnomevfsmm/mime-application.h>
00027 #include <libgnomevfsmm/mime-action.h>
00028
00029 namespace Gnome
00030 {
00031
00032 namespace Vfs
00033 {
00034
00035
00036
00037
00038
00039
00040
00041
00042 namespace Mime
00043 {
00044
00045 typedef Glib::ListHandle<Gnome::Vfs::MimeApplication*> ListHandleApps;
00046
00047 typedef Glib::ListHandle<Glib::ustring> ListHandleStrings;
00048
00049
00050
00051
00052
00053
00054
00059 MimeActionType get_default_action_type(const Glib::ustring& mime_type);
00060
00065 MimeApplication get_default_application(const Glib::ustring& mime_type);
00066
00071 GnomeVFSMimeAction* get_default_action(const Glib::ustring& mime_type);
00072
00073
00074
00075
00076
00077
00082 ListHandleApps get_short_list_applications(const Glib::ustring& mime_type);
00083
00084
00089 ListHandleApps get_all_applications(const Glib::ustring& mime_type);
00090
00091
00092
00093
00094
00095
00096
00097
00103 bool id_in_application_list(const Glib::ustring& id, const ListHandleApps& applications);
00104
00105
00110 ListHandleStrings id_list_from_application_list(const ListHandleApps& applications);
00111
00112
00113
00114
00115
00124 Glib::ustring get_icon(const Glib::ustring& mime_type);
00125
00130 Glib::ustring get_description(const Glib::ustring& mime_type);
00131
00137 bool can_be_executable(const Glib::ustring& mime_type);
00138
00143 bool type_is_known(const Glib::ustring& mime_type);
00144
00149 ListHandleStrings get_extensions_list(const Glib::ustring& mime_type);
00150
00156 Glib::ustring get_extensions_string(const Glib::ustring& mime_type, bool pretty = false);
00157
00161 ListHandleStrings get_registered_types();
00162
00163
00164
00165
00166
00172 Glib::ustring get_value(Glib::ustring& mime_type, Glib::ustring& key);
00173
00178 ListHandleStrings get_key_list(Glib::ustring& mime_type);
00179
00180
00181
00182
00183
00184
00189 void set_default_action_type(const Glib::ustring& mime_type, MimeActionType action_type) throw(exception);
00190
00195 void set_default_application(const Glib::ustring& mime_type, const Glib::ustring& application_id) throw(exception);
00196
00201 void set_default_component(const Glib::ustring& mime_type, const Glib::ustring& iid) throw(exception);
00202
00210 void set_icon(const Glib::ustring& mime_type, const Glib::ustring& filename) throw(exception);
00211
00217 void set_description(const Glib::ustring& mime_type, const Glib::ustring& description) throw(exception);
00218
00223 void set_can_be_executable(const Glib::ustring& mime_type, bool new_value) throw(exception);
00224
00230 void set_short_list_applications(const Glib::ustring& mime_type, ListHandleStrings& application_ids) throw(exception);
00231
00237 void set_short_list_components(const Glib::ustring& mime_type, ListHandleStrings& component_iids) throw(exception);
00238
00244 void add_application_to_short_list(const Glib::ustring& mime_type, Glib::ustring& application_id) throw(exception);
00245
00251 void remove_application_from_short_list(const Glib::ustring& mime_type, Glib::ustring& application_id) throw(exception);
00252
00258 void add_component_to_short_list(const Glib::ustring& mime_type, Glib::ustring& component_iid) throw(exception);
00259
00265 void remove_component_from_short_list(const Glib::ustring& mime_type, Glib::ustring& component_iid) throw(exception);
00266
00271 void add_extension(const Glib::ustring& mime_type, Glib::ustring& extension) throw(exception);
00272
00277 void remove_extension(const Glib::ustring& mime_type, Glib::ustring& extension) throw(exception);
00278
00284 void set_extensions_list(const Glib::ustring& mime_type, const Glib::ustring& extensions_list) throw(exception);
00285
00290 void extend_all_applications(const Glib::ustring& mime_type, ListHandleStrings& application_ids) throw(exception);
00291
00296 void remove_from_all_applications(const Glib::ustring& mime_type, ListHandleStrings& application_ids) throw(exception);
00297
00302 void registered_mime_type_delete(const Glib::ustring& mime_type);
00303
00309 void set_registered_type_key(const Glib::ustring& mime_type, const Glib::ustring& key, const Glib::ustring& data) throw(exception);
00310
00317 void set_value(const Glib::ustring& mime_type, const Glib::ustring& key, const Glib::ustring& value) throw(exception);
00318
00319
00320
00321
00322
00327 void freeze();
00328
00331 void thaw();
00332
00336 void info_reload();
00337
00340 void reset();
00341
00342 }
00343 }
00344 }
00345
00346 #endif