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 GList*
ListHandleComps;
00048 typedef Glib::ListHandle<Glib::ustring> ListHandleStrings;
00049
00050
00051
00052
00053
00054
00055
00060
MimeActionType get_default_action_type(
const Glib::ustring& mime_type);
00061
00066
MimeApplication get_default_application(
const Glib::ustring& mime_type);
00067
00072 GnomeVFSMimeAction*
get_default_action(
const Glib::ustring& mime_type);
00073
00074
00075 Bonobo_ServerInfo*
get_default_component(
const Glib::ustring& mime_type);
00076
00077
00078
00083
ListHandleApps get_short_list_applications(
const Glib::ustring& mime_type);
00084
00085
00090
ListHandleApps get_all_applications(
const Glib::ustring& mime_type);
00091
00096
ListHandleComps get_short_list_components(
const Glib::ustring& mime_type);
00097
00102
ListHandleComps get_all_components(
const Glib::ustring& mime_type);
00103
00104
00110
bool id_in_application_list(
const Glib::ustring&
id,
const ListHandleApps& applications);
00111
00112
00117
ListHandleStrings id_list_from_application_list(
const ListHandleApps& applications);
00118
00119
00125
bool id_in_component_list(
const Glib::ustring& iid, ListHandleComps components);
00126
00127
00132
ListHandleStrings id_list_from_component_list(ListHandleComps components);
00133
00142
Glib::ustring get_icon(
const Glib::ustring& mime_type);
00143
00148
Glib::ustring get_description(
const Glib::ustring& mime_type);
00149
00155
bool can_be_executable(
const Glib::ustring& mime_type);
00156
00161
bool type_is_known(
const Glib::ustring& mime_type);
00162
00167
ListHandleStrings get_extensions_list(
const Glib::ustring& mime_type);
00168
00174
Glib::ustring get_extensions_string(
const Glib::ustring& mime_type,
bool pretty =
false);
00175
00179
ListHandleStrings get_registered_types();
00180
00181
00182
00183
00184
00190
Glib::ustring get_value(
Glib::ustring& mime_type,
Glib::ustring& key);
00191
00196
ListHandleStrings get_key_list(
Glib::ustring& mime_type);
00197
00198
00199
00200
00201
00202
00207
void set_default_action_type(
const Glib::ustring& mime_type, MimeActionType action_type)
throw(
exception);
00208
00213
void set_default_application(
const Glib::ustring& mime_type,
const Glib::ustring& application_id)
throw(
exception);
00214
00219
void set_default_component(
const Glib::ustring& mime_type,
const Glib::ustring& iid)
throw(
exception);
00220
00228
void set_icon(
const Glib::ustring& mime_type,
const Glib::ustring& filename)
throw(
exception);
00229
00235
void set_description(
const Glib::ustring& mime_type,
const Glib::ustring& description)
throw(
exception);
00236
00241
void set_can_be_executable(
const Glib::ustring& mime_type,
bool new_value)
throw(
exception);
00242
00248
void set_short_list_applications(
const Glib::ustring& mime_type,
ListHandleStrings& application_ids)
throw(
exception);
00249
00255
void set_short_list_components(
const Glib::ustring& mime_type,
ListHandleStrings& component_iids)
throw(
exception);
00256
00262
void add_application_to_short_list(
const Glib::ustring& mime_type,
Glib::ustring& application_id)
throw(
exception);
00263
00269
void remove_application_from_short_list(
const Glib::ustring& mime_type,
Glib::ustring& application_id)
throw(
exception);
00270
00276
void add_component_to_short_list(
const Glib::ustring& mime_type,
Glib::ustring& component_iid)
throw(
exception);
00277
00283
void remove_component_from_short_list(
const Glib::ustring& mime_type,
Glib::ustring& component_iid)
throw(
exception);
00284
00289
void add_extension(
const Glib::ustring& mime_type,
Glib::ustring& extension)
throw(
exception);
00290
00295
void remove_extension(
const Glib::ustring& mime_type,
Glib::ustring& extension)
throw(
exception);
00296
00302
void set_extensions_list(
const Glib::ustring& mime_type,
const Glib::ustring& extensions_list)
throw(
exception);
00303
00308
void extend_all_applications(
const Glib::ustring& mime_type,
ListHandleStrings& application_ids)
throw(
exception);
00309
00314
void remove_from_all_applications(
const Glib::ustring& mime_type,
ListHandleStrings& application_ids)
throw(
exception);
00315
00320
void registered_mime_type_delete(
const Glib::ustring& mime_type);
00321
00327
void set_registered_type_key(
const Glib::ustring& mime_type,
const Glib::ustring& key,
const Glib::ustring& data)
throw(
exception);
00328
00335
void set_value(
const Glib::ustring& mime_type,
const Glib::ustring& key,
const Glib::ustring& value)
throw(
exception);
00336
00337
00338
00339
00340
00345
void freeze();
00346
00349
void thaw();
00350
00354
void info_reload();
00355
00358
void reset();
00359
00360 }
00361 }
00362 }
00363
00364
#endif