Efreet_Mime: The XDG Shared Mime Info standard

Efreet Mime is a library designed to help apps work with the Freedesktop.org Shared Mime Info standard. More...

Functions

int efreet_mime_init (void)
 Initializes the efreet mime settings.
int efreet_mime_shutdown (void)
 Cleans up the efreet mime settings system.
const char * efreet_mime_type_get (const char *file)
 Retreive the mime type of a file.
const char * efreet_mime_magic_type_get (const char *file)
 Retreive the mime type of a file using magic.
const char * efreet_mime_globs_type_get (const char *file)
 Retreive the mime type of a file using globs.
const char * efreet_mime_special_type_get (const char *file)
 Retreive the special mime type of a file.
const char * efreet_mime_fallback_type_get (const char *file)
 Retreive the fallback mime type of a file.
const char * efreet_mime_type_icon_get (const char *mime, const char *theme, unsigned int size)
 Retreive the mime type icon for a file.
void efreet_mime_type_cache_clear (void)
 Clear mime icons mapping cache.
void efreet_mime_type_cache_flush (void)
 Flush mime icons mapping cache.

Detailed Description

Efreet Mime is a library designed to help apps work with the Freedesktop.org Shared Mime Info standard.

Efreet_Mime.h provides all of the necessary headers and includes to work with Efreet_Mime.

Function Documentation

int efreet_mime_init ( void  )

Initializes the efreet mime settings.

Returns
Returns 1 on success or 0 on failure

References efreet_mime_type_cache_clear().

int efreet_mime_shutdown ( void  )

Cleans up the efreet mime settings system.

Returns
Returns no value

References IF_FREE_HASH, IF_FREE_LIST, and IF_RELEASE.

const char* efreet_mime_type_get ( const char *  file)

Retreive the mime type of a file.

Parameters
fileThe file to find the mime type
Returns
Returns mime type as a string

References efreet_mime_globs_type_get().

const char* efreet_mime_magic_type_get ( const char *  file)

Retreive the mime type of a file using magic.

Parameters
fileThe file to check the mime type
Returns
Returns mime type as a string
const char* efreet_mime_globs_type_get ( const char *  file)

Retreive the mime type of a file using globs.

Parameters
fileThe file to check the mime type
Returns
Returns mime type as a string

Referenced by efreet_mime_type_get().

const char* efreet_mime_special_type_get ( const char *  file)

Retreive the special mime type of a file.

Parameters
fileThe file to check the mime type
Returns
Returns mime type as a string
const char* efreet_mime_fallback_type_get ( const char *  file)

Retreive the fallback mime type of a file.

Parameters
fileThe file to check the mime type
Returns
Returns mime type as a string
const char* efreet_mime_type_icon_get ( const char *  mime,
const char *  theme,
unsigned int  size 
)

Retreive the mime type icon for a file.

Parameters
mimeThe name of the mime type
themeThe name of the theme to search icons in
sizeThe wanted size of the icon
Returns
Returns mime type icon path as a string

References efreet_desktop_environment_get(), efreet_icon_list_find(), and FREE.

void efreet_mime_type_cache_flush ( void  )

Flush mime icons mapping cache.

Flush timeout is defined at compile time by EFREET_MIME_ICONS_FLUSH_TIMEOUT