8578f5b16938c7ec7adb7203ffcc8017a5fd5bc9
[framework/uifw/efreet.git] / src / lib / Efreet_Mime.h
1 /* vim: set sw=4 ts=4 sts=4 et: */
2 #ifndef EFREET_MIME_H
3 #define EFREET_MIME_H
4
5 /**
6  * @file Efreet_Mime.h
7  * @brief The file that must be included by any project wishing to use
8  * @addtogroup Efreet_Mime Efreet_Mime: The XDG Shared Mime Info standard
9  * Efreet Mime is a library designed to help apps work with the
10  * Freedesktop.org Shared Mime Info standard.
11  * Efreet_Mime.h provides all of the necessary headers and
12  * includes to work with Efreet_Mime.
13  * @{
14  */
15
16
17 #ifdef EAPI
18 #undef EAPI
19 #endif
20 #ifdef _MSC_VER
21 # ifdef BUILDING_DLL
22 #  define EAPI __declspec(dllexport)
23 # else
24 #  define EAPI __declspec(dllimport)
25 # endif
26 #else
27 # ifdef __GNUC__
28 #  if __GNUC__ >= 4
29 #   define EAPI __attribute__ ((visibility("default")))
30 #  else
31 #   define EAPI
32 #  endif
33 # else
34 #  define EAPI
35 # endif
36 #endif
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42
43 EAPI int         efreet_mime_init(void);
44 EAPI void        efreet_mime_shutdown(void);
45
46 EAPI const char *efreet_mime_type_get(const char *file);
47 EAPI const char *efreet_mime_magic_type_get(const char *file);
48 EAPI const char *efreet_mime_globs_type_get(const char *file);
49 EAPI const char *efreet_mime_special_type_get(const char *file);
50 EAPI const char *efreet_mime_fallback_type_get(const char *file);
51
52 EAPI char *efreet_mime_type_icon_get(const char *mime, const char *theme,
53                                                           unsigned int size);
54
55 EAPI void efreet_mime_type_cache_clear(void);
56 EAPI void efreet_mime_type_cache_flush(void);
57
58 /**
59  * @}
60  */
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif