Main Page | Modules | File List | Globals

MIME category


Enumerations

enum  OssoMimeCategory {
  OSSO_MIME_CATEGORY_BOOKMARKS = 1 << 0, OSSO_MIME_CATEGORY_CONTACTS = 1 << 1, OSSO_MIME_CATEGORY_DOCUMENTS = 1 << 2, OSSO_MIME_CATEGORY_EMAILS = 1 << 3,
  OSSO_MIME_CATEGORY_IMAGES = 1 << 4, OSSO_MIME_CATEGORY_AUDIO = 1 << 5, OSSO_MIME_CATEGORY_VIDEO = 1 << 6, OSSO_MIME_CATEGORY_OTHER = 1 << 7,
  OSSO_MIME_CATEGORY_ALL = (1 << 8) - 1
}

Functions

OssoMimeCategory osso_mime_get_category_for_mime_type (const gchar *mime_type)
GList * osso_mime_get_mime_types_for_category (OssoMimeCategory category)
void osso_mime_types_list_free (GList *list)
G_GNUC_CONST gchar * osso_mime_get_category_name (OssoMimeCategory category)
OssoMimeCategory osso_mime_get_category_from_name (const gchar *category)

Enumeration Type Documentation

enum OssoMimeCategory
 

Enumeration values:
OSSO_MIME_CATEGORY_BOOKMARKS 
OSSO_MIME_CATEGORY_CONTACTS 
OSSO_MIME_CATEGORY_DOCUMENTS 
OSSO_MIME_CATEGORY_EMAILS 
OSSO_MIME_CATEGORY_IMAGES 
OSSO_MIME_CATEGORY_AUDIO 
OSSO_MIME_CATEGORY_VIDEO 
OSSO_MIME_CATEGORY_OTHER 
OSSO_MIME_CATEGORY_ALL 


Function Documentation

OssoMimeCategory osso_mime_get_category_for_mime_type const gchar *  mime_type  ) 
 

Return the category the specified mime type is in. See osso_mime_get_mime_types_for_category() for more information.

Parameters:
mime_type The mime type.
Returns:
The category that the mime type is in.

OssoMimeCategory osso_mime_get_category_from_name const gchar *  category  ) 
 

Returns the category corresponding to the given name.

Parameters:
category The category name.
Returns:
The category.

G_GNUC_CONST gchar* osso_mime_get_category_name OssoMimeCategory  category  ) 
 

Returns the name of the specified category.

Parameters:
category The category.
Returns:
The name of the category, should not be freed or modified.

GList* osso_mime_get_mime_types_for_category OssoMimeCategory  category  ) 
 

Returns a list of mime types that are in the specified category. The returned list should be freed by calling osso_mime_types_list_free().

The mapping between category and mime type is handled through the shared mime info. Add the tag <osso:category name="name"/> to a mime type to specify that the mime type is in the category "name". Valid category names are:

audio, bookmarks, contacts, documents, emails, images, video

An example:

<mime-type type="text/plain"> <osso:category name="documents"/> </mime-type>

Parameters:
category The category.
Returns:
A list of mime types, represented as strings, or NULL if none were found or not valid category.

void osso_mime_types_list_free GList *  list  ) 
 

Frees the list of mime types as returned by osso_mime_get_mime_types_for_category().

Parameters:
list A list of mime types.


Generated on Sat May 14 04:16:34 2005 for LibOSSOMIME by doxygen 1.3.7