summaryrefslogtreecommitdiff
path: root/src/modules/ecordova/linux
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-03 18:56:11 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-03 18:56:11 -0200
commitff27c7b1cefbe43c90299871464ca1fd3ae157c2 (patch)
treefa2686b6ec300d646337927af334d972f43b05a3 /src/modules/ecordova/linux
parent308b29c3203d711474f1e7cd6b61ae96827d3e5e (diff)
ecordova: Reorganization
Diffstat (limited to 'src/modules/ecordova/linux')
-rw-r--r--src/modules/ecordova/linux/ecordova_linux.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/modules/ecordova/linux/ecordova_linux.c b/src/modules/ecordova/linux/ecordova_linux.c
index ae37dee862..f36686c9dd 100644
--- a/src/modules/ecordova/linux/ecordova_linux.c
+++ b/src/modules/ecordova/linux/ecordova_linux.c
@@ -15,37 +15,50 @@ int _ecordova_log_dom;
15static Eina_Bool 15static Eina_Bool
16_ecordova_linux_init(void) 16_ecordova_linux_init(void)
17{ 17{
18 fprintf(stderr, "%s:%s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); 18 if (!eina_init())
19 19 {
20 fputs("Ecordova: Unable to initialize eina\n", stderr);
21 goto on_error_1;
22 }
23
20 _ecordova_log_dom = eina_log_domain_register("ecordova_linux", EINA_COLOR_CYAN); 24 _ecordova_log_dom = eina_log_domain_register("ecordova_linux", EINA_COLOR_CYAN);
21 if (_ecordova_log_dom < 0) 25 if (_ecordova_log_dom < 0)
22 { 26 {
23 EINA_LOG_ERR("Unable to create an 'ecordova' log domain"); 27 EINA_LOG_ERR("Unable to create an 'ecordova' log domain");
24 //goto on_error_1; 28 goto on_error_2;
25 } 29 }
26 30
27 if (!ecore_file_init()) 31 if (!ecore_file_init())
28 { 32 {
29 ERR("Unable to initialize ecore_file"); 33 ERR("Unable to initialize ecore_file");
30 //goto on_error_3; 34 goto on_error_3;
31 } 35 }
32 36
33 if (!eio_init()) 37 if (!eio_init())
34 { 38 {
35 ERR("Unable to initialize eio"); 39 ERR("Unable to initialize eio");
36 //goto on_error_4; 40 goto on_error_4;
37 } 41 }
38 42
39
40 return EINA_TRUE; 43 return EINA_TRUE;
44
45on_error_4:
46 ecore_file_shutdown();
47on_error_3:
48 eina_log_domain_unregister(_ecordova_log_dom);
49on_error_2:
50 eina_shutdown();
51on_error_1:
52 return EINA_FALSE;
41} 53}
42 54
43static void 55static void
44_ecordova_linux_shutdown(void) 56_ecordova_linux_shutdown(void)
45{ 57{
46 fprintf(stderr, "%s:%s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
47 eio_shutdown(); 58 eio_shutdown();
48 ecore_file_shutdown(); 59 ecore_file_shutdown();
60 eina_log_domain_unregister(_ecordova_log_dom);
61 eina_shutdown();
49} 62}
50 63
51EINA_MODULE_INIT(_ecordova_linux_init); 64EINA_MODULE_INIT(_ecordova_linux_init);