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. More...
 
int efreet_mime_shutdown (void)
 Cleans up the efreet mime settings system. More...
 
const char * efreet_mime_type_get (const char *file)
 Retrieve the mime type of a file. More...
 
const char * efreet_mime_magic_type_get (const char *file)
 Retrieve the mime type of a file using magic. More...
 
const char * efreet_mime_globs_type_get (const char *file)
 Retrieve the mime type of a file using globs. More...
 
const char * efreet_mime_special_type_get (const char *file)
 Retrieve the special mime type of a file. More...
 
const char * efreet_mime_fallback_type_get (const char *file)
 Retrieve the fallback mime type of a file. More...
 
const char * efreet_mime_type_icon_get (const char *mime, const char *theme, unsigned int size)
 Retrieve the mime type icon for a file. More...
 
void efreet_mime_type_cache_clear (void)
 Clear mime icons mapping cache.
 
void efreet_mime_type_cache_flush (void)
 Flush mime icons mapping cache. More...
 

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
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
No value.

References IF_FREE_HASH, IF_FREE_LIST, and IF_RELEASE.

const char* efreet_mime_type_get ( const char *  file)

Retrieve the mime type of a file.

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

References efreet_mime_globs_type_get().

const char* efreet_mime_magic_type_get ( const char *  file)

Retrieve the mime type of a file using magic.

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

Retrieve the mime type of a file using globs.

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

Referenced by efreet_mime_type_get().

const char* efreet_mime_special_type_get ( const char *  file)

Retrieve the special mime type of a file.

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

Retrieve the fallback mime type of a file.

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

Retrieve 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
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