Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

Gnome::Vfs::Mime Namespace Reference


Typedefs

typedef Glib::ListHandle<
Gnome::Vfs::MimeApplication * > 
ListHandleApps
typedef GList * ListHandleComps
typedef Glib::ListHandle<
Glib::ustring
ListHandleStrings

Functions

MimeActionType get_default_action_type (const Glib::ustring &mime_type)
 Get a default action type for specified mime_type.

MimeApplication get_default_application (const Glib::ustring &mime_type)
 Get the default application for specified mime_type.

GnomeVFSMimeAction * get_default_action (const Glib::ustring &mime_type)
 Get the default action for specified mime_type.

Bonobo_ServerInfo * get_default_component (const Glib::ustring &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.

ListHandleComps get_short_list_components (const Glib::ustring &mime_type)
 Get a short list of actions for specified mime_type.

ListHandleComps get_all_components (const Glib::ustring &mime_type)
 Get the entire list of actions for specified 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.

ListHandleStrings id_list_from_application_list (const ListHandleApps &applications)
 Get a list of IDs corresponding to the applications in a list.

bool id_in_component_list (const Glib::ustring &iid, ListHandleComps components)
 Test if a component id is in a list of components.

ListHandleStrings id_list_from_component_list (ListHandleComps components)
 Get a list of OAF IID's corresponding to the Bonobo_ServerInfos in a list.

Glib::ustring get_icon (const Glib::ustring &mime_type)
 Query the MIME database for an icon representing the specified MIME type.

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.

bool type_is_known (const Glib::ustring &mime_type)
 Test to see if mime_type is in the MIME database at all.

ListHandleStrings get_extensions_list (const Glib::ustring &mime_type)
 Get the file extensions associated with an MIME type.

Glib::ustring get_extensions_string (const Glib::ustring &mime_type, bool pretty=false)
 Retrieves the extensions associated with mime_type.

ListHandleStrings get_registered_types ()
 Get a list of registered MIME types from the MIME database.

Glib::ustring get_value (Glib::ustring &mime_type, Glib::ustring &key)
 Retrieve the value associated with key in the given GnomeMimeContext.

ListHandleStrings get_key_list (Glib::ustring &mime_type)
 Retrieve a list of all keys associated with mime_type.

void set_default_action_type (const Glib::ustring &mime_type, MimeActionType action_type) throw (exception)
 Sets the default action type to be performed on files of the specified MIME type.

void set_default_application (const Glib::ustring &mime_type, const Glib::ustring &application_id) throw (exception)
 Sets the default application to run on files of the specified MIME type.

void set_default_component (const Glib::ustring &mime_type, const Glib::ustring &iid) throw (exception)
 Sets the default component to use with files of the specified MIME type.

void set_icon (const Glib::ustring &mime_type, const Glib::ustring &filename) throw (exception)
 Set the icon entry for a particular MIME type in the MIME database.

void set_description (const Glib::ustring &mime_type, const Glib::ustring &description) throw (exception)
 Set the description of this MIME type in the MIME database.

void set_can_be_executable (const Glib::ustring &mime_type, bool new_value) throw (exception)
 Set whether files of this MIME type might conceivably be executable.

void set_short_list_applications (const Glib::ustring &mime_type, ListHandleStrings &application_ids) throw (exception)
 Set the short list of applications for the specified MIME type.

void set_short_list_components (const Glib::ustring &mime_type, ListHandleStrings &component_iids) throw (exception)
 Set the short list of components for the specified MIME type.

void add_application_to_short_list (const Glib::ustring &mime_type, Glib::ustring &application_id) throw (exception)
 Add an application to the short list for the specified MIME type.

void remove_application_from_short_list (const Glib::ustring &mime_type, Glib::ustring &application_id) throw (exception)
 Remove an application from the short list for the specified MIME type.

void add_component_to_short_list (const Glib::ustring &mime_type, Glib::ustring &component_iid) throw (exception)
 Add a component to the short list for the specified MIME type.

void remove_component_from_short_list (const Glib::ustring &mime_type, Glib::ustring &component_iid) throw (exception)
 Remove a component from the short list for the specified MIME type.

void add_extension (const Glib::ustring &mime_type, Glib::ustring &extension) throw (exception)
 Add a file extension to the specified MIME type in the database.

void remove_extension (const Glib::ustring &mime_type, Glib::ustring &extension) throw (exception)
 Removes a file extension from the specified MIME type in the database.

void set_extensions_list (const Glib::ustring &mime_type, const Glib::ustring &extensions_list) throw (exception)
 Sets the extensions for a given mime type.

void extend_all_applications (const Glib::ustring &mime_type, ListHandleStrings &application_ids) throw (exception)
 Register mime_type as being handled by all applications listed in application_ids.

void remove_from_all_applications (const Glib::ustring &mime_type, ListHandleStrings &application_ids) throw (exception)
 Remove mime_type as a handled type from every application in application_ids.

void registered_mime_type_delete (const Glib::ustring &mime_type)
 Delete an MIME type for the user who runs this command.

void set_registered_type_key (const Glib::ustring &mime_type, const Glib::ustring &key, const Glib::ustring &data) throw (exception)
 Set the key data for the registered MIME type's hash table.

void set_value (const Glib::ustring &mime_type, const Glib::ustring &key, const Glib::ustring &value) throw (exception)
 Set the value associated with the key.

void freeze ()
 Freeze the MIME data so that you can do multiple updates to the data in one batch without needing to back-up the files to disk or rewind them.

void thaw ()
 UnFreeze the MIME data after a freeze.

void info_reload ()
 Reload the MIME database from disk.

void reset ()
 Reset the user's MIME database to the system defaults.


Typedef Documentation

typedef Glib::ListHandle<Gnome::Vfs::MimeApplication*> Gnome::Vfs::Mime::ListHandleApps
 

typedef GList* Gnome::Vfs::Mime::ListHandleComps
 

typedef Glib::ListHandle<Glib::ustring> Gnome::Vfs::Mime::ListHandleStrings
 


Function Documentation

void add_application_to_short_list const Glib::ustring mime_type,
Glib::ustring application_id
throw (exception)
 

Add an application to the short list for the specified MIME type.

The short list contains applications recommended for possible selection by the user.

Parameters:
mime_type A string containing an MIME type.
application_id A string containing the application's ID in the MIME database.

void add_component_to_short_list const Glib::ustring mime_type,
Glib::ustring component_iid
throw (exception)
 

Add a component to the short list for the specified MIME type.

The short list contains components recommended for possible selection by the user.

Parameters:
mime_type A string containing an MIME type.
component_iid A string containing the component's OAF IID in the MIME database.

void add_extension const Glib::ustring mime_type,
Glib::ustring extension
throw (exception)
 

Add a file extension to the specified MIME type in the database.

Parameters:
mime_type The mime type to add the extension to.
extension The extension to add.

bool can_be_executable const Glib::ustring mime_type  ) 
 

Test whether files of this MIME type might conceivably be executable.

Default for known types is false. Default for unknown types is true.

Parameters:
mime_type A string containing an MIME type.
Returns:
true if some files of this MIME type are registered as being executable, and false otherwise.

void extend_all_applications const Glib::ustring mime_type,
ListHandleStrings &  application_ids
throw (exception)
 

Register mime_type as being handled by all applications listed in application_ids.

Parameters:
mime_type A string containing an MIME type.
application_ids A list of strings containing application ids.

void freeze  ) 
 

Freeze the MIME data so that you can do multiple updates to the data in one batch without needing to back-up the files to disk or rewind them.

ListHandleApps get_all_applications const Glib::ustring mime_type  ) 
 

Get the entire list of applications for specified mime_type.

Parameters:
mime_type A string containing an MIME type.
Returns:
A list of all MimeApplications for this MIME type.

ListHandleComps get_all_components const Glib::ustring mime_type  ) 
 

Get the entire list of actions for specified mime_type.

Parameters:
mime_type A string containing an MIME type.
Returns:
A list of all MimeAction 's for this MIME type.

GnomeVFSMimeAction* get_default_action const Glib::ustring mime_type  ) 
 

Get the default action for specified mime_type.

Parameters:
mime_type A string containing an MIME type.
Returns:
An MimeAction representing the default action for this MIME type.

MimeActionType get_default_action_type const Glib::ustring mime_type  ) 
 

Get a default action type for specified mime_type.

Parameters:
mime_type A string containing an MIME type.
Returns:
An enum value representing what to do for this MIME type.

MimeApplication get_default_application const Glib::ustring mime_type  ) 
 

Get the default application for specified mime_type.

Parameters:
mime_type A string containing an MIME type.
Returns:
An MimeApplication representing the default application for this MIME type.

Bonobo_ServerInfo* get_default_component const Glib::ustring mime_type  ) 
 

Glib::ustring get_description const Glib::ustring mime_type  ) 
 

Query the MIME database for a description of the specified MIME type.

Parameters:
mime_type A string containing an MIME type.
Returns:
A description of the MIME type.

ListHandleStrings get_extensions_list const Glib::ustring mime_type  ) 
 

Get the file extensions associated with an MIME type.

Parameters:
mime_type A string containing an MIME type.
Returns:
A list of strings of extensions.

Glib::ustring get_extensions_string const Glib::ustring mime_type,
bool  pretty = false
 

Retrieves the extensions associated with mime_type.

Parameters:
mime_type A string containing an MIME type.
pretty Whether to format the returned string with spaces (false) or commas (true).
Returns:
A string containing extensions for this mime-type, formatted based on pretty.

Glib::ustring get_icon const Glib::ustring mime_type  ) 
 

Query the MIME database for an icon representing the specified MIME type.

Parameters:
mime_type A string containing an MIME type.
Returns:
The filename of the icon as listed in the MIME database. This is usually a filename without path information, e.g. "i-chardev.png", and sometimes does not have an extension, e.g. "i-regular" if the icon is supposed to be image type agnostic between icon themes. Icons are generic, and not theme specific. These will not necessarily match with the icons a user sees in Nautilus, you have been warned.

ListHandleStrings get_key_list Glib::ustring mime_type  ) 
 

Retrieve a list of all keys associated with mime_type.

Parameters:
mime_type A string containing an MIME type to lookup.
Returns:
A list of strings containing keys associated with mime_type.

ListHandleStrings get_registered_types  ) 
 

Get a list of registered MIME types from the MIME database.

Returns:
A list of strings containing the MIME types registered.

ListHandleApps get_short_list_applications const Glib::ustring mime_type  ) 
 

Get a short list of applications for specified mime_type.

Parameters:
mime_type A string containing an MIME type.
Returns:
A short list of MimeApplications for this MIME type.

ListHandleComps get_short_list_components const Glib::ustring mime_type  ) 
 

Get a short list of actions for specified mime_type.

Parameters:
mime_type A string containing an MIME type.
Returns:
A short list of MimeAction 's for this MIME type.

Glib::ustring get_value Glib::ustring mime_type,
Glib::ustring key
 

Retrieve the value associated with key in the given GnomeMimeContext.

Parameters:
mime_type A string containing an MIME type.
key A key to lookup for the given MIME type.
Returns:
A string containing the data for the MIME type and key.

bool id_in_application_list const Glib::ustring id,
const ListHandleApps &  applications
 

Test if an application ID is in a list of applications.

Parameters:
id A string containing the application ID.
applications A list of MimeApplications.
Returns:
true if the ID is in this application list; false otherwise.

bool id_in_component_list const Glib::ustring iid,
ListHandleComps  components
 

Test if a component id is in a list of components.

Parameters:
iid A string containing a component's OAF IID.
components A GList* whose nodes are Bonobo_ServerInfos, such as the result of gnome_vfs_mime_get_short_list_components().
Returns:
true if the id is in this component list; false otherwise.

ListHandleStrings id_list_from_application_list const ListHandleApps &  applications  ) 
 

Get a list of IDs corresponding to the applications in a list.

Parameters:
applications A list of MimeApplications.
Returns:
A list of strings corresponding to the ID of each application in applications.

ListHandleStrings id_list_from_component_list ListHandleComps  components  ) 
 

Get a list of OAF IID's corresponding to the Bonobo_ServerInfos in a list.

Parameters:
components A GList* of Bonobo_ServerInfos.
Returns:
A list of strings corresponding to the iid of each component in components.

void info_reload  ) 
 

Reload the MIME database from disk.

This als notifies any listeners holding active Gnome::Vfs::MimeMonitor objects.

void registered_mime_type_delete const Glib::ustring mime_type  ) 
 

Delete an MIME type for the user who runs this command.

You can only undo this by calling Gnome::Vfs::Mime::reset().

Parameters:
mime_type A string containing the MIME type to delete.

void remove_application_from_short_list const Glib::ustring mime_type,
Glib::ustring application_id
throw (exception)
 

Remove an application from the short list for the specified MIME type.

The short list contains applications recommended for possible selection by the user.

Parameters:
mime_type A string containing an MIME type.
application_id A string containing the application's ID in the MIME database.

void remove_component_from_short_list const Glib::ustring mime_type,
Glib::ustring component_iid
throw (exception)
 

Remove a component from the short list for the specified MIME type.

The short list contains components recommended for possible selection by the user.

Parameters:
mime_type A string containing an MIME type.
component_iid A string containing the component's OAF IID in the MIME database.

void remove_extension const Glib::ustring mime_type,
Glib::ustring extension
throw (exception)
 

Removes a file extension from the specified MIME type in the database.

Parameters:
mime_type The mime type to remove the extension from.
extension The extension to remove.

void remove_from_all_applications const Glib::ustring mime_type,
ListHandleStrings &  application_ids
throw (exception)
 

Remove mime_type as a handled type from every application in application_ids.

Parameters:
mime_type A string containing an MIME type.
application_ids A list of strings containing application ids.

void reset  ) 
 

Reset the user's MIME database to the system defaults.

void set_can_be_executable const Glib::ustring mime_type,
bool  new_value
throw (exception)
 

Set whether files of this MIME type might conceivably be executable.

Parameters:
mime_type A string containing an MIME type.
new_value A boolean value indicating whether mime_type could be executable.

void set_default_action_type const Glib::ustring mime_type,
MimeActionType  action_type
throw (exception)
 

Sets the default action type to be performed on files of the specified MIME type.

Parameters:
mime_type A string containing an MIME type.
action_type An enum specifying the default action to perform.

void set_default_application const Glib::ustring mime_type,
const Glib::ustring application_id
throw (exception)
 

Sets the default application to run on files of the specified MIME type.

Parameters:
mime_type A string containing an MIME type.
application_id A string containing an ID of an application in the MIME database.

void set_default_component const Glib::ustring mime_type,
const Glib::ustring iid
throw (exception)
 

Sets the default component to use with files of the specified MIME type.

Parameters:
mime_type A string containing an MIME type.
iid A string containing an OAF IID of a component in the MIME database.

void set_description const Glib::ustring mime_type,
const Glib::ustring description
throw (exception)
 

Set the description of this MIME type in the MIME database.

The description should be something like "Gnumeric spreadsheet".

Parameters:
mime_type A string containing an MIME type.
description A description of this MIME type.

void set_extensions_list const Glib::ustring mime_type,
const Glib::ustring extensions_list
throw (exception)
 

Sets the extensions for a given mime type.

Overrides the previously set extensions.

Parameters:
mime_type A string containing an MIME type.
extensions_list A whitespace-separated list of the extensions to set for this MIME type.

void set_icon const Glib::ustring mime_type,
const Glib::ustring filename
throw (exception)
 

Set the icon entry for a particular MIME type in the MIME database.

Note that icon entries need not necessarily contain the full path, and do not necessarily need to specify an extension. So "i-regular", "my-special-icon.png", and "some-icon" are all valid icon filenames.

Parameters:
mime_type A string containing an MIME type.
filename A string containing an image filename.

void set_registered_type_key const Glib::ustring mime_type,
const Glib::ustring key,
const Glib::ustring data
throw (exception)
 

Set the key data for the registered MIME type's hash table.

Parameters:
mime_type A string containing the MIME type.
key A string containing the key to set.
data A string containing the data to set for key.

void set_short_list_applications const Glib::ustring mime_type,
ListHandleStrings &  application_ids
throw (exception)
 

Set the short list of applications for the specified MIME type.

The short list contains applications recommended for possible selection by the user.

Parameters:
mime_type A string containing an MIME type.
application_ids A list of application IDs.

void set_short_list_components const Glib::ustring mime_type,
ListHandleStrings &  component_iids
throw (exception)
 

Set the short list of components for the specified MIME type.

The short list contains components recommended for possible selection by the user.

Parameters:
mime_type A string containing an MIME type.
component_iids A list of OAF IID's.

void set_value const Glib::ustring mime_type,
const Glib::ustring key,
const Glib::ustring value
throw (exception)
 

Set the value associated with the key.

Will save it to the user's file if necessary.

Parameters:
mime_type A string containing the MIME type.
key A string containing the key to stor the value in.
value A string containing the value to stor in the key.

void thaw  ) 
 

UnFreeze the MIME data after a freeze.

bool type_is_known const Glib::ustring mime_type  ) 
 

Test to see if mime_type is in the MIME database at all.

Parameters:
mime_type A string containing an MIME type.
Returns:
true if anything is known about mime_type, otherwise false.


Generated on Mon Apr 5 17:43:43 2004 for libgnomevfsmm by doxygen 1.3.6-20040222