summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/bin/elocation-test.c4
-rw-r--r--src/lib/Elocation.h2
-rw-r--r--src/lib/elocation.c350
-rw-r--r--src/lib/elocation_private.h2
-rw-r--r--src/tests/elocation_suite.c28
6 files changed, 195 insertions, 195 deletions
diff --git a/configure.ac b/configure.ac
index ecdb685..ebb97d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ AC_CANONICAL_HOST
70AC_PROG_CC 70AC_PROG_CC
71 71
72AC_SUBST([requirements_elocation]) 72AC_SUBST([requirements_elocation])
73requirements_elocation="edbus2 ecore" 73requirements_elocation="eldbus ecore"
74 74
75# pkg-config 75# pkg-config
76PKG_PROG_PKG_CONFIG 76PKG_PROG_PKG_CONFIG
@@ -91,7 +91,7 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
91 91
92AC_SUBST([EFL_ELOCATION_BUILD]) 92AC_SUBST([EFL_ELOCATION_BUILD])
93 93
94PKG_CHECK_MODULES([ELOCATION], [edbus2 ecore]) 94PKG_CHECK_MODULES([ELOCATION], [eldbus ecore])
95 95
96EFL_CHECK_PATH_MAX 96EFL_CHECK_PATH_MAX
97 97
diff --git a/src/bin/elocation-test.c b/src/bin/elocation-test.c
index db78a16..3006844 100644
--- a/src/bin/elocation-test.c
+++ b/src/bin/elocation-test.c
@@ -109,7 +109,7 @@ main(void)
109 109
110 /* Init the needed efl subsystems so we can safely use them */ 110 /* Init the needed efl subsystems so we can safely use them */
111 ecore_init(); 111 ecore_init();
112 edbus_init(); 112 eldbus_init();
113 elocation_init(); 113 elocation_init();
114 114
115 /* Create an address and positon object that we use for all our operations. 115 /* Create an address and positon object that we use for all our operations.
@@ -163,7 +163,7 @@ main(void)
163 163
164 /* Make sure we also shut down the initialized subsystems */ 164 /* Make sure we also shut down the initialized subsystems */
165 elocation_shutdown(); 165 elocation_shutdown();
166 edbus_shutdown(); 166 eldbus_shutdown();
167 ecore_shutdown(); 167 ecore_shutdown();
168 return 0; 168 return 0;
169} 169}
diff --git a/src/lib/Elocation.h b/src/lib/Elocation.h
index d7920a1..851b679 100644
--- a/src/lib/Elocation.h
+++ b/src/lib/Elocation.h
@@ -61,7 +61,7 @@
61#include <stdio.h> 61#include <stdio.h>
62 62
63#include <Ecore.h> 63#include <Ecore.h>
64#include <EDBus.h> 64#include <Eldbus.h>
65 65
66/** 66/**
67 * @file Elocation.h 67 * @file Elocation.h
diff --git a/src/lib/elocation.c b/src/lib/elocation.c
index 7c18e96..a14d19e 100644
--- a/src/lib/elocation.c
+++ b/src/lib/elocation.c
@@ -6,7 +6,7 @@
6 6
7#include <Eina.h> 7#include <Eina.h>
8#include <Ecore.h> 8#include <Ecore.h>
9#include <EDBus.h> 9#include <Eldbus.h>
10#include <Elocation.h> 10#include <Elocation.h>
11#include <elocation_private.h> 11#include <elocation_private.h>
12 12
@@ -14,21 +14,21 @@
14 * area. 14 * area.
15 */ 15 */
16static char *unique_name = NULL; 16static char *unique_name = NULL;
17static EDBus_Connection *conn = NULL; 17static Eldbus_Connection *conn = NULL;
18static Elocation_Provider *address_provider = NULL; 18static Elocation_Provider *address_provider = NULL;
19static Elocation_Provider *position_provider = NULL; 19static Elocation_Provider *position_provider = NULL;
20static EDBus_Object *obj_meta = NULL; 20static Eldbus_Object *obj_meta = NULL;
21static EDBus_Proxy *manager_master = NULL; 21static Eldbus_Proxy *manager_master = NULL;
22static EDBus_Proxy *meta_geoclue = NULL; 22static Eldbus_Proxy *meta_geoclue = NULL;
23static EDBus_Proxy *meta_address = NULL; 23static Eldbus_Proxy *meta_address = NULL;
24static EDBus_Proxy *meta_position = NULL; 24static Eldbus_Proxy *meta_position = NULL;
25static EDBus_Proxy *meta_masterclient = NULL; 25static Eldbus_Proxy *meta_masterclient = NULL;
26static EDBus_Proxy *meta_velocity = NULL; 26static Eldbus_Proxy *meta_velocity = NULL;
27static EDBus_Proxy *meta_nmea = NULL; 27static Eldbus_Proxy *meta_nmea = NULL;
28static EDBus_Proxy *meta_satellite = NULL; 28static Eldbus_Proxy *meta_satellite = NULL;
29static EDBus_Proxy *geonames_geocode = NULL; 29static Eldbus_Proxy *geonames_geocode = NULL;
30static EDBus_Proxy *geonames_rgeocode = NULL; 30static Eldbus_Proxy *geonames_rgeocode = NULL;
31static EDBus_Proxy *master_poi = NULL; 31static Eldbus_Proxy *master_poi = NULL;
32static Elocation_Address *address = NULL; 32static Elocation_Address *address = NULL;
33static Elocation_Position *position = NULL; 33static Elocation_Position *position = NULL;
34static Elocation_Address *addr_geocode = NULL; 34static Elocation_Address *addr_geocode = NULL;
@@ -65,11 +65,11 @@ _dummy_free(void *user_data, void *func_data)
65 * calbacks that receive such a message 65 * calbacks that receive such a message
66 */ 66 */
67static Eina_Bool 67static Eina_Bool
68unmarshall_provider(const EDBus_Message *reply, Elocation_Provider *provider) 68unmarshall_provider(const Eldbus_Message *reply, Elocation_Provider *provider)
69{ 69{
70 char *name = NULL, *desc = NULL, *service = NULL, *path = NULL; 70 char *name = NULL, *desc = NULL, *service = NULL, *path = NULL;
71 71
72 if (!edbus_message_arguments_get(reply, "ssss", &name, &desc, &service, &path)) 72 if (!eldbus_message_arguments_get(reply, "ssss", &name, &desc, &service, &path))
73 return EINA_FALSE; 73 return EINA_FALSE;
74 74
75 provider->name = strdup(name); 75 provider->name = strdup(name);
@@ -80,14 +80,14 @@ unmarshall_provider(const EDBus_Message *reply, Elocation_Provider *provider)
80} 80}
81 81
82static void 82static void
83meta_address_provider_info_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 83meta_address_provider_info_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
84{ 84{
85 const char *err, *errmsg; 85 const char *err, *errmsg;
86 Elocation_Provider *addr_provider; 86 Elocation_Provider *addr_provider;
87 87
88 addr_provider = data; 88 addr_provider = data;
89 89
90 if (edbus_message_error_get(reply, &err, &errmsg)) 90 if (eldbus_message_error_get(reply, &err, &errmsg))
91 { 91 {
92 ERR("Error: %s %s", err, errmsg); 92 ERR("Error: %s %s", err, errmsg);
93 return; 93 return;
@@ -106,14 +106,14 @@ meta_address_provider_info_cb(void *data, const EDBus_Message *reply, EDBus_Pend
106} 106}
107 107
108static void 108static void
109meta_position_provider_info_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 109meta_position_provider_info_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
110{ 110{
111 const char *err, *errmsg; 111 const char *err, *errmsg;
112 Elocation_Provider *pos_provider; 112 Elocation_Provider *pos_provider;
113 113
114 pos_provider = data; 114 pos_provider = data;
115 115
116 if (edbus_message_error_get(reply, &err, &errmsg)) 116 if (eldbus_message_error_get(reply, &err, &errmsg))
117 { 117 {
118 ERR("Error: %s %s", err, errmsg); 118 ERR("Error: %s %s", err, errmsg);
119 return; 119 return;
@@ -132,7 +132,7 @@ meta_position_provider_info_cb(void *data, const EDBus_Message *reply, EDBus_Pen
132} 132}
133 133
134static void 134static void
135meta_address_provider_info_signal_cb(void *data, const EDBus_Message *reply) 135meta_address_provider_info_signal_cb(void *data, const Eldbus_Message *reply)
136{ 136{
137 Elocation_Provider *addr_provider; 137 Elocation_Provider *addr_provider;
138 addr_provider = data; 138 addr_provider = data;
@@ -150,7 +150,7 @@ meta_address_provider_info_signal_cb(void *data, const EDBus_Message *reply)
150} 150}
151 151
152static void 152static void
153meta_position_provider_info_signal_cb(void *data, const EDBus_Message *reply) 153meta_position_provider_info_signal_cb(void *data, const Eldbus_Message *reply)
154{ 154{
155 Elocation_Provider *pos_provider; 155 Elocation_Provider *pos_provider;
156 pos_provider = data; 156 pos_provider = data;
@@ -171,26 +171,26 @@ meta_position_provider_info_signal_cb(void *data, const EDBus_Message *reply)
171 * dict. Similar to a reverse GeoCode message as both return an address object. 171 * dict. Similar to a reverse GeoCode message as both return an address object.
172 */ 172 */
173static Eina_Bool 173static Eina_Bool
174unmarshall_address(const EDBus_Message *reply, Elocation_Address *addr) 174unmarshall_address(const Eldbus_Message *reply, Elocation_Address *addr)
175{ 175{
176 int32_t level, timestamp; 176 int32_t level, timestamp;
177 EDBus_Message_Iter *sub, *dict, *entry; 177 Eldbus_Message_Iter *sub, *dict, *entry;
178 double horizontal; 178 double horizontal;
179 double vertical; 179 double vertical;
180 const char *key, *signature; 180 const char *key, *signature;
181 char *value; 181 char *value;
182 182
183 signature = edbus_message_signature_get(reply); 183 signature = eldbus_message_signature_get(reply);
184 184
185 if (!strcmp(signature, "ia{ss}(idd)")) 185 if (!strcmp(signature, "ia{ss}(idd)"))
186 { 186 {
187 if (!edbus_message_arguments_get(reply, "ia{ss}(idd)", &timestamp, &dict, &sub)) 187 if (!eldbus_message_arguments_get(reply, "ia{ss}(idd)", &timestamp, &dict, &sub))
188 return EINA_FALSE; 188 return EINA_FALSE;
189 addr->timestamp = timestamp; 189 addr->timestamp = timestamp;
190 } 190 }
191 else if (!strcmp(signature, "a{ss}(idd)")) 191 else if (!strcmp(signature, "a{ss}(idd)"))
192 { 192 {
193 if (!edbus_message_arguments_get(reply, "a{ss}(idd)", &dict, &sub)) 193 if (!eldbus_message_arguments_get(reply, "a{ss}(idd)", &dict, &sub))
194 return EINA_FALSE; 194 return EINA_FALSE;
195 addr->timestamp = 0; 195 addr->timestamp = 0;
196 } 196 }
@@ -206,9 +206,9 @@ unmarshall_address(const EDBus_Message *reply, Elocation_Address *addr)
206 addr->region = NULL; 206 addr->region = NULL;
207 addr->timezone = NULL; 207 addr->timezone = NULL;
208 208
209 while (edbus_message_iter_get_and_next(dict, 'e', &entry)) 209 while (eldbus_message_iter_get_and_next(dict, 'e', &entry))
210 { 210 {
211 edbus_message_iter_arguments_get(entry, "ss", &key, &value); 211 eldbus_message_iter_arguments_get(entry, "ss", &key, &value);
212 212
213 if (!strcmp(key, "country")) 213 if (!strcmp(key, "country"))
214 { 214 {
@@ -242,7 +242,7 @@ unmarshall_address(const EDBus_Message *reply, Elocation_Address *addr)
242 } 242 }
243 } 243 }
244 244
245 edbus_message_iter_arguments_get(sub, "idd", &level, &horizontal, &vertical); 245 eldbus_message_iter_arguments_get(sub, "idd", &level, &horizontal, &vertical);
246 addr->accur->level = level; 246 addr->accur->level = level;
247 addr->accur->horizontal = horizontal; 247 addr->accur->horizontal = horizontal;
248 addr->accur->vertical = vertical; 248 addr->accur->vertical = vertical;
@@ -253,11 +253,11 @@ unmarshall_address(const EDBus_Message *reply, Elocation_Address *addr)
253 * variable set of key value pairs so we need to handle this with care 253 * variable set of key value pairs so we need to handle this with care
254 */ 254 */
255static void 255static void
256rgeocode_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 256rgeocode_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
257{ 257{
258 const char *err, *errmsg; 258 const char *err, *errmsg;
259 259
260 if (edbus_message_error_get(reply, &err, &errmsg)) 260 if (eldbus_message_error_get(reply, &err, &errmsg))
261 { 261 {
262 ERR("Error: %s %s", err, errmsg); 262 ERR("Error: %s %s", err, errmsg);
263 return; 263 return;
@@ -277,29 +277,29 @@ rgeocode_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
277 * not in standard GeoClue but currently a Tizen extension. 277 * not in standard GeoClue but currently a Tizen extension.
278 */ 278 */
279static void 279static void
280poi_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 280poi_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
281{ 281{
282 int32_t count, id, rank; 282 int32_t count, id, rank;
283 double lat, lon, bound_left, bound_top, bound_right, bound_bottom; 283 double lat, lon, bound_left, bound_top, bound_right, bound_bottom;
284 const char *name, *icon, *house, *road, *village, *suburb, *postcode; 284 const char *name, *icon, *house, *road, *village, *suburb, *postcode;
285 const char *city, *county, *country, *country_code; 285 const char *city, *county, *country, *country_code;
286 EDBus_Message_Iter *array, *struct_landmark; 286 Eldbus_Message_Iter *array, *struct_landmark;
287 const char *err, *errmsg; 287 const char *err, *errmsg;
288 288
289 if (edbus_message_error_get(reply, &err, &errmsg)) 289 if (eldbus_message_error_get(reply, &err, &errmsg))
290 { 290 {
291 ERR("Error: %s %s", err, errmsg); 291 ERR("Error: %s %s", err, errmsg);
292 return; 292 return;
293 } 293 }
294 294
295 /* Yeah, its quite a horrible message. The POI interface could use a better design */ 295 /* Yeah, its quite a horrible message. The POI interface could use a better design */
296 if (!edbus_message_arguments_get(reply, "ia(iiddddddsssssssssss", &count ,&array)) 296 if (!eldbus_message_arguments_get(reply, "ia(iiddddddsssssssssss", &count ,&array))
297 return; 297 return;
298 298
299 /* TODO re-check that the parameter ordering is what we expect */ 299 /* TODO re-check that the parameter ordering is what we expect */
300 while (edbus_message_iter_get_and_next(array, 'r', &struct_landmark)) 300 while (eldbus_message_iter_get_and_next(array, 'r', &struct_landmark))
301 { 301 {
302 edbus_message_iter_arguments_get(struct_landmark, "iiddddddsssssssssss", &id, &rank, 302 eldbus_message_iter_arguments_get(struct_landmark, "iiddddddsssssssssss", &id, &rank,
303 &lat, &lon, &bound_left, &bound_top, &bound_right, 303 &lat, &lon, &bound_left, &bound_top, &bound_right,
304 &bound_bottom, &name, &icon, &house, &road, 304 &bound_bottom, &name, &icon, &house, &road,
305 &village, &suburb, &postcode, &city, &county, 305 &village, &suburb, &postcode, &city, &county,
@@ -316,7 +316,7 @@ poi_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
316 316
317/* Unmarshall a GeoCode message */ 317/* Unmarshall a GeoCode message */
318static void 318static void
319geocode_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 319geocode_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
320{ 320{
321 GeocluePositionFields fields; 321 GeocluePositionFields fields;
322 int32_t level; 322 int32_t level;
@@ -325,16 +325,16 @@ geocode_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
325 double latitude = 0.0; 325 double latitude = 0.0;
326 double longitude = 0.0; 326 double longitude = 0.0;
327 double altitude = 0.0; 327 double altitude = 0.0;
328 EDBus_Message_Iter *sub; 328 Eldbus_Message_Iter *sub;
329 const char *err, *errmsg; 329 const char *err, *errmsg;
330 330
331 if (edbus_message_error_get(reply, &err, &errmsg)) 331 if (eldbus_message_error_get(reply, &err, &errmsg))
332 { 332 {
333 ERR("Error: %s %s", err, errmsg); 333 ERR("Error: %s %s", err, errmsg);
334 return; 334 return;
335 } 335 }
336 336
337 if (!edbus_message_arguments_get(reply, "iddd(idd)", &fields,&latitude, 337 if (!eldbus_message_arguments_get(reply, "iddd(idd)", &fields,&latitude,
338 &longitude, &altitude, &sub)) 338 &longitude, &altitude, &sub))
339 return; 339 return;
340 340
@@ -355,7 +355,7 @@ geocode_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
355 else 355 else
356 pos_geocode->altitude = 0.0; 356 pos_geocode->altitude = 0.0;
357 357
358 edbus_message_iter_arguments_get(sub, "idd", &level, &horizontal, &vertical); 358 eldbus_message_iter_arguments_get(sub, "idd", &level, &horizontal, &vertical);
359 pos_geocode->accur->level = level; 359 pos_geocode->accur->level = level;
360 pos_geocode->accur->horizontal = horizontal; 360 pos_geocode->accur->horizontal = horizontal;
361 pos_geocode->accur->vertical = vertical; 361 pos_geocode->accur->vertical = vertical;
@@ -364,11 +364,11 @@ geocode_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
364} 364}
365 365
366static void 366static void
367address_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 367address_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
368{ 368{
369 const char *err, *errmsg; 369 const char *err, *errmsg;
370 370
371 if (edbus_message_error_get(reply, &err, &errmsg)) 371 if (eldbus_message_error_get(reply, &err, &errmsg))
372 { 372 {
373 ERR("Error: %s %s", err, errmsg); 373 ERR("Error: %s %s", err, errmsg);
374 return; 374 return;
@@ -385,11 +385,11 @@ address_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
385} 385}
386 386
387static void 387static void
388address_signal_cb(void *data, const EDBus_Message *reply) 388address_signal_cb(void *data, const Eldbus_Message *reply)
389{ 389{
390 const char *err, *errmsg; 390 const char *err, *errmsg;
391 391
392 if (edbus_message_error_get(reply, &err, &errmsg)) 392 if (eldbus_message_error_get(reply, &err, &errmsg))
393 { 393 {
394 ERR("Error: %s %s", err, errmsg); 394 ERR("Error: %s %s", err, errmsg);
395 return; 395 return;
@@ -409,7 +409,7 @@ address_signal_cb(void *data, const EDBus_Message *reply)
409 * provider from GeoClue. None of the other providers offer this currently. 409 * provider from GeoClue. None of the other providers offer this currently.
410 */ 410 */
411static Eina_Bool 411static Eina_Bool
412unmarshall_velocity(const EDBus_Message *reply) 412unmarshall_velocity(const Eldbus_Message *reply)
413{ 413{
414 GeoclueVelocityFields fields; 414 GeoclueVelocityFields fields;
415 int32_t timestamp = 0; 415 int32_t timestamp = 0;
@@ -417,7 +417,7 @@ unmarshall_velocity(const EDBus_Message *reply)
417 double direction = 0.0; 417 double direction = 0.0;
418 double climb = 0.0; 418 double climb = 0.0;
419 419
420 if (!edbus_message_arguments_get(reply, "iiddd", &fields, &timestamp, 420 if (!eldbus_message_arguments_get(reply, "iiddd", &fields, &timestamp,
421 &speed, &direction, &climb)) 421 &speed, &direction, &climb))
422 return EINA_FALSE; 422 return EINA_FALSE;
423 423
@@ -444,11 +444,11 @@ unmarshall_velocity(const EDBus_Message *reply)
444} 444}
445 445
446static void 446static void
447velocity_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 447velocity_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
448{ 448{
449 const char *err, *errmsg; 449 const char *err, *errmsg;
450 450
451 if (edbus_message_error_get(reply, &err, &errmsg)) 451 if (eldbus_message_error_get(reply, &err, &errmsg))
452 { 452 {
453 WARN("Warning: %s %s", err, errmsg); 453 WARN("Warning: %s %s", err, errmsg);
454 return; 454 return;
@@ -465,7 +465,7 @@ velocity_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
465} 465}
466 466
467static void 467static void
468velocity_signal_cb(void *data, const EDBus_Message *reply) 468velocity_signal_cb(void *data, const Eldbus_Message *reply)
469{ 469{
470 if (!unmarshall_velocity(reply)) 470 if (!unmarshall_velocity(reply))
471 { 471 {
@@ -484,22 +484,22 @@ velocity_signal_cb(void *data, const EDBus_Message *reply)
484 * This is currently a Tizen only interface and not in GeoClue upstream. 484 * This is currently a Tizen only interface and not in GeoClue upstream.
485 */ 485 */
486static Eina_Bool 486static Eina_Bool
487unmarshall_nmea(const EDBus_Message *reply) 487unmarshall_nmea(const Eldbus_Message *reply)
488{ 488{
489 int32_t timestamp = 0; 489 int32_t timestamp = 0;
490 490
491 if (!edbus_message_arguments_get(reply, "is", &timestamp, &nmea_sentence)) 491 if (!eldbus_message_arguments_get(reply, "is", &timestamp, &nmea_sentence))
492 return EINA_FALSE; 492 return EINA_FALSE;
493 493
494 return EINA_TRUE; 494 return EINA_TRUE;
495} 495}
496 496
497static void 497static void
498nmea_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 498nmea_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
499{ 499{
500 const char *err, *errmsg; 500 const char *err, *errmsg;
501 501
502 if (edbus_message_error_get(reply, &err, &errmsg)) 502 if (eldbus_message_error_get(reply, &err, &errmsg))
503 { 503 {
504 WARN("Warning: %s %s", err, errmsg); 504 WARN("Warning: %s %s", err, errmsg);
505 return; 505 return;
@@ -516,7 +516,7 @@ nmea_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
516} 516}
517 517
518static void 518static void
519nmea_signal_cb(void *data, const EDBus_Message *reply) 519nmea_signal_cb(void *data, const Eldbus_Message *reply)
520{ 520{
521 if (!unmarshall_nmea(reply)) 521 if (!unmarshall_nmea(reply))
522 { 522 {
@@ -535,25 +535,25 @@ nmea_signal_cb(void *data, const EDBus_Message *reply)
535 * This is currently a Tizen only interface and not available in GeoClue upstream. 535 * This is currently a Tizen only interface and not available in GeoClue upstream.
536 */ 536 */
537static Eina_Bool 537static Eina_Bool
538unmarshall_satellite(const EDBus_Message *reply) 538unmarshall_satellite(const Eldbus_Message *reply)
539{ 539{
540 int32_t timestamp = 0, satellite_used = 0, satellite_visible = 0; 540 int32_t timestamp = 0, satellite_used = 0, satellite_visible = 0;
541 int32_t snr = 0, elevation = 0, azimuth = 0, prn = 0, used_prn = 0; 541 int32_t snr = 0, elevation = 0, azimuth = 0, prn = 0, used_prn = 0;
542 EDBus_Message_Iter *sub_prn, *sub_info, *struct_info; 542 Eldbus_Message_Iter *sub_prn, *sub_info, *struct_info;
543 543
544 if (!edbus_message_arguments_get(reply, "iiiaia(iiii)", &timestamp, &satellite_used, 544 if (!eldbus_message_arguments_get(reply, "iiiaia(iiii)", &timestamp, &satellite_used,
545 &satellite_visible, &sub_prn, &sub_info)) 545 &satellite_visible, &sub_prn, &sub_info))
546 return EINA_FALSE; 546 return EINA_FALSE;
547 547
548 while (edbus_message_iter_get_and_next(sub_prn, 'i', &used_prn)) 548 while (eldbus_message_iter_get_and_next(sub_prn, 'i', &used_prn))
549 { 549 {
550 DBG("Satellite used PRN %i", used_prn); 550 DBG("Satellite used PRN %i", used_prn);
551 } 551 }
552 552
553 /* TODO re-check that the parameter ordering is what we expect */ 553 /* TODO re-check that the parameter ordering is what we expect */
554 while (edbus_message_iter_get_and_next(sub_info, 'r', &struct_info)) 554 while (eldbus_message_iter_get_and_next(sub_info, 'r', &struct_info))
555 { 555 {
556 edbus_message_iter_arguments_get(struct_info, "iiii", &prn, &elevation, &azimuth, &snr); 556 eldbus_message_iter_arguments_get(struct_info, "iiii", &prn, &elevation, &azimuth, &snr);
557 DBG("Satellite info %i, %i, %i, %i", prn, elevation, azimuth, snr); 557 DBG("Satellite info %i, %i, %i, %i", prn, elevation, azimuth, snr);
558 } 558 }
559 559
@@ -561,11 +561,11 @@ unmarshall_satellite(const EDBus_Message *reply)
561} 561}
562 562
563static void 563static void
564satellite_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 564satellite_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
565{ 565{
566 const char *err, *errmsg; 566 const char *err, *errmsg;
567 567
568 if (edbus_message_error_get(reply, &err, &errmsg)) 568 if (eldbus_message_error_get(reply, &err, &errmsg))
569 { 569 {
570 WARN("Warning: %s %s", err, errmsg); 570 WARN("Warning: %s %s", err, errmsg);
571 return; 571 return;
@@ -582,11 +582,11 @@ satellite_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
582} 582}
583 583
584static void 584static void
585last_satellite_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 585last_satellite_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
586{ 586{
587 const char *err, *errmsg; 587 const char *err, *errmsg;
588 588
589 if (edbus_message_error_get(reply, &err, &errmsg)) 589 if (eldbus_message_error_get(reply, &err, &errmsg))
590 { 590 {
591 WARN("Warning: %s %s", err, errmsg); 591 WARN("Warning: %s %s", err, errmsg);
592 return; 592 return;
@@ -603,7 +603,7 @@ last_satellite_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending
603} 603}
604 604
605static void 605static void
606satellite_signal_cb(void *data, const EDBus_Message *reply) 606satellite_signal_cb(void *data, const Eldbus_Message *reply)
607{ 607{
608 if (!unmarshall_satellite(reply)) 608 if (!unmarshall_satellite(reply))
609 { 609 {
@@ -617,7 +617,7 @@ satellite_signal_cb(void *data, const EDBus_Message *reply)
617 617
618/* Unmarshall position coordination message */ 618/* Unmarshall position coordination message */
619static Eina_Bool 619static Eina_Bool
620unmarshall_position(const EDBus_Message *reply) 620unmarshall_position(const Eldbus_Message *reply)
621{ 621{
622 GeocluePositionFields fields; 622 GeocluePositionFields fields;
623 int32_t level, timestamp; 623 int32_t level, timestamp;
@@ -626,13 +626,13 @@ unmarshall_position(const EDBus_Message *reply)
626 double latitude = 0.0; 626 double latitude = 0.0;
627 double longitude = 0.0; 627 double longitude = 0.0;
628 double altitude = 0.0; 628 double altitude = 0.0;
629 EDBus_Message_Iter *sub; 629 Eldbus_Message_Iter *sub;
630 630
631 if (!edbus_message_arguments_get(reply, "iiddd(idd)", &fields, &timestamp, 631 if (!eldbus_message_arguments_get(reply, "iiddd(idd)", &fields, &timestamp,
632 &latitude, &longitude, &altitude, &sub)) 632 &latitude, &longitude, &altitude, &sub))
633 return EINA_FALSE; 633 return EINA_FALSE;
634 634
635 if (!edbus_message_iter_arguments_get(sub, "idd", &level, &horizontal, &vertical)) 635 if (!eldbus_message_iter_arguments_get(sub, "idd", &level, &horizontal, &vertical))
636 return EINA_FALSE; 636 return EINA_FALSE;
637 637
638 position->timestamp = timestamp; 638 position->timestamp = timestamp;
@@ -662,11 +662,11 @@ unmarshall_position(const EDBus_Message *reply)
662} 662}
663 663
664static void 664static void
665position_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 665position_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
666{ 666{
667 const char *err, *errmsg; 667 const char *err, *errmsg;
668 668
669 if (edbus_message_error_get(reply, &err, &errmsg)) 669 if (eldbus_message_error_get(reply, &err, &errmsg))
670 { 670 {
671 ERR("Error: %s %s", err, errmsg); 671 ERR("Error: %s %s", err, errmsg);
672 return; 672 return;
@@ -683,7 +683,7 @@ position_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
683} 683}
684 684
685static void 685static void
686position_signal_cb(void *data, const EDBus_Message *reply) 686position_signal_cb(void *data, const Eldbus_Message *reply)
687{ 687{
688 if (!unmarshall_position(reply)) 688 if (!unmarshall_position(reply))
689 { 689 {
@@ -710,11 +710,11 @@ geoclue_stop(void *data, int ev_type, void *event)
710} 710}
711 711
712static void 712static void
713_reference_add_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 713_reference_add_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
714{ 714{
715 const char *err, *errmsg; 715 const char *err, *errmsg;
716 716
717 if (edbus_message_error_get(reply, &err, &errmsg)) 717 if (eldbus_message_error_get(reply, &err, &errmsg))
718 { 718 {
719 ERR("Error: %s %s", err, errmsg); 719 ERR("Error: %s %s", err, errmsg);
720 return; 720 return;
@@ -724,17 +724,17 @@ _reference_add_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending
724} 724}
725 725
726static void 726static void
727_reference_del_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 727_reference_del_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
728{ 728{
729 /* Dummy callback. We are not waiting for any reply here on shutdown */ 729 /* Dummy callback. We are not waiting for any reply here on shutdown */
730} 730}
731 731
732static void 732static void
733status_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 733status_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
734{ 734{
735 const char *err, *errmsg; 735 const char *err, *errmsg;
736 736
737 if (edbus_message_error_get(reply, &err, &errmsg)) 737 if (eldbus_message_error_get(reply, &err, &errmsg))
738 { 738 {
739 ERR("Error: %s %s", err, errmsg); 739 ERR("Error: %s %s", err, errmsg);
740 return; 740 return;
@@ -743,7 +743,7 @@ status_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
743 /* We need this to be malloced to be passed to ecore_event_add. Or provide a dummy free callback. */ 743 /* We need this to be malloced to be passed to ecore_event_add. Or provide a dummy free callback. */
744 status = malloc(sizeof(*status)); 744 status = malloc(sizeof(*status));
745 745
746 if (!edbus_message_arguments_get(reply,"i", status)) 746 if (!eldbus_message_arguments_get(reply,"i", status))
747 { 747 {
748 ERR("Error: Unable to unmarshall status"); 748 ERR("Error: Unable to unmarshall status");
749 return; 749 return;
@@ -755,12 +755,12 @@ status_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
755} 755}
756 756
757static void 757static void
758status_signal_cb(void *data, const EDBus_Message *reply) 758status_signal_cb(void *data, const Eldbus_Message *reply)
759{ 759{
760 /* We need this to be malloced to be passed to ecore_event_add. Or provide a dummy free callback. */ 760 /* We need this to be malloced to be passed to ecore_event_add. Or provide a dummy free callback. */
761 status = malloc(sizeof(*status)); 761 status = malloc(sizeof(*status));
762 762
763 if (!edbus_message_arguments_get(reply,"i", status)) 763 if (!eldbus_message_arguments_get(reply,"i", status))
764 { 764 {
765 ERR("Error: Unable to unmarshall status"); 765 ERR("Error: Unable to unmarshall status");
766 return; 766 return;
@@ -772,7 +772,7 @@ status_signal_cb(void *data, const EDBus_Message *reply)
772} 772}
773 773
774static void 774static void
775_dummy_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending) 775_dummy_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
776{ 776{
777} 777}
778 778
@@ -784,76 +784,76 @@ _dummy_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending)
784 * to eager aplications. 784 * to eager aplications.
785 */ 785 */
786static void 786static void
787create_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) 787create_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending)
788{ 788{
789 const char *object_path; 789 const char *object_path;
790 Eina_Bool updates; 790 Eina_Bool updates;
791 int accur_level, min_time, resources; 791 int accur_level, min_time, resources;
792 const char *err, *errmsg; 792 const char *err, *errmsg;
793 793
794 if (edbus_message_error_get(reply, &err, &errmsg)) 794 if (eldbus_message_error_get(reply, &err, &errmsg))
795 { 795 {
796 ERR("Error: %s %s", err, errmsg); 796 ERR("Error: %s %s", err, errmsg);
797 return; 797 return;
798 } 798 }
799 799
800 if (!edbus_message_arguments_get(reply, "o", &object_path)) return; 800 if (!eldbus_message_arguments_get(reply, "o", &object_path)) return;
801 801
802 DBG("Object path for client: %s", object_path); 802 DBG("Object path for client: %s", object_path);
803 803
804 /* With the created object path we now have a meta provider we can operate on. 804 /* With the created object path we now have a meta provider we can operate on.
805 * Geoclue handles the selection of the best provider internally for the meta 805 * Geoclue handles the selection of the best provider internally for the meta
806 * provider */ 806 * provider */
807 obj_meta = edbus_object_get(conn, GEOCLUE_DBUS_NAME, object_path); 807 obj_meta = eldbus_object_get(conn, GEOCLUE_DBUS_NAME, object_path);
808 if (!obj_meta) 808 if (!obj_meta)
809 { 809 {
810 ERR("Error: could not get object for client"); 810 ERR("Error: could not get object for client");
811 return; 811 return;
812 } 812 }
813 813
814 meta_geoclue = edbus_proxy_get(obj_meta, GEOCLUE_GEOCLUE_IFACE); 814 meta_geoclue = eldbus_proxy_get(obj_meta, GEOCLUE_GEOCLUE_IFACE);
815 if (!meta_geoclue) 815 if (!meta_geoclue)
816 { 816 {
817 ERR("Error: could not get proxy for geoclue"); 817 ERR("Error: could not get proxy for geoclue");
818 return; 818 return;
819 } 819 }
820 820
821 meta_address = edbus_proxy_get(obj_meta, GEOCLUE_ADDRESS_IFACE); 821 meta_address = eldbus_proxy_get(obj_meta, GEOCLUE_ADDRESS_IFACE);
822 if (!meta_address) 822 if (!meta_address)
823 { 823 {
824 ERR("Error: could not get proxy address"); 824 ERR("Error: could not get proxy address");
825 return; 825 return;
826 } 826 }
827 827
828 meta_position = edbus_proxy_get(obj_meta, GEOCLUE_POSITION_IFACE); 828 meta_position = eldbus_proxy_get(obj_meta, GEOCLUE_POSITION_IFACE);
829 if (!meta_position) 829 if (!meta_position)
830 { 830 {
831 ERR("Error: could not get proxy for position"); 831 ERR("Error: could not get proxy for position");
832 return; 832 return;
833 } 833 }
834 834
835 meta_masterclient = edbus_proxy_get(obj_meta, GEOCLUE_MASTERCLIENT_IFACE); 835 meta_masterclient = eldbus_proxy_get(obj_meta, GEOCLUE_MASTERCLIENT_IFACE);
836 if (!meta_masterclient) 836 if (!meta_masterclient)
837 { 837 {
838 ERR("Error: could not get proxy for master client"); 838 ERR("Error: could not get proxy for master client");
839 return; 839 return;
840 } 840 }
841 841
842 meta_velocity = edbus_proxy_get(obj_meta, GEOCLUE_VELOCITY_IFACE); 842 meta_velocity = eldbus_proxy_get(obj_meta, GEOCLUE_VELOCITY_IFACE);
843 if (!meta_velocity) 843 if (!meta_velocity)
844 { 844 {
845 ERR("Error: could not get proxy for velocity"); 845 ERR("Error: could not get proxy for velocity");
846 return; 846 return;
847 } 847 }
848 848
849 meta_nmea = edbus_proxy_get(obj_meta, GEOCLUE_NMEA_IFACE); 849 meta_nmea = eldbus_proxy_get(obj_meta, GEOCLUE_NMEA_IFACE);
850 if (!meta_nmea) 850 if (!meta_nmea)
851 { 851 {
852 ERR("Error: could not get proxy for nmea"); 852 ERR("Error: could not get proxy for nmea");
853 return; 853 return;
854 } 854 }
855 855
856 meta_satellite = edbus_proxy_get(obj_meta, GEOCLUE_SATELLITE_IFACE); 856 meta_satellite = eldbus_proxy_get(obj_meta, GEOCLUE_SATELLITE_IFACE);
857 if (!meta_satellite) 857 if (!meta_satellite)
858 { 858 {
859 ERR("Error: could not get proxy for satellite"); 859 ERR("Error: could not get proxy for satellite");
@@ -867,98 +867,98 @@ create_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending)
867 min_time = 0; /* Minimal times between updates (no implemented yet) */ 867 min_time = 0; /* Minimal times between updates (no implemented yet) */
868 resources = ELOCATION_RESOURCE_ALL; 868 resources = ELOCATION_RESOURCE_ALL;
869 869
870 edbus_proxy_signal_handler_add(meta_masterclient, "AddressProviderChanged", 870 eldbus_proxy_signal_handler_add(meta_masterclient, "AddressProviderChanged",
871 meta_address_provider_info_signal_cb, address_provider); 871 meta_address_provider_info_signal_cb, address_provider);
872 edbus_proxy_signal_handler_add(meta_masterclient, "PositionProviderChanged", 872 eldbus_proxy_signal_handler_add(meta_masterclient, "PositionProviderChanged",
873 meta_position_provider_info_signal_cb, position_provider); 873 meta_position_provider_info_signal_cb, position_provider);
874 874
875 if (!edbus_proxy_call(meta_masterclient, "SetRequirements", _dummy_cb, NULL, -1, "iibi", 875 if (!eldbus_proxy_call(meta_masterclient, "SetRequirements", _dummy_cb, NULL, -1, "iibi",
876 accur_level, min_time, updates, resources)) 876 accur_level, min_time, updates, resources))
877 { 877 {
878 ERR("Error: could not call SetRequirements"); 878 ERR("Error: could not call SetRequirements");
879 return; 879 return;
880 } 880 }
881 881
882 if (!edbus_proxy_call(meta_masterclient, "AddressStart", _dummy_cb, NULL, -1, "")) 882 if (!eldbus_proxy_call(meta_masterclient, "AddressStart", _dummy_cb, NULL, -1, ""))
883 { 883 {
884 ERR("Error: could not call AddressStart"); 884 ERR("Error: could not call AddressStart");
885 return; 885 return;
886 } 886 }
887 887
888 if (!edbus_proxy_call(meta_masterclient, "PositionStart", _dummy_cb, NULL, -1, "")) 888 if (!eldbus_proxy_call(meta_masterclient, "PositionStart", _dummy_cb, NULL, -1, ""))
889 { 889 {
890 ERR("Error: could not call PositionStart"); 890 ERR("Error: could not call PositionStart");
891 return; 891 return;
892 } 892 }
893 893
894 if (!edbus_proxy_call(meta_geoclue, "AddReference", _reference_add_cb, NULL, -1, "")) 894 if (!eldbus_proxy_call(meta_geoclue, "AddReference", _reference_add_cb, NULL, -1, ""))
895 { 895 {
896 ERR("Error: could not call AddReference"); 896 ERR("Error: could not call AddReference");
897 return; 897 return;
898 } 898 }
899 899
900 if (!edbus_proxy_call(meta_address, "GetAddress", address_cb, NULL, -1, "")) 900 if (!eldbus_proxy_call(meta_address, "GetAddress", address_cb, NULL, -1, ""))
901 { 901 {
902 ERR("Error: could not call GetAddress"); 902 ERR("Error: could not call GetAddress");
903 return; 903 return;
904 } 904 }
905 905
906 if (!edbus_proxy_call(meta_position, "GetPosition", position_cb, NULL, -1, "")) 906 if (!eldbus_proxy_call(meta_position, "GetPosition", position_cb, NULL, -1, ""))
907 { 907 {
908 ERR("Error: could not call GetPosition"); 908 ERR("Error: could not call GetPosition");
909 return; 909 return;
910 } 910 }
911 911
912 if (!edbus_proxy_call(meta_geoclue, "GetStatus", status_cb, NULL, -1, "")) 912 if (!eldbus_proxy_call(meta_geoclue, "GetStatus", status_cb, NULL, -1, ""))
913 { 913 {
914 ERR("Error: could not call GetStatus"); 914 ERR("Error: could not call GetStatus");
915 return; 915 return;
916 } 916 }
917 917
918 if (!edbus_proxy_call(meta_velocity, "GetVelocity", velocity_cb, NULL, -1, "")) 918 if (!eldbus_proxy_call(meta_velocity, "GetVelocity", velocity_cb, NULL, -1, ""))
919 { 919 {
920 ERR("Error: could not call GetVelocity"); 920 ERR("Error: could not call GetVelocity");
921 return; 921 return;
922 } 922 }
923 923
924 if (!edbus_proxy_call(meta_nmea, "GetNmea", nmea_cb, NULL, -1, "")) 924 if (!eldbus_proxy_call(meta_nmea, "GetNmea", nmea_cb, NULL, -1, ""))
925 { 925 {
926 ERR("Error: could not call GetNmea"); 926 ERR("Error: could not call GetNmea");
927 return; 927 return;
928 } 928 }
929 929
930 if (!edbus_proxy_call(meta_satellite, "GetSatellite", satellite_cb, NULL, -1, "")) 930 if (!eldbus_proxy_call(meta_satellite, "GetSatellite", satellite_cb, NULL, -1, ""))
931 { 931 {
932 ERR("Error: could not call GetSatellite"); 932 ERR("Error: could not call GetSatellite");
933 return; 933 return;
934 } 934 }
935 935
936 if (!edbus_proxy_call(meta_satellite, "GetLastSatellite", last_satellite_cb, NULL, -1, "")) 936 if (!eldbus_proxy_call(meta_satellite, "GetLastSatellite", last_satellite_cb, NULL, -1, ""))
937 { 937 {
938 ERR("Error: could not call GetLastSatellite"); 938 ERR("Error: could not call GetLastSatellite");
939 return; 939 return;
940 } 940 }
941 941
942 if (!edbus_proxy_call(meta_masterclient, "GetAddressProvider", meta_address_provider_info_cb, 942 if (!eldbus_proxy_call(meta_masterclient, "GetAddressProvider", meta_address_provider_info_cb,
943 address_provider, -1, "")) 943 address_provider, -1, ""))
944 { 944 {
945 ERR("Error: could not call GetAddressProvider"); 945 ERR("Error: could not call GetAddressProvider");
946 return; 946 return;
947 } 947 }
948 948
949 if (!edbus_proxy_call(meta_masterclient, "GetPositionProvider", meta_position_provider_info_cb, 949 if (!eldbus_proxy_call(meta_masterclient, "GetPositionProvider", meta_position_provider_info_cb,
950 position_provider, -1, "")) 950 position_provider, -1, ""))
951 { 951 {
952 ERR("Error: could not call GetPositionProvider"); 952 ERR("Error: could not call GetPositionProvider");
953 return; 953 return;
954 } 954 }
955 955
956 edbus_proxy_signal_handler_add(meta_address, "AddressChanged", address_signal_cb, NULL); 956 eldbus_proxy_signal_handler_add(meta_address, "AddressChanged", address_signal_cb, NULL);
957 edbus_proxy_signal_handler_add(meta_position, "PositionChanged", position_signal_cb, NULL); 957 eldbus_proxy_signal_handler_add(meta_position, "PositionChanged", position_signal_cb, NULL);
958 edbus_proxy_signal_handler_add(meta_geoclue, "StatusChanged", status_signal_cb, NULL); 958 eldbus_proxy_signal_handler_add(meta_geoclue, "StatusChanged", status_signal_cb, NULL);
959 edbus_proxy_signal_handler_add(meta_velocity, "VelocityChanged", velocity_signal_cb, NULL); 959 eldbus_proxy_signal_handler_add(meta_velocity, "VelocityChanged", velocity_signal_cb, NULL);
960 edbus_proxy_signal_handler_add(meta_nmea, "NmeaChanged", nmea_signal_cb, NULL); 960 eldbus_proxy_signal_handler_add(meta_nmea, "NmeaChanged", nmea_signal_cb, NULL);
961 edbus_proxy_signal_handler_add(meta_satellite, "SatelliteChanged", satellite_signal_cb, NULL); 961 eldbus_proxy_signal_handler_add(meta_satellite, "SatelliteChanged", satellite_signal_cb, NULL);
962 962
963 ecore_event_add(ELOCATION_EVENT_META_READY, NULL, NULL, NULL); 963 ecore_event_add(ELOCATION_EVENT_META_READY, NULL, NULL, NULL);
964} 964}
@@ -988,26 +988,26 @@ _name_owner_changed(void *data, const char *bus, const char *old, const char *ne
988EAPI Eina_Bool 988EAPI Eina_Bool
989elocation_landmarks_get(Elocation_Position *position_shadow, Elocation_Address *address_shadow) 989elocation_landmarks_get(Elocation_Position *position_shadow, Elocation_Address *address_shadow)
990{ 990{
991 EDBus_Message *msg; 991 Eldbus_Message *msg;
992 EDBus_Message_Iter *iter; 992 Eldbus_Message_Iter *iter;
993 const char *keyword = NULL, *lang = NULL, *country_code = NULL; 993 const char *keyword = NULL, *lang = NULL, *country_code = NULL;
994 int limit = 0; 994 int limit = 0;
995 double left= 0.0, top = 0.0, right = 0.0, bottom = 0.0; 995 double left= 0.0, top = 0.0, right = 0.0, bottom = 0.0;
996 996
997 msg = edbus_proxy_method_call_new(master_poi, "SearchByPosition"); 997 msg = eldbus_proxy_method_call_new(master_poi, "SearchByPosition");
998 iter = edbus_message_iter_get(msg); 998 iter = eldbus_message_iter_get(msg);
999 edbus_message_iter_basic_append(iter, 's', keyword); 999 eldbus_message_iter_basic_append(iter, 's', keyword);
1000 edbus_message_iter_basic_append(iter, 's', lang); 1000 eldbus_message_iter_basic_append(iter, 's', lang);
1001 edbus_message_iter_basic_append(iter, 's', country_code); 1001 eldbus_message_iter_basic_append(iter, 's', country_code);
1002 edbus_message_iter_basic_append(iter, 'i', limit); 1002 eldbus_message_iter_basic_append(iter, 'i', limit);
1003 edbus_message_iter_basic_append(iter, 'd', left); 1003 eldbus_message_iter_basic_append(iter, 'd', left);
1004 edbus_message_iter_basic_append(iter, 'd', top); 1004 eldbus_message_iter_basic_append(iter, 'd', top);
1005 edbus_message_iter_basic_append(iter, 'd', right); 1005 eldbus_message_iter_basic_append(iter, 'd', right);
1006 edbus_message_iter_basic_append(iter, 'd', bottom); 1006 eldbus_message_iter_basic_append(iter, 'd', bottom);
1007 if (!edbus_proxy_send(master_poi, msg, poi_cb, NULL, -1)) 1007 if (!eldbus_proxy_send(master_poi, msg, poi_cb, NULL, -1))
1008 { 1008 {
1009 ERR("Error: could not call SearchByPosition"); 1009 ERR("Error: could not call SearchByPosition");
1010 edbus_message_unref(msg); 1010 eldbus_message_unref(msg);
1011 return EINA_FALSE; 1011 return EINA_FALSE;
1012 } 1012 }
1013 1013
@@ -1018,22 +1018,22 @@ elocation_landmarks_get(Elocation_Position *position_shadow, Elocation_Address *
1018EAPI Eina_Bool 1018EAPI Eina_Bool
1019elocation_position_to_address(Elocation_Position *position_shadow, Elocation_Address *address_shadow) 1019elocation_position_to_address(Elocation_Position *position_shadow, Elocation_Address *address_shadow)
1020{ 1020{
1021 EDBus_Message *msg; 1021 Eldbus_Message *msg;
1022 EDBus_Message_Iter *iter, *structure; 1022 Eldbus_Message_Iter *iter, *structure;
1023 1023
1024 msg = edbus_proxy_method_call_new(geonames_rgeocode, "PositionToAddress"); 1024 msg = eldbus_proxy_method_call_new(geonames_rgeocode, "PositionToAddress");
1025 iter = edbus_message_iter_get(msg); 1025 iter = eldbus_message_iter_get(msg);
1026 edbus_message_iter_basic_append(iter, 'd', position_shadow->latitude); 1026 eldbus_message_iter_basic_append(iter, 'd', position_shadow->latitude);
1027 edbus_message_iter_basic_append(iter, 'd', position_shadow->longitude); 1027 eldbus_message_iter_basic_append(iter, 'd', position_shadow->longitude);
1028 structure = edbus_message_iter_container_new(iter, 'r', NULL); 1028 structure = eldbus_message_iter_container_new(iter, 'r', NULL);
1029 edbus_message_iter_basic_append(structure, 'i', position_shadow->accur->level); 1029 eldbus_message_iter_basic_append(structure, 'i', position_shadow->accur->level);
1030 edbus_message_iter_basic_append(structure, 'd', position_shadow->accur->horizontal); 1030 eldbus_message_iter_basic_append(structure, 'd', position_shadow->accur->horizontal);
1031 edbus_message_iter_basic_append(structure, 'd', position_shadow->accur->vertical); 1031 eldbus_message_iter_basic_append(structure, 'd', position_shadow->accur->vertical);
1032 edbus_message_iter_container_close(iter, structure); 1032 eldbus_message_iter_container_close(iter, structure);
1033 if (!edbus_proxy_send(geonames_rgeocode, msg, rgeocode_cb, NULL, -1)) 1033 if (!eldbus_proxy_send(geonames_rgeocode, msg, rgeocode_cb, NULL, -1))
1034 { 1034 {
1035 ERR("Error: could not call PositionToAddress"); 1035 ERR("Error: could not call PositionToAddress");
1036 edbus_message_unref(msg); 1036 eldbus_message_unref(msg);
1037 return EINA_FALSE; 1037 return EINA_FALSE;
1038 } 1038 }
1039 1039
@@ -1044,8 +1044,8 @@ elocation_position_to_address(Elocation_Position *position_shadow, Elocation_Add
1044EAPI Eina_Bool 1044EAPI Eina_Bool
1045elocation_address_to_position(Elocation_Address *address_shadow, Elocation_Position *position_shadow) 1045elocation_address_to_position(Elocation_Address *address_shadow, Elocation_Position *position_shadow)
1046{ 1046{
1047 EDBus_Message *msg; 1047 Eldbus_Message *msg;
1048 EDBus_Message_Iter *iter, *array; 1048 Eldbus_Message_Iter *iter, *array;
1049 1049
1050 /* In function macro to generate a key value pair structure for the dict */ 1050 /* In function macro to generate a key value pair structure for the dict */
1051 #define ENTRY(key) { #key, address_shadow->key } 1051 #define ENTRY(key) { #key, address_shadow->key }
@@ -1065,28 +1065,28 @@ elocation_address_to_position(Elocation_Address *address_shadow, Elocation_Posit
1065 1065
1066 struct keyval *k; 1066 struct keyval *k;
1067 1067
1068 msg = edbus_proxy_method_call_new(geonames_geocode, "AddressToPosition"); 1068 msg = eldbus_proxy_method_call_new(geonames_geocode, "AddressToPosition");
1069 iter = edbus_message_iter_get(msg); 1069 iter = eldbus_message_iter_get(msg);
1070 1070
1071 array = edbus_message_iter_container_new(iter, 'a', "{ss}"); 1071 array = eldbus_message_iter_container_new(iter, 'a', "{ss}");
1072 1072
1073 for (k = keyval; k && k->key; k++) 1073 for (k = keyval; k && k->key; k++)
1074 { 1074 {
1075 EDBus_Message_Iter *entry; 1075 Eldbus_Message_Iter *entry;
1076 1076
1077 if (!k->val) continue; 1077 if (!k->val) continue;
1078 1078
1079 entry = edbus_message_iter_container_new(array, 'e', NULL); 1079 entry = eldbus_message_iter_container_new(array, 'e', NULL);
1080 edbus_message_iter_arguments_append(entry, "ss", k->key, k->val); 1080 eldbus_message_iter_arguments_append(entry, "ss", k->key, k->val);
1081 edbus_message_iter_container_close(array, entry); 1081 eldbus_message_iter_container_close(array, entry);
1082 } 1082 }
1083 1083
1084 edbus_message_iter_container_close(iter, array); 1084 eldbus_message_iter_container_close(iter, array);
1085 1085
1086 if (!edbus_proxy_send(geonames_geocode, msg, geocode_cb, NULL, -1)) 1086 if (!eldbus_proxy_send(geonames_geocode, msg, geocode_cb, NULL, -1))
1087 { 1087 {
1088 ERR("Error: could not call AddressToPosition"); 1088 ERR("Error: could not call AddressToPosition");
1089 edbus_message_unref(msg); 1089 eldbus_message_unref(msg);
1090 return EINA_FALSE; 1090 return EINA_FALSE;
1091 } 1091 }
1092 1092
@@ -1099,7 +1099,7 @@ elocation_address_to_position(Elocation_Address *address_shadow, Elocation_Posit
1099EAPI Eina_Bool 1099EAPI Eina_Bool
1100elocation_freeform_address_to_position(const char *freeform_address, Elocation_Position *position_shadow) 1100elocation_freeform_address_to_position(const char *freeform_address, Elocation_Position *position_shadow)
1101{ 1101{
1102 if (!edbus_proxy_call(geonames_geocode, "FreeformAddressToPosition", geocode_cb, NULL, -1, "s", freeform_address)) 1102 if (!eldbus_proxy_call(geonames_geocode, "FreeformAddressToPosition", geocode_cb, NULL, -1, "s", freeform_address))
1103 { 1103 {
1104 ERR("Error: could not call FreeformAddressToPosition"); 1104 ERR("Error: could not call FreeformAddressToPosition");
1105 return EINA_FALSE; 1105 return EINA_FALSE;
@@ -1208,12 +1208,12 @@ elocation_address_free(Elocation_Address *address_shadow)
1208EAPI Eina_Bool 1208EAPI Eina_Bool
1209elocation_init(void) 1209elocation_init(void)
1210{ 1210{
1211 EDBus_Object *obj_master = NULL; 1211 Eldbus_Object *obj_master = NULL;
1212 EDBus_Object *obj_geonames = NULL; 1212 Eldbus_Object *obj_geonames = NULL;
1213 1213
1214 if (!eina_init()) return EINA_FALSE; 1214 if (!eina_init()) return EINA_FALSE;
1215 if (!ecore_init()) return EINA_FALSE; 1215 if (!ecore_init()) return EINA_FALSE;
1216 if (!edbus_init()) return EINA_FALSE; 1216 if (!eldbus_init()) return EINA_FALSE;
1217 1217
1218 _elocation_log_dom = eina_log_domain_register("elocation", EINA_COLOR_BLUE); 1218 _elocation_log_dom = eina_log_domain_register("elocation", EINA_COLOR_BLUE);
1219 if (_elocation_log_dom < 0) 1219 if (_elocation_log_dom < 0)
@@ -1237,7 +1237,7 @@ elocation_init(void)
1237 pos_geocode->accur = calloc(1, sizeof(Elocation_Accuracy)); 1237 pos_geocode->accur = calloc(1, sizeof(Elocation_Accuracy));
1238 if (!pos_geocode->accur) return EINA_FALSE; 1238 if (!pos_geocode->accur) return EINA_FALSE;
1239 1239
1240 conn = edbus_connection_get(EDBUS_CONNECTION_TYPE_SESSION); 1240 conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
1241 if (!conn) 1241 if (!conn)
1242 { 1242 {
1243 ERR("Error: could not connect to session bus."); 1243 ERR("Error: could not connect to session bus.");
@@ -1281,14 +1281,14 @@ elocation_init(void)
1281 if (ELOCATION_EVENT_META_READY == 0) 1281 if (ELOCATION_EVENT_META_READY == 0)
1282 ELOCATION_EVENT_META_READY = ecore_event_type_new(); 1282 ELOCATION_EVENT_META_READY = ecore_event_type_new();
1283 1283
1284 obj_master= edbus_object_get(conn, GEOCLUE_DBUS_NAME, GEOCLUE_OBJECT_PATH); 1284 obj_master= eldbus_object_get(conn, GEOCLUE_DBUS_NAME, GEOCLUE_OBJECT_PATH);
1285 if (!obj_master) 1285 if (!obj_master)
1286 { 1286 {
1287 ERR("Error: could not get object"); 1287 ERR("Error: could not get object");
1288 return EXIT_FAILURE; 1288 return EXIT_FAILURE;
1289 } 1289 }
1290 1290
1291 manager_master = edbus_proxy_get(obj_master, GEOCLUE_MASTER_IFACE); 1291 manager_master = eldbus_proxy_get(obj_master, GEOCLUE_MASTER_IFACE);
1292 if (!manager_master) 1292 if (!manager_master)
1293 { 1293 {
1294 ERR("Error: could not get proxy"); 1294 ERR("Error: could not get proxy");
@@ -1301,13 +1301,13 @@ elocation_init(void)
1301 * a provider but we maybe need this in the future. We will try without it 1301 * a provider but we maybe need this in the future. We will try without it
1302 * for now. 1302 * for now.
1303 */ 1303 */
1304 if (!edbus_proxy_call(manager_master, "Create", create_cb, NULL, -1, "")) 1304 if (!eldbus_proxy_call(manager_master, "Create", create_cb, NULL, -1, ""))
1305 { 1305 {
1306 ERR("Error: could not call Create"); 1306 ERR("Error: could not call Create");
1307 return EXIT_FAILURE; 1307 return EXIT_FAILURE;
1308 } 1308 }
1309 1309
1310 master_poi = edbus_proxy_get(obj_master, GEOCLUE_POI_IFACE); 1310 master_poi = eldbus_proxy_get(obj_master, GEOCLUE_POI_IFACE);
1311 if (!master_poi) 1311 if (!master_poi)
1312 { 1312 {
1313 ERR("Error: could not get proxy"); 1313 ERR("Error: could not get proxy");
@@ -1316,28 +1316,28 @@ elocation_init(void)
1316 1316
1317 /* Geocode and reverse geocode never show up as meta provider. Still we want 1317 /* Geocode and reverse geocode never show up as meta provider. Still we want
1318 * to be able to convert so we keep them around directly here. */ 1318 * to be able to convert so we keep them around directly here. */
1319 obj_geonames= edbus_object_get(conn, GEONAMES_DBUS_NAME, GEONAMES_OBJECT_PATH); 1319 obj_geonames= eldbus_object_get(conn, GEONAMES_DBUS_NAME, GEONAMES_OBJECT_PATH);
1320 if (!obj_geonames) 1320 if (!obj_geonames)
1321 { 1321 {
1322 ERR("Error: could not get object for geonames"); 1322 ERR("Error: could not get object for geonames");
1323 return EXIT_FAILURE; 1323 return EXIT_FAILURE;
1324 } 1324 }
1325 1325
1326 geonames_geocode = edbus_proxy_get(obj_geonames, GEOCLUE_GEOCODE_IFACE); 1326 geonames_geocode = eldbus_proxy_get(obj_geonames, GEOCLUE_GEOCODE_IFACE);
1327 if (!geonames_geocode) 1327 if (!geonames_geocode)
1328 { 1328 {
1329 ERR("Error: could not get proxy"); 1329 ERR("Error: could not get proxy");
1330 return EXIT_FAILURE; 1330 return EXIT_FAILURE;
1331 } 1331 }
1332 1332
1333 geonames_rgeocode = edbus_proxy_get(obj_geonames, GEOCLUE_REVERSEGEOCODE_IFACE); 1333 geonames_rgeocode = eldbus_proxy_get(obj_geonames, GEOCLUE_REVERSEGEOCODE_IFACE);
1334 if (!geonames_rgeocode) 1334 if (!geonames_rgeocode)
1335 { 1335 {
1336 ERR("Error: could not get proxy"); 1336 ERR("Error: could not get proxy");
1337 return EXIT_FAILURE; 1337 return EXIT_FAILURE;
1338 } 1338 }
1339 1339
1340 edbus_name_owner_changed_callback_add(conn, GEOCLUE_DBUS_NAME, _name_owner_changed, 1340 eldbus_name_owner_changed_callback_add(conn, GEOCLUE_DBUS_NAME, _name_owner_changed,
1341 NULL, EINA_TRUE); 1341 NULL, EINA_TRUE);
1342 1342
1343 ecore_event_handler_add(ELOCATION_EVENT_IN, geoclue_start, NULL); 1343 ecore_event_handler_add(ELOCATION_EVENT_IN, geoclue_start, NULL);
@@ -1356,7 +1356,7 @@ elocation_shutdown(void)
1356 if (meta_geoclue) 1356 if (meta_geoclue)
1357 { 1357 {
1358 /* To allow geoclue freeing unused providers we free our reference on it here */ 1358 /* To allow geoclue freeing unused providers we free our reference on it here */
1359 if (!edbus_proxy_call(meta_geoclue, "RemoveReference", _reference_del_cb, NULL, -1, "")) 1359 if (!eldbus_proxy_call(meta_geoclue, "RemoveReference", _reference_del_cb, NULL, -1, ""))
1360 { 1360 {
1361 ERR("Error: could not call RemoveReference"); 1361 ERR("Error: could not call RemoveReference");
1362 } 1362 }
@@ -1401,15 +1401,15 @@ elocation_shutdown(void)
1401 free(addr_geocode); 1401 free(addr_geocode);
1402 } 1402 }
1403 1403
1404 /* Unreference some edbus strcutures we now longer use. To allow edbus to 1404 /* Unreference some eldbus strcutures we now longer use. To allow eldbus to
1405 * free them internally. 1405 * free them internally.
1406 */ 1406 */
1407 if (manager_master) 1407 if (manager_master)
1408 edbus_proxy_unref(manager_master); 1408 eldbus_proxy_unref(manager_master);
1409 1409
1410 edbus_name_owner_changed_callback_del(conn, GEOCLUE_DBUS_NAME, _name_owner_changed, NULL); 1410 eldbus_name_owner_changed_callback_del(conn, GEOCLUE_DBUS_NAME, _name_owner_changed, NULL);
1411 edbus_connection_unref(conn); 1411 eldbus_connection_unref(conn);
1412 edbus_shutdown(); 1412 eldbus_shutdown();
1413 ecore_shutdown(); 1413 ecore_shutdown();
1414 eina_log_domain_unregister(_elocation_log_dom); 1414 eina_log_domain_unregister(_elocation_log_dom);
1415 eina_shutdown(); 1415 eina_shutdown();
diff --git a/src/lib/elocation_private.h b/src/lib/elocation_private.h
index 5d32b88..1203cc3 100644
--- a/src/lib/elocation_private.h
+++ b/src/lib/elocation_private.h
@@ -9,7 +9,7 @@
9 9
10#include <Eina.h> 10#include <Eina.h>
11#include <Ecore.h> 11#include <Ecore.h>
12#include <EDBus.h> 12#include <Eldbus.h>
13 13
14#ifndef ELOCATION_COLOR_DEFAULT 14#ifndef ELOCATION_COLOR_DEFAULT
15#define ELOCATION_COLOR_DEFAULT EINA_COLOR_BLUE 15#define ELOCATION_COLOR_DEFAULT EINA_COLOR_BLUE
diff --git a/src/tests/elocation_suite.c b/src/tests/elocation_suite.c
index 53755f8..c049bd1 100644
--- a/src/tests/elocation_suite.c
+++ b/src/tests/elocation_suite.c
@@ -20,13 +20,13 @@ START_TEST(elocation_test_init)
20 20
21 ret = ecore_init(); 21 ret = ecore_init();
22 fail_if(ret != EINA_TRUE); 22 fail_if(ret != EINA_TRUE);
23 ret = edbus_init(); 23 ret = eldbus_init();
24 fail_if(ret != EINA_TRUE); 24 fail_if(ret != EINA_TRUE);
25 ret = elocation_init(); 25 ret = elocation_init();
26 fail_if(ret != EINA_TRUE); 26 fail_if(ret != EINA_TRUE);
27 27
28 elocation_shutdown(); 28 elocation_shutdown();
29 edbus_shutdown(); 29 eldbus_shutdown();
30 ecore_shutdown(); 30 ecore_shutdown();
31} 31}
32END_TEST 32END_TEST
@@ -39,7 +39,7 @@ START_TEST(elocation_test_address_object)
39 39
40 ret = ecore_init(); 40 ret = ecore_init();
41 fail_if(ret != EINA_TRUE); 41 fail_if(ret != EINA_TRUE);
42 ret = edbus_init(); 42 ret = eldbus_init();
43 fail_if(ret != EINA_TRUE); 43 fail_if(ret != EINA_TRUE);
44 ret = elocation_init(); 44 ret = elocation_init();
45 fail_if(ret != EINA_TRUE); 45 fail_if(ret != EINA_TRUE);
@@ -50,7 +50,7 @@ START_TEST(elocation_test_address_object)
50 elocation_address_free(address); 50 elocation_address_free(address);
51 51
52 elocation_shutdown(); 52 elocation_shutdown();
53 edbus_shutdown(); 53 eldbus_shutdown();
54 ecore_shutdown(); 54 ecore_shutdown();
55} 55}
56END_TEST 56END_TEST
@@ -63,7 +63,7 @@ START_TEST(elocation_test_position_object)
63 63
64 ret = ecore_init(); 64 ret = ecore_init();
65 fail_if(ret != EINA_TRUE); 65 fail_if(ret != EINA_TRUE);
66 ret = edbus_init(); 66 ret = eldbus_init();
67 fail_if(ret != EINA_TRUE); 67 fail_if(ret != EINA_TRUE);
68 ret = elocation_init(); 68 ret = elocation_init();
69 fail_if(ret != EINA_TRUE); 69 fail_if(ret != EINA_TRUE);
@@ -74,7 +74,7 @@ START_TEST(elocation_test_position_object)
74 elocation_position_free(position); 74 elocation_position_free(position);
75 75
76 elocation_shutdown(); 76 elocation_shutdown();
77 edbus_shutdown(); 77 eldbus_shutdown();
78 ecore_shutdown(); 78 ecore_shutdown();
79} 79}
80END_TEST 80END_TEST
@@ -88,7 +88,7 @@ START_TEST(elocation_test_api_geocode)
88 88
89 ret = ecore_init(); 89 ret = ecore_init();
90 fail_if(ret != EINA_TRUE); 90 fail_if(ret != EINA_TRUE);
91 ret = edbus_init(); 91 ret = eldbus_init();
92 fail_if(ret != EINA_TRUE); 92 fail_if(ret != EINA_TRUE);
93 ret = elocation_init(); 93 ret = elocation_init();
94 fail_if(ret != EINA_TRUE); 94 fail_if(ret != EINA_TRUE);
@@ -117,7 +117,7 @@ START_TEST(elocation_test_api_geocode)
117 elocation_address_free(address); 117 elocation_address_free(address);
118 118
119 elocation_shutdown(); 119 elocation_shutdown();
120 edbus_shutdown(); 120 eldbus_shutdown();
121 ecore_shutdown(); 121 ecore_shutdown();
122} 122}
123END_TEST 123END_TEST
@@ -130,7 +130,7 @@ START_TEST(elocation_test_api_position)
130 130
131 ret = ecore_init(); 131 ret = ecore_init();
132 fail_if(ret != EINA_TRUE); 132 fail_if(ret != EINA_TRUE);
133 ret = edbus_init(); 133 ret = eldbus_init();
134 fail_if(ret != EINA_TRUE); 134 fail_if(ret != EINA_TRUE);
135 ret = elocation_init(); 135 ret = elocation_init();
136 fail_if(ret != EINA_TRUE); 136 fail_if(ret != EINA_TRUE);
@@ -144,7 +144,7 @@ START_TEST(elocation_test_api_position)
144 elocation_position_free(position); 144 elocation_position_free(position);
145 145
146 elocation_shutdown(); 146 elocation_shutdown();
147 edbus_shutdown(); 147 eldbus_shutdown();
148 ecore_shutdown(); 148 ecore_shutdown();
149} 149}
150END_TEST 150END_TEST
@@ -157,7 +157,7 @@ START_TEST(elocation_test_api_address)
157 157
158 ret = ecore_init(); 158 ret = ecore_init();
159 fail_if(ret != EINA_TRUE); 159 fail_if(ret != EINA_TRUE);
160 ret = edbus_init(); 160 ret = eldbus_init();
161 fail_if(ret != EINA_TRUE); 161 fail_if(ret != EINA_TRUE);
162 ret = elocation_init(); 162 ret = elocation_init();
163 fail_if(ret != EINA_TRUE); 163 fail_if(ret != EINA_TRUE);
@@ -171,7 +171,7 @@ START_TEST(elocation_test_api_address)
171 elocation_address_free(address); 171 elocation_address_free(address);
172 172
173 elocation_shutdown(); 173 elocation_shutdown();
174 edbus_shutdown(); 174 eldbus_shutdown();
175 ecore_shutdown(); 175 ecore_shutdown();
176} 176}
177END_TEST 177END_TEST
@@ -184,7 +184,7 @@ START_TEST(elocation_test_api_status)
184 184
185 ret = ecore_init(); 185 ret = ecore_init();
186 fail_if(ret != EINA_TRUE); 186 fail_if(ret != EINA_TRUE);
187 ret = edbus_init(); 187 ret = eldbus_init();
188 fail_if(ret != EINA_TRUE); 188 fail_if(ret != EINA_TRUE);
189 ret = elocation_init(); 189 ret = elocation_init();
190 fail_if(ret != EINA_TRUE); 190 fail_if(ret != EINA_TRUE);
@@ -193,7 +193,7 @@ START_TEST(elocation_test_api_status)
193 fail_if(ret != EINA_TRUE); 193 fail_if(ret != EINA_TRUE);
194 194
195 elocation_shutdown(); 195 elocation_shutdown();
196 edbus_shutdown(); 196 eldbus_shutdown();
197 ecore_shutdown(); 197 ecore_shutdown();
198} 198}
199END_TEST 199END_TEST