Typedefs | |
typedef Glib::ListHandle< Glib::ustring > | ListHandleStrings |
Functions | |
bool | exists (const Glib::ustring &app_id) |
Check to see if there is an entry for app_id in the registry. | |
ListHandleStrings | get_keys (const Glib::ustring &app_id) |
Get a list of keys for a specified application in the registry. | |
Glib::ustring | peek_value (const Glib::ustring &app_id, const Glib::ustring &key) |
Get the value associated with key for app_id in the registry. | |
bool | get_bool_value (const Glib::ustring &app_id, const Glib::ustring &key, bool &got_key) |
Look up a key in the structure pointed to by app_id and return the boolean value of that key. | |
void | remove_application (const Glib::ustring &app_id) |
Remove the application represented by app_id from the registry. | |
void | set_value (const Glib::ustring &app_id, const Glib::ustring &key, const Glib::ustring &value) |
Set values pertaining to the registry entry pointed to by app_id. | |
void | set_value (const Glib::ustring &app_id, const Glib::ustring &key, bool value=true) |
Set values pertaining to the registry entry pointed to by app_id. | |
void | unset_key (const Glib::ustring &app_id, const Glib::ustring &key) |
Wipe the current value that key contains for app_id. | |
ListHandleStrings | get_applications (const Glib::ustring &mime_type) |
Get all application IDs from the registry that are associated with the given MIME type. | |
ListHandleStrings | get_mime_types (const Glib::ustring &app_id) |
Get all MIME types that can be handled by an application. | |
bool | supports_mime_type (const Glib::ustring &app_id, const Glib::ustring &mime_type) |
Checks whether an application is associated with a given MIME type. | |
bool | supports_uri_scheme (const Glib::ustring &app_id, const Glib::ustring &uri_scheme) |
Checks whether an application supports the given URI scheme. | |
void | clear_mime_types (const Glib::ustring &app_id) |
Remove the MIME types associated with an application. | |
void | add_mime_type (const Glib::ustring &app_id, const Glib::ustring &mime_type) |
Associate an MIME type with an application. | |
void | remove_mime_type (const Glib::ustring &app_id, const Glib::ustring &mime_type) |
De-Associate an MIME type from an application. | |
void | sync () throw (exception) |
This function will sync the registry. | |
void | shutdown () |
Synchronize the application registry data to disk and free resources. | |
void | reload () |
If this function is called for the first time, it will initialize the registry. | |
MimeApplication | get_mime_application (const Glib::ustring &app_id) |
Get the MimeApplication associated with app_id . | |
void | save_mime_application (const MimeApplication &application) |
Save an application to the registry that will be associated with a defined MIME type. |
typedef Glib::ListHandle<Glib::ustring> Gnome::Vfs::ApplicationRegistry::ListHandleStrings |
bool Gnome::Vfs::ApplicationRegistry::exists | ( | const Glib::ustring & | app_id | ) |
Check to see if there is an entry for app_id in the registry.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID.
app_id | A string containing an application ID. |
true
if there is an entry, otherwise false
. ListHandleStrings Gnome::Vfs::ApplicationRegistry::get_keys | ( | const Glib::ustring & | app_id | ) |
Get a list of keys for a specified application in the registry.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID.
app_id | A string containing an application ID. |
Glib::ustring Gnome::Vfs::ApplicationRegistry::peek_value | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | key | |||
) |
Get the value associated with key for app_id in the registry.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID.
app_id | A string containing an application ID. | |
key | A string containing the key to look up. |
bool Gnome::Vfs::ApplicationRegistry::get_bool_value | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | key, | |||
bool & | got_key | |||
) |
Look up a key in the structure pointed to by app_id and return the boolean value of that key.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID.
app_id | A string containing an application ID. | |
key | A string containing the key to look up. | |
got_key | An output parameter that will be set to true if a setting was found, otherwise false . |
true
if key is set to "true" or "yes" for app_id, otherwise false
. void Gnome::Vfs::ApplicationRegistry::remove_application | ( | const Glib::ustring & | app_id | ) |
Remove the application represented by app_id from the registry.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. You will need to call sync() to save the changes.
app_id | A string containing an application ID. |
void Gnome::Vfs::ApplicationRegistry::set_value | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | key, | |||
const Glib::ustring & | value | |||
) |
Set values pertaining to the registry entry pointed to by app_id.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. You will need to call sync() to save the changes.
app_id | A string containing the registry ID of the application. | |
key | A string containing the target key. | |
value | A string containing the value to set the target key to. |
void Gnome::Vfs::ApplicationRegistry::set_value | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | key, | |||
bool | value = true | |||
) |
Set values pertaining to the registry entry pointed to by app_id.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. You will need to call sync() to save the changes.
app_id | A string containing the registry ID of the application. | |
key | A string containing the target key. | |
value | A boolean containing the value to set the target key to. |
void Gnome::Vfs::ApplicationRegistry::unset_key | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | key | |||
) |
Wipe the current value that key contains for app_id.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. You will need to call sync() to save the changes.
app_id | A string containing the registry ID of the application. | |
key | A string containing the target key. |
ListHandleStrings Gnome::Vfs::ApplicationRegistry::get_applications | ( | const Glib::ustring & | mime_type | ) |
Get all application IDs from the registry that are associated with the given MIME type.
If mime_type is NULL, it returns all applications.
mime_type | A string containing an MIME type. |
ListHandleStrings Gnome::Vfs::ApplicationRegistry::get_mime_types | ( | const Glib::ustring & | app_id | ) |
Get all MIME types that can be handled by an application.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID.
app_id | A string containing an application ID. |
bool Gnome::Vfs::ApplicationRegistry::supports_mime_type | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | mime_type | |||
) |
Checks whether an application is associated with a given MIME type.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID.
app_id | A string containing an application ID. | |
mime_type | A string containing an MIME type. |
true
if app_id supports mime_type , otherwise false
. bool Gnome::Vfs::ApplicationRegistry::supports_uri_scheme | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | uri_scheme | |||
) |
Checks whether an application supports the given URI scheme.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. See Gnome::Vfs::MimeApplication for information on how to obtain a URI scheme.
app_id | A string containing an application ID. | |
uri_scheme | A string containing a URI scheme. |
true
if app_id supports uri_scheme , otherwise false
. void Gnome::Vfs::ApplicationRegistry::clear_mime_types | ( | const Glib::ustring & | app_id | ) |
Remove the MIME types associated with an application.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. You will need to call sync() to save the changes.
app_id | A string containing an application ID. |
void Gnome::Vfs::ApplicationRegistry::add_mime_type | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | mime_type | |||
) |
Associate an MIME type with an application.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. You will need to call sync() to save the changes.
app_id | A string containing an application ID. | |
mime_type | A string containing an MIME type. |
void Gnome::Vfs::ApplicationRegistry::remove_mime_type | ( | const Glib::ustring & | app_id, | |
const Glib::ustring & | mime_type | |||
) |
De-Associate an MIME type from an application.
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID. You will need to call sync() to save the changes.
app_id | A string containing an application ID. | |
mime_type | A string containing an MIME type. |
void Gnome::Vfs::ApplicationRegistry::sync | ( | ) | throw (exception) |
This function will sync the registry.
Typically you would use this function after a modification of the registry. When you modify the registry, a dirty flag is set. Calling this function will save your modifications to disk and reset the flag.
void Gnome::Vfs::ApplicationRegistry::shutdown | ( | ) |
Synchronize the application registry data to disk and free resources.
void Gnome::Vfs::ApplicationRegistry::reload | ( | ) |
If this function is called for the first time, it will initialize the registry.
Subsequent calls to the function will clear out the current registry contents and load registry contents from the save file. Make certain that you have saved your registry before calling this function. It will destroy unsaved changes!!
MimeApplication Gnome::Vfs::ApplicationRegistry::get_mime_application | ( | const Glib::ustring & | app_id | ) |
Get the MimeApplication associated with app_id .
See Gnome::Vfs::Mime or get_applications() for information on how to obtain an application ID.
app_id | A string containing an application ID. |
void Gnome::Vfs::ApplicationRegistry::save_mime_application | ( | const MimeApplication & | application | ) |
Save an application to the registry that will be associated with a defined MIME type.
application | The application associated with the MIME type. |