19 #ifndef _LIBGNOMEVFSMM_MIME_HANDLERS_H
20 #define _LIBGNOMEVFSMM_MIME_HANDLERS_H
33 #include <libgnomevfs/gnome-vfs-mime-handlers.h>
35 typedef void Bonobo_ServerInfo;
133 Glib::ustring
get_icon(
const Glib::ustring& mime_type);
181 Glib::ustring
get_value(Glib::ustring& mime_type, Glib::ustring& key);
198 #ifdef GLIBMM_EXCEPTIONS_ENABLED
202 #endif //GLIBMM_EXCEPTIONS_ENABLED
208 #ifdef GLIBMM_EXCEPTIONS_ENABLED
211 void set_default_application(
const Glib::ustring& mime_type,
const Glib::ustring& application_id, std::auto_ptr<Gnome::Vfs::exception>& error);
212 #endif //GLIBMM_EXCEPTIONS_ENABLED
218 #ifdef GLIBMM_EXCEPTIONS_ENABLED
221 void set_default_component(
const Glib::ustring& mime_type,
const Glib::ustring& iid, std::auto_ptr<Gnome::Vfs::exception>& error);
222 #endif //GLIBMM_EXCEPTIONS_ENABLED
231 #ifdef GLIBMM_EXCEPTIONS_ENABLED
232 void set_icon(
const Glib::ustring& mime_type,
const Glib::ustring& filename)
throw(
exception);
234 void set_icon(
const Glib::ustring& mime_type,
const Glib::ustring& filename, std::auto_ptr<Gnome::Vfs::exception>& error);
235 #endif //GLIBMM_EXCEPTIONS_ENABLED
242 #ifdef GLIBMM_EXCEPTIONS_ENABLED
245 void set_description(
const Glib::ustring& mime_type,
const Glib::ustring& description, std::auto_ptr<Gnome::Vfs::exception>& error);
246 #endif //GLIBMM_EXCEPTIONS_ENABLED
252 #ifdef GLIBMM_EXCEPTIONS_ENABLED
255 void set_can_be_executable(
const Glib::ustring& mime_type,
bool new_value, std::auto_ptr<Gnome::Vfs::exception>& error);
256 #endif //GLIBMM_EXCEPTIONS_ENABLED
263 #ifdef GLIBMM_EXCEPTIONS_ENABLED
267 #endif //GLIBMM_EXCEPTIONS_ENABLED
274 #ifdef GLIBMM_EXCEPTIONS_ENABLED
278 #endif //GLIBMM_EXCEPTIONS_ENABLED
285 #ifdef GLIBMM_EXCEPTIONS_ENABLED
288 void add_application_to_short_list(
const Glib::ustring& mime_type, Glib::ustring& application_id, std::auto_ptr<Gnome::Vfs::exception>& error);
289 #endif //GLIBMM_EXCEPTIONS_ENABLED
296 #ifdef GLIBMM_EXCEPTIONS_ENABLED
300 #endif //GLIBMM_EXCEPTIONS_ENABLED
307 #ifdef GLIBMM_EXCEPTIONS_ENABLED
310 void add_component_to_short_list(
const Glib::ustring& mime_type, Glib::ustring& component_iid, std::auto_ptr<Gnome::Vfs::exception>& error);
311 #endif //GLIBMM_EXCEPTIONS_ENABLED
318 #ifdef GLIBMM_EXCEPTIONS_ENABLED
322 #endif //GLIBMM_EXCEPTIONS_ENABLED
328 #ifdef GLIBMM_EXCEPTIONS_ENABLED
331 void add_extension(
const Glib::ustring& mime_type, Glib::ustring& extension, std::auto_ptr<Gnome::Vfs::exception>& error);
332 #endif //GLIBMM_EXCEPTIONS_ENABLED
338 #ifdef GLIBMM_EXCEPTIONS_ENABLED
341 void remove_extension(
const Glib::ustring& mime_type, Glib::ustring& extension, std::auto_ptr<Gnome::Vfs::exception>& error);
342 #endif //GLIBMM_EXCEPTIONS_ENABLED
349 #ifdef GLIBMM_EXCEPTIONS_ENABLED
352 void set_extensions_list(
const Glib::ustring& mime_type,
const Glib::ustring& extensions_list, std::auto_ptr<Gnome::Vfs::exception>& error);
353 #endif //GLIBMM_EXCEPTIONS_ENABLED
359 #ifdef GLIBMM_EXCEPTIONS_ENABLED
363 #endif //GLIBMM_EXCEPTIONS_ENABLED
369 #ifdef GLIBMM_EXCEPTIONS_ENABLED
373 #endif //GLIBMM_EXCEPTIONS_ENABLED
386 #ifdef GLIBMM_EXCEPTIONS_ENABLED
389 void set_registered_type_key(
const Glib::ustring& mime_type,
const Glib::ustring& key,
const Glib::ustring& data, std::auto_ptr<Gnome::Vfs::exception>& error);
390 #endif //GLIBMM_EXCEPTIONS_ENABLED
398 #ifdef GLIBMM_EXCEPTIONS_ENABLED
399 void set_value(
const Glib::ustring& mime_type,
const Glib::ustring& key,
const Glib::ustring& value)
throw(
exception);
401 void set_value(
const Glib::ustring& mime_type,
const Glib::ustring& key,
const Glib::ustring& value, std::auto_ptr<Gnome::Vfs::exception>& error);
402 #endif //GLIBMM_EXCEPTIONS_ENABLED
Glib::ListHandle< Gnome::Vfs::MimeApplication * > ListHandleApps
Definition: mime-handlers.h:54
void set_short_list_components(const Glib::ustring &mime_type, ListHandleStrings &component_iids)
Set the short list of components for the specified MIME type.
Definition: mime-application.h:42
void remove_component_from_short_list(const Glib::ustring &mime_type, Glib::ustring &component_iid)
Remove a component from the short list for the specified MIME type.
ListHandleApps get_short_list_applications(const Glib::ustring &mime_type)
Get a short list of applications for specified mime_type.
ListHandleApps get_all_applications(const Glib::ustring &mime_type)
Get the entire list of applications for specified mime_type.
void thaw()
UnFreeze the MIME data after a freeze.
Glib::ListHandle< Glib::ustring > ListHandleStrings
Definition: mime-handlers.h:56
MimeActionType get_default_action_type(const Glib::ustring &mime_type)
Get a default action type for specified mime_type.
void info_reload()
Reload the MIME database from disk.
void set_registered_type_key(const Glib::ustring &mime_type, const Glib::ustring &key, const Glib::ustring &data)
Set the key data for the registered MIME type's hash table.
Glib::ustring get_icon(const Glib::ustring &mime_type)
Query the MIME database for an icon representing the specified MIME type.
bool type_is_known(const Glib::ustring &mime_type)
Test to see if mime_type is in the MIME database at all.
ListHandleStrings id_list_from_application_list(const ListHandleApps &applications)
Get a list of IDs corresponding to the applications in a list.
void registered_mime_type_delete(const Glib::ustring &mime_type)
Delete an MIME type for the user who runs this command.
void set_default_application(const Glib::ustring &mime_type, const Glib::ustring &application_id)
Sets the default application to run on files of the specified MIME type.
void freeze()
Freeze the MIME data so that you can do multiple updates to the data in one batch without needing to ...
Glib::ustring get_extensions_string(const Glib::ustring &mime_type, bool pretty=false)
Retrieves the extensions associated with mime_type.
bool id_in_application_list(const Glib::ustring &id, const ListHandleApps &applications)
Test if an application ID is in a list of applications.
void extend_all_applications(const Glib::ustring &mime_type, ListHandleStrings &application_ids)
Register mime_type as being handled by all applications listed in application_ids.
MimeApplication get_default_application(const Glib::ustring &mime_type)
Get the default application for specified mime_type.
ListHandleStrings get_key_list(Glib::ustring &mime_type)
Retrieve a list of all keys associated with mime_type.
void set_short_list_applications(const Glib::ustring &mime_type, ListHandleStrings &application_ids)
Set the short list of applications for the specified MIME type.
GnomeVFSMimeAction * get_default_action(const Glib::ustring &mime_type)
Get the default action for specified mime_type.
void remove_from_all_applications(const Glib::ustring &mime_type, ListHandleStrings &application_ids)
Remove mime_type as a handled type from every application in application_ids.
Glib::ustring get_value(Glib::ustring &mime_type, Glib::ustring &key)
Retrieve the value associated with key in the given GnomeMimeContext.
void add_extension(const Glib::ustring &mime_type, Glib::ustring &extension)
Add a file extension to the specified MIME type in the database.
void set_icon(const Glib::ustring &mime_type, const Glib::ustring &filename)
Set the icon entry for a particular MIME type in the MIME database.
void set_default_component(const Glib::ustring &mime_type, const Glib::ustring &iid)
Sets the default component to use with files of the specified MIME type.
void add_component_to_short_list(const Glib::ustring &mime_type, Glib::ustring &component_iid)
Add a component to the short list for the specified MIME type.
void set_can_be_executable(const Glib::ustring &mime_type, bool new_value)
Set whether files of this MIME type might conceivably be executable.
void add_application_to_short_list(const Glib::ustring &mime_type, Glib::ustring &application_id)
Add an application to the short list for the specified MIME type.
void set_default_action_type(const Glib::ustring &mime_type, MimeActionType action_type)
Sets the default action type to be performed on files of the specified MIME type. ...
void set_extensions_list(const Glib::ustring &mime_type, const Glib::ustring &extensions_list)
Sets the extensions for a given mime type.
ListHandleStrings get_registered_types()
Get a list of registered MIME types from the MIME database.
Definition: exception.h:33
void set_value(const Glib::ustring &mime_type, const Glib::ustring &key, const Glib::ustring &value)
Set the value associated with the key.
ListHandleStrings get_extensions_list(const Glib::ustring &mime_type)
Get the file extensions associated with an MIME type.
void set_description(const Glib::ustring &mime_type, const Glib::ustring &description)
Set the description of this MIME type in the MIME database.
Glib::ustring get_description(const Glib::ustring &mime_type)
Query the MIME database for a description of the specified MIME type.
bool can_be_executable(const Glib::ustring &mime_type)
Test whether files of this MIME type might conceivably be executable.
void remove_extension(const Glib::ustring &mime_type, Glib::ustring &extension)
Removes a file extension from the specified MIME type in the database.
void reset()
Reset the user's MIME database to the system defaults.
void remove_application_from_short_list(const Glib::ustring &mime_type, Glib::ustring &application_id)
Remove an application from the short list for the specified MIME type.