Efreet_Mime: The XDG Shared Mime Info standard

Defines

#define EAPI

Functions

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

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.


Define Documentation

#define EAPI

Function Documentation

EAPI const char* efreet_mime_fallback_type_get ( const char *  file  ) 

Retreive the fallback mime type of a file.

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

Retreive the mime type of a file using globs.

Parameters:
file The file to check the mime type
Returns:
Returns mime type as a string

References alloca(), Efreet_Mime_Glob::glob, and Efreet_Mime_Glob::mime.

Referenced by efreet_mime_type_get().

EAPI int efreet_mime_init ( void   ) 

Initializes the efreet mime settings.

Returns:
Returns 1 on success or 0 on failure

References efreet_init(), efreet_mime_type_cache_clear(), efreet_shutdown(), and ERROR.

EAPI const char* efreet_mime_magic_type_get ( const char *  file  ) 

Retreive the mime type of a file using magic.

Parameters:
file The file to check the mime type
Returns:
Returns mime type as a string
EAPI int efreet_mime_shutdown ( void   ) 

Cleans up the efreet mime settings system.

Returns:
Returns no value

References efreet_shutdown(), IF_FREE_HASH, IF_FREE_LIST, and IF_RELEASE.

EAPI const char* efreet_mime_special_type_get ( const char *  file  ) 

Retreive the special mime type of a file.

Parameters:
file The file to check the mime type
Returns:
Returns mime type as a string
EAPI void efreet_mime_type_cache_clear ( void   ) 

Referenced by efreet_mime_init().

EAPI void efreet_mime_type_cache_flush ( void   ) 
EAPI const char* efreet_mime_type_get ( const char *  file  ) 

Retreive the mime type of a file.

Parameters:
file The file to find the mime type
Returns:
Returns mime type as a string

References efreet_mime_globs_type_get().

EAPI 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:
mime The name of the mime type
theme The name of the theme to search icons in
size The 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.