- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Macros | Functions
Efreet_Mime: The XDG Shared Mime Info standard
Efreet

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

## Functions
EAPI int | efreet_mime_init (void)
| Initializes the efreet mime settings. More...
EAPI int | efreet_mime_shutdown (void)
| Shuts down Efreet mime settings system if a balanced number of init/shutdown calls have been made. More...
EAPI const char * | efreet_mime_type_get (const char *file)
| Retrieve the mime type of a file. More...
EAPI const char * | efreet_mime_magic_type_get (const char *file)
| Retrieve the mime type of a file using magic. More...
EAPI const char * | efreet_mime_globs_type_get (const char *file)
| Retrieve the mime type of a file using globs. More...
EAPI const char * | efreet_mime_special_type_get (const char *file)
| Retrieve the special mime type of a file. More...
EAPI const char * | efreet_mime_fallback_type_get (const char *file)
| Retrieve the fallback mime type of a file. More...
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. More...
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. 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

EAPI int efreet_mime_init | ( | void |  | ) |

Initializes the efreet mime settings.

Returns
  `1` on success or `0` on failure.

References ecore_file_init(), ecore_file_monitor_del(), ecore_file_shutdown(), ecore_init(), ecore_shutdown(), efreet_init(), efreet_mime_type_cache_clear(), efreet_shutdown(), EINA_FREE_CB, eina_hash_string_superfast_new(), eina_log_domain_register(), eina_log_domain_unregister(), and EINA_LOG_ERR.

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 ecore_file_shutdown(), ecore_shutdown(), efreet_shutdown(), eina_log_domain_unregister(), and EINA_LOG_ERR.

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.

References efreet_mime_globs_type_get().

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.

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 eina_hash_find(), and EINA_LIST_FOREACH.

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.

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.

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.

References efreet_desktop_environment_get(), efreet_icon_list_find(), eina_list_append(), eina_list_data_get(), eina_list_remove_list(), eina_stringshare_add(), and eina_stringshare_del().

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().