summaryrefslogtreecommitdiff
path: root/src/lib/conf/conf_private.h
blob: 8f405f60654e4303b9395be5a93b1f5d3dde7ec3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <Conf.h>

/**
 * @cond IGNORE
 */
extern int _conf_log_dom_global;

#define ERR(...) EINA_LOG_DOM_ERR(_conf_log_dom_global, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_conf_log_dom_global, __VA_ARGS__)
#define NFO(...) EINA_LOG_DOM_INFO(_conf_log_dom_global, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_conf_log_dom_global, __VA_ARGS__)
#define CRI(...) EINA_LOG_DOM_CRIT(_conf_log_dom_global, __VA_ARGS__)

struct _Conf
{
   const char *file;
   Eina_File *ef;

   Eina_Hash *variables;
};


typedef struct _Conf_Load
{
   Conf *conf;

   struct
   {
      Conf_Done_Cb done;
      Conf_Error_Cb error;
      const void *data;
   } cb;
} Conf_Load;

void conf_free(Conf *conf);

Eina_Bool conf_load_map_filter(void *data, Eio_File *handler, void *map, size_t length);
void conf_load_map_main(void *data, Eio_File *handler, void *map, size_t length);
void conf_load_map_error(void *data, Eio_File *handler, int error);

void conf_load_line_free(void *data);

/**
 * @endcond
 */