summaryrefslogtreecommitdiff
path: root/src/modules/ecordova
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
parent308b29c3203d711474f1e7cd6b61ae96827d3e5e (diff)
ecordova: Reorganization
Diffstat (limited to 'src/modules/ecordova')
-rw-r--r--src/modules/ecordova/linux/ecordova_linux.c27
-rw-r--r--src/modules/ecordova/tizen/ecordova_contact.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_contactaddress.c4
-rw-r--r--src/modules/ecordova/tizen/ecordova_contactfield.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_contactname.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_contactorganization.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_contacts.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_contacts_record_utils.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_device.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_devicemotion.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_deviceorientation.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_geolocation.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_globalization.c2
-rw-r--r--src/modules/ecordova/tizen/ecordova_tizen.c4
14 files changed, 49 insertions, 8 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);
diff --git a/src/modules/ecordova/tizen/ecordova_contact.c b/src/modules/ecordova/tizen/ecordova_contact.c
index 9b986c09e5..fbb88b4e77 100644
--- a/src/modules/ecordova/tizen/ecordova_contact.c
+++ b/src/modules/ecordova/tizen/ecordova_contact.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_CONTACTS_SERVICE
5#include "ecordova_contact_private.h" 6#include "ecordova_contact_private.h"
6 7
7#include "ecordova_contactname_private.h" 8#include "ecordova_contactname_private.h"
@@ -1115,3 +1116,4 @@ _ecordova_contactorganizations_export(Eina_Array *organizations,
1115} 1116}
1116 1117
1117#include "ecordova_contact.eo.c" 1118#include "ecordova_contact.eo.c"
1119#endif
diff --git a/src/modules/ecordova/tizen/ecordova_contactaddress.c b/src/modules/ecordova/tizen/ecordova_contactaddress.c
index 23918f2432..2aa209f24f 100644
--- a/src/modules/ecordova/tizen/ecordova_contactaddress.c
+++ b/src/modules/ecordova/tizen/ecordova_contactaddress.c
@@ -2,6 +2,8 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_CONTACTS_SERVICE
6
5#include "ecordova_contactaddress_private.h" 7#include "ecordova_contactaddress_private.h"
6#include "ecordova_contacts_record_utils.h" 8#include "ecordova_contacts_record_utils.h"
7 9
@@ -310,3 +312,5 @@ ecordova_contactaddress_clone(Ecordova_ContactAddress *other)
310} 312}
311 313
312#include "ecordova_contactaddress.eo.c" 314#include "ecordova_contactaddress.eo.c"
315
316#endif
diff --git a/src/modules/ecordova/tizen/ecordova_contactfield.c b/src/modules/ecordova/tizen/ecordova_contactfield.c
index 8397a1944d..f69978cc13 100644
--- a/src/modules/ecordova/tizen/ecordova_contactfield.c
+++ b/src/modules/ecordova/tizen/ecordova_contactfield.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_CONTACTS_SERVICE
5#include "ecordova_contactfield_private.h" 6#include "ecordova_contactfield_private.h"
6#include "ecordova_contacts_record_utils.h" 7#include "ecordova_contacts_record_utils.h"
7 8
@@ -413,3 +414,4 @@ ecordova_contacturl_label2type(const char *label)
413} 414}
414 415
415#include "ecordova_contactfield.eo.c" 416#include "ecordova_contactfield.eo.c"
417#endif
diff --git a/src/modules/ecordova/tizen/ecordova_contactname.c b/src/modules/ecordova/tizen/ecordova_contactname.c
index 87cdcbfaaf..655cee87a0 100644
--- a/src/modules/ecordova/tizen/ecordova_contactname.c
+++ b/src/modules/ecordova/tizen/ecordova_contactname.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_CONTACTS_SERVICE
5#include "ecordova_contactname_private.h" 6#include "ecordova_contactname_private.h"
6#include "ecordova_contact_private.h" 7#include "ecordova_contact_private.h"
7#include "ecordova_contacts_record_utils.h" 8#include "ecordova_contacts_record_utils.h"
@@ -255,3 +256,4 @@ ecordova_contactname_clone(Ecordova_ContactName *other)
255 256
256 257
257#include "ecordova_contactname.eo.c" 258#include "ecordova_contactname.eo.c"
259#endif
diff --git a/src/modules/ecordova/tizen/ecordova_contactorganization.c b/src/modules/ecordova/tizen/ecordova_contactorganization.c
index 50cbde09cf..b6df0db035 100644
--- a/src/modules/ecordova/tizen/ecordova_contactorganization.c
+++ b/src/modules/ecordova/tizen/ecordova_contactorganization.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_CONTACTS_SERVICE
5#include "ecordova_contactorganization_private.h" 6#include "ecordova_contactorganization_private.h"
6#include "ecordova_contacts_record_utils.h" 7#include "ecordova_contacts_record_utils.h"
7 8
@@ -230,3 +231,4 @@ ecordova_contactorganization_clone(Ecordova_ContactOrganization *other)
230} 231}
231 232
232#include "ecordova_contactorganization.eo.c" 233#include "ecordova_contactorganization.eo.c"
234#endif
diff --git a/src/modules/ecordova/tizen/ecordova_contacts.c b/src/modules/ecordova/tizen/ecordova_contacts.c
index c914ec08fb..845907b880 100644
--- a/src/modules/ecordova/tizen/ecordova_contacts.c
+++ b/src/modules/ecordova/tizen/ecordova_contacts.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_CONTACTS_SERVICE
5#include "ecordova_contacts_private.h" 6#include "ecordova_contacts_private.h"
6#include "ecordova_contact_private.h" 7#include "ecordova_contact_private.h"
7#include "ecordova_contacts_record_utils.h" 8#include "ecordova_contacts_record_utils.h"
@@ -517,3 +518,4 @@ on_error:
517} 518}
518 519
519#include "ecordova_contacts.eo.c" 520#include "ecordova_contacts.eo.c"
521#endif
diff --git a/src/modules/ecordova/tizen/ecordova_contacts_record_utils.c b/src/modules/ecordova/tizen/ecordova_contacts_record_utils.c
index 09cab89d4f..b813779840 100644
--- a/src/modules/ecordova/tizen/ecordova_contacts_record_utils.c
+++ b/src/modules/ecordova/tizen/ecordova_contacts_record_utils.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_CONTACTS_SERVICE
5#include "ecordova_contacts_record_utils.h" 6#include "ecordova_contacts_record_utils.h"
6 7
7#include <Eina.h> 8#include <Eina.h>
@@ -119,3 +120,4 @@ clear_all_contact_record(contacts_record_h contacts_record,
119 120
120 return true; 121 return true;
121} 122}
123#endif
diff --git a/src/modules/ecordova/tizen/ecordova_device.c b/src/modules/ecordova/tizen/ecordova_device.c
index 0971292111..0b2d166381 100644
--- a/src/modules/ecordova/tizen/ecordova_device.c
+++ b/src/modules/ecordova/tizen/ecordova_device.c
@@ -4,6 +4,7 @@
4 4
5#include "ecordova_device_private.h" 5#include "ecordova_device_private.h"
6 6
7#ifdef HAVE_TIZEN_INFO
7#include <system/system_info.h> 8#include <system/system_info.h>
8 9
9#define MY_CLASS ECORDOVA_DEVICE_CLASS 10#define MY_CLASS ECORDOVA_DEVICE_CLASS
@@ -105,3 +106,4 @@ _ecordova_device_version_get(Eo *obj EINA_UNUSED, Ecordova_Device_Data *pd)
105} 106}
106 107
107#include "ecordova_device.eo.c" 108#include "ecordova_device.eo.c"
109#endif
diff --git a/src/modules/ecordova/tizen/ecordova_devicemotion.c b/src/modules/ecordova/tizen/ecordova_devicemotion.c
index 3b6543cb42..381611994a 100644
--- a/src/modules/ecordova/tizen/ecordova_devicemotion.c
+++ b/src/modules/ecordova/tizen/ecordova_devicemotion.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_SENSOR
5#include "ecordova_devicemotion_private.h" 6#include "ecordova_devicemotion_private.h"
6 7
7#define MY_CLASS ECORDOVA_DEVICEMOTION_CLASS 8#define MY_CLASS ECORDOVA_DEVICEMOTION_CLASS
@@ -174,3 +175,4 @@ _hash_data_free(sensor_listener_h listener)
174} 175}
175 176
176#include "ecordova_devicemotion.eo.c" 177#include "ecordova_devicemotion.eo.c"
178#endif
diff --git a/src/modules/ecordova/tizen/ecordova_deviceorientation.c b/src/modules/ecordova/tizen/ecordova_deviceorientation.c
index 87a3d65dbe..a98ae23cfb 100644
--- a/src/modules/ecordova/tizen/ecordova_deviceorientation.c
+++ b/src/modules/ecordova/tizen/ecordova_deviceorientation.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_SENSOR
5#include "ecordova_deviceorientation_private.h" 6#include "ecordova_deviceorientation_private.h"
6 7
7#define MY_CLASS ECORDOVA_DEVICEORIENTATION_CLASS 8#define MY_CLASS ECORDOVA_DEVICEORIENTATION_CLASS
@@ -178,3 +179,4 @@ _hash_data_free(sensor_listener_h listener)
178} 179}
179 180
180#include "ecordova_deviceorientation.eo.c" 181#include "ecordova_deviceorientation.eo.c"
182#endif
diff --git a/src/modules/ecordova/tizen/ecordova_geolocation.c b/src/modules/ecordova/tizen/ecordova_geolocation.c
index dff3e7b476..e6303d1003 100644
--- a/src/modules/ecordova/tizen/ecordova_geolocation.c
+++ b/src/modules/ecordova/tizen/ecordova_geolocation.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef TIZEN_LOCATION_MANAGER
5#include "ecordova_geolocation_private.h" 6#include "ecordova_geolocation_private.h"
6#include <ecore_timer.eo.h> 7#include <ecore_timer.eo.h>
7 8
@@ -280,3 +281,4 @@ on_error_1:
280} 281}
281 282
282#include "ecordova_geolocation.eo.c" 283#include "ecordova_geolocation.eo.c"
284#endif
diff --git a/src/modules/ecordova/tizen/ecordova_globalization.c b/src/modules/ecordova/tizen/ecordova_globalization.c
index 9320c87cdb..8501794dc7 100644
--- a/src/modules/ecordova/tizen/ecordova_globalization.c
+++ b/src/modules/ecordova/tizen/ecordova_globalization.c
@@ -2,6 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_TIZEN_BASE_UTILS_I18N
5#include "ecordova_globalization_private.h" 6#include "ecordova_globalization_private.h"
6 7
7#include <utils_i18n.h> 8#include <utils_i18n.h>
@@ -1120,3 +1121,4 @@ _date_time_options_to_style(const Ecordova_Globalization_DateTimeOptions *option
1120} 1121}
1121 1122
1122#include "ecordova_globalization.eo.c" 1123#include "ecordova_globalization.eo.c"
1124#endif
diff --git a/src/modules/ecordova/tizen/ecordova_tizen.c b/src/modules/ecordova/tizen/ecordova_tizen.c
index 4607e4841c..89ce9d3aa7 100644
--- a/src/modules/ecordova/tizen/ecordova_tizen.c
+++ b/src/modules/ecordova/tizen/ecordova_tizen.c
@@ -19,7 +19,7 @@ _ecordova_tizen_init(void)
19 if (_ecordova_log_dom < 0) 19 if (_ecordova_log_dom < 0)
20 { 20 {
21 EINA_LOG_ERR("Unable to create an 'ecordova' log domain"); 21 EINA_LOG_ERR("Unable to create an 'ecordova' log domain");
22 //goto on_error_1; 22 return EINA_FALSE;
23 } 23 }
24 24
25 return EINA_TRUE; 25 return EINA_TRUE;
@@ -28,6 +28,8 @@ _ecordova_tizen_init(void)
28static void 28static void
29_ecordova_tizen_shutdown(void) 29_ecordova_tizen_shutdown(void)
30{ 30{
31 eina_log_domain_unregister(_ecordova_log_dom);
32 _ecordova_log_dom = -1;
31} 33}
32 34
33EINA_MODULE_INIT(_ecordova_system_tizen_init); 35EINA_MODULE_INIT(_ecordova_system_tizen_init);