Efreet_Mime(3)

NAME
Efreet_Mime - 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.

SYNOPSIS

  Functions
EAPI int efreet_mime_init (void)
Initializes the efreet mime settings.
EAPI int efreet_mime_shutdown (void)
Shuts down Efreet mime settings system if a balanced number of init/shutdown calls have been made.
EAPI const char * efreet_mime_type_get (const char *file)
Retrieve the mime type of a file.
EAPI const char * efreet_mime_magic_type_get (const char *file)
Retrieve the mime type of a file using magic.
EAPI const char * efreet_mime_globs_type_get (const char *file)
Retrieve the mime type of a file using globs.
EAPI const char * efreet_mime_special_type_get (const char *file)
Retrieve the special mime type of a file.
EAPI const char * efreet_mime_fallback_type_get (const char *file)
Retrieve the fallback mime type of a file.
EAPI const char * efreet_mime_type_icon_get (const char *mime, const char *theme, unsigned int size)
Retrieve the mime type icon for a file.
EAPI void efreet_mime_type_cache_clear (void)
Clear mime icons mapping cache.
EAPI 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

  EAPI int efreet_mime_init (void)

Initializes the efreet mime settings.

Returns
    1 on success or 0 on failure.

References efreet_init().

Referenced by eio_init(), and elm_need_efreet().

  EAPI int efreet_mime_shutdown (void)

Shuts down Efreet mime settings system if a balanced number of init/shutdown calls have been made.

Returns
    The number of times the init function has been called minus the corresponding init call.

References efreet_shutdown().

Referenced by elm_need_efreet().

  EAPI const char* efreet_mime_type_get (const char * file)

Retrieve the mime type of a file.

Parameters
    file The file to find the mime type

Returns
    Mime type as a string or NULL if the file doesn't exist.

Note
    The return value of this function is not guaranteed to be stringshared.

References efreet_mime_globs_type_get(), and EINA_SAFETY_ON_NULL_RETURN_VAL.

  EAPI const char* efreet_mime_magic_type_get (const char * file)

Retrieve the mime type of a file using magic.

Parameters
    file The file to check the mime type

Returns
    Mime type as a string.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

  EAPI const char* efreet_mime_globs_type_get (const char * file)

Retrieve the mime type of a file using globs.

Parameters
    file The file to check the mime type

Returns
    Mime type as a string.

References alloca(), and EINA_SAFETY_ON_NULL_RETURN_VAL.

Referenced by efreet_mime_type_get().

  EAPI const char* efreet_mime_special_type_get (const char * file)

Retrieve the special mime type of a file.

Parameters
    file The file to check the mime type

Returns
    Mime type as a string.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

  EAPI const char* efreet_mime_fallback_type_get (const char * file)

Retrieve the fallback mime type of a file.

Parameters
    file The file to check the mime type

Returns
    Mime type as a string.

References EINA_SAFETY_ON_NULL_RETURN_VAL.

  EAPI 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
    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
    Mime type icon path as a string.

  EAPI 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

References ecore_loop_time_get().

Author

Generated automatically by Doxygen for EFL from the source code.