summaryrefslogtreecommitdiff
path: root/src/modules/ecordova/linux/ecordova_linux.c
blob: ae37dee8626541b8560748ce86ca355f3c4d7a28 (plain)
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
46
47
48
49
50
51
52
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include <Ecore.h>

int _ecordova_log_dom;

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

static Eina_Bool
_ecordova_linux_init(void)
{
   fprintf(stderr, "%s:%s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
    
   _ecordova_log_dom = eina_log_domain_register("ecordova_linux", EINA_COLOR_CYAN);
   if (_ecordova_log_dom < 0)
     {
        EINA_LOG_ERR("Unable to create an 'ecordova' log domain");
        //goto on_error_1;
     }

   if (!ecore_file_init())
     {
        ERR("Unable to initialize ecore_file");
        //goto on_error_3;
     }

   if (!eio_init())
     {
        ERR("Unable to initialize eio");
        //goto on_error_4;
     }
   
   
   return EINA_TRUE;
}

static void
_ecordova_linux_shutdown(void)
{
   fprintf(stderr, "%s:%s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
   eio_shutdown();
   ecore_file_shutdown();
}

EINA_MODULE_INIT(_ecordova_linux_init);
EINA_MODULE_SHUTDOWN(_ecordova_linux_shutdown);