summaryrefslogtreecommitdiff
path: root/src/modules/ecordova/tizen/ecordova_tizen.c
blob: f49658011956f14332cb51fa3acc6334787c7ce6 (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
#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__)

void ecordova_contacts_service_init();
void ecordova_contacts_service_shutdown();

static Eina_Bool
_ecordova_tizen_init(void)
{
   _ecordova_log_dom = eina_log_domain_register("ecordova_tizen", EINA_COLOR_CYAN);
   if (_ecordova_log_dom < 0)
     {
        EINA_LOG_ERR("Unable to create an 'ecordova' log domain");
        return EINA_FALSE;
     }

   ecordova_contacts_service_init();
  
   return EINA_TRUE;
}

static void
_ecordova_tizen_shutdown(void)
{
  ecordova_contacts_service_shutdown();
  
  eina_log_domain_unregister(_ecordova_log_dom);
   _ecordova_log_dom = -1;
}

EINA_MODULE_INIT(_ecordova_tizen_init);
EINA_MODULE_SHUTDOWN(_ecordova_tizen_shutdown);