summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2014-11-03 16:16:16 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2014-11-21 10:38:39 +0100
commitf5dcadaab5d695a5cba928199a52daee0a94923b (patch)
tree060e931ec4204ba4f38b6bd640e2011af3c1f61c
parentbe4fc157f219420d3699bfb3e200fa290ad9466d (diff)
elocation: Add generated GeoClue2 DBus helper code.
Generated by eldbus-codegen to avoid writing the boilerplate code by hand.
-rw-r--r--src/Makefile_Elocation.am11
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_client.c442
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_client.h32
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_location.c242
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_location.h18
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_manager.c203
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_manager.h19
-rw-r--r--src/lib/elocation/gen/eldbus_utils.h24
-rw-r--r--src/lib/elocation/gen/org.freedesktop.GeoClue2.xml199
9 files changed, 1188 insertions, 2 deletions
diff --git a/src/Makefile_Elocation.am b/src/Makefile_Elocation.am
index 579300e..0260652 100644
--- a/src/Makefile_Elocation.am
+++ b/src/Makefile_Elocation.am
@@ -5,10 +5,17 @@ lib_LTLIBRARIES += lib/elocation/libelocation.la
5installed_elocationsmainheadersdir = $(includedir)/elocation-@VMAJ@ 5installed_elocationsmainheadersdir = $(includedir)/elocation-@VMAJ@
6dist_installed_elocationsmainheaders_DATA = \ 6dist_installed_elocationsmainheaders_DATA = \
7lib/elocation/Elocation.h \ 7lib/elocation/Elocation.h \
8lib/elocation/elocation_private.h 8lib/elocation/elocation_private.h \
9lib/elocation/gen/eldbus_geo_clue2_client.h \
10lib/elocation/gen/eldbus_geo_clue2_location.h \
11lib/elocation/gen/eldbus_geo_clue2_manager.h \
12lib/elocation/gen/eldbus_utils.h
9 13
10lib_elocation_libelocation_la_SOURCES = \ 14lib_elocation_libelocation_la_SOURCES = \
11lib/elocation/elocation.c 15lib/elocation/elocation.c \
16lib/elocation/gen/eldbus_geo_clue2_client.c \
17lib/elocation/gen/eldbus_geo_clue2_location.c \
18lib/elocation/gen/eldbus_geo_clue2_manager.c
12 19
13lib_elocation_libelocation_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ELOCATION_CFLAGS@ 20lib_elocation_libelocation_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ELOCATION_CFLAGS@
14lib_elocation_libelocation_la_LIBADD = @ELOCATION_LIBS@ 21lib_elocation_libelocation_la_LIBADD = @ELOCATION_LIBS@
diff --git a/src/lib/elocation/gen/eldbus_geo_clue2_client.c b/src/lib/elocation/gen/eldbus_geo_clue2_client.c
new file mode 100644
index 0000000..73fed90
--- /dev/null
+++ b/src/lib/elocation/gen/eldbus_geo_clue2_client.c
@@ -0,0 +1,442 @@
1#include "eldbus_geo_clue2_client.h"
2
3static int _log_main = -1;
4#undef ERR
5#define ERR(...) EINA_LOG_DOM_ERR(_log_main, __VA_ARGS__);
6int GEO_CLUE2_CLIENT_LOCATION_UPDATED_EVENT = 0;
7
8static void
9cb_geo_clue2_client_start(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
10{
11 void *user_data = eldbus_pending_data_del(pending, "__user_data");
12 Geo_Clue2_Client_Start_Cb cb = data;
13 const char *error, *error_msg;
14 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
15 if (eldbus_message_error_get(msg, &error, &error_msg))
16 {
17 Eldbus_Error_Info error_info = {error, error_msg};
18 cb(proxy, user_data, pending, &error_info);
19 return;
20 }
21 if (!eldbus_message_arguments_get(msg, ""))
22 {
23 Eldbus_Error_Info error_info = {"", ""};
24 ERR("Error: Getting arguments from message.");
25 cb(proxy, user_data, pending, &error_info);
26 return;
27 }
28 cb(proxy, user_data, pending, NULL);
29 return;
30}
31
32Eldbus_Pending *
33geo_clue2_client_start_call(Eldbus_Proxy *proxy, Geo_Clue2_Client_Start_Cb cb, const void *data)
34{
35 Eldbus_Message *msg;
36 Eldbus_Pending *p;
37 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
38 msg = eldbus_proxy_method_call_new(proxy, "Start");
39 if (!eldbus_message_arguments_append(msg, ""))
40 {
41 ERR("Error: Filling message.");
42 return NULL;
43 }
44 p = eldbus_proxy_send(proxy, msg, cb_geo_clue2_client_start, cb, -1);
45 if (data)
46 eldbus_pending_data_set(p, "__user_data", data);
47 eldbus_pending_data_set(p, "__proxy", proxy);
48 return p;
49}
50
51static void
52cb_geo_clue2_client_stop(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
53{
54 void *user_data = eldbus_pending_data_del(pending, "__user_data");
55 Geo_Clue2_Client_Stop_Cb cb = data;
56 const char *error, *error_msg;
57 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
58 if (eldbus_message_error_get(msg, &error, &error_msg))
59 {
60 Eldbus_Error_Info error_info = {error, error_msg};
61 cb(proxy, user_data, pending, &error_info);
62 return;
63 }
64 if (!eldbus_message_arguments_get(msg, ""))
65 {
66 Eldbus_Error_Info error_info = {"", ""};
67 ERR("Error: Getting arguments from message.");
68 cb(proxy, user_data, pending, &error_info);
69 return;
70 }
71 cb(proxy, user_data, pending, NULL);
72 return;
73}
74
75Eldbus_Pending *
76geo_clue2_client_stop_call(Eldbus_Proxy *proxy, Geo_Clue2_Client_Stop_Cb cb, const void *data)
77{
78 Eldbus_Message *msg;
79 Eldbus_Pending *p;
80 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
81 msg = eldbus_proxy_method_call_new(proxy, "Stop");
82 if (!eldbus_message_arguments_append(msg, ""))
83 {
84 ERR("Error: Filling message.");
85 return NULL;
86 }
87 p = eldbus_proxy_send(proxy, msg, cb_geo_clue2_client_stop, cb, -1);
88 if (data)
89 eldbus_pending_data_set(p, "__user_data", data);
90 eldbus_pending_data_set(p, "__proxy", proxy);
91 return p;
92}
93
94static void
95geo_clue2_client_location_updated_data_free(void *user_data EINA_UNUSED, void *func_data)
96{
97 Geo_Clue2_Client_LocationUpdated_Data *s_data = func_data;
98 free(s_data->old);
99 free(s_data->new);
100 free(s_data);
101}
102
103static void
104on_geo_clue2_client_location_updated(void *data, const Eldbus_Message *msg)
105{
106 Eldbus_Proxy *proxy = data;
107 Geo_Clue2_Client_LocationUpdated_Data *s_data = calloc(1, sizeof(Geo_Clue2_Client_LocationUpdated_Data));
108 s_data->proxy = proxy;
109 if (!eldbus_message_arguments_get(msg, "oo", &s_data->old, &s_data->new))
110 {
111 ERR("Error: Getting arguments from message.");
112 free(s_data);
113 return;
114 }
115 s_data->old = strdup(s_data->old);
116 s_data->new = strdup(s_data->new);
117 ecore_event_add(GEO_CLUE2_CLIENT_LOCATION_UPDATED_EVENT, s_data, geo_clue2_client_location_updated_data_free, NULL);
118}
119
120static void
121cb_geo_clue2_client_location(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
122{
123 void *user_data = eldbus_pending_data_del(pending, "__user_data");
124 const char *error, *error_msg;
125 Eldbus_Codegen_Property_String_Get_Cb cb = data;
126 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
127 Eldbus_Message_Iter *variant;
128 const char *v;
129 if (eldbus_message_error_get(msg, &error, &error_msg))
130 {
131 Eldbus_Error_Info error_info = {error, error_msg};
132 cb(user_data, pending, "Location", proxy, &error_info, NULL);
133 return;
134 }
135 if (!eldbus_message_arguments_get(msg, "v", &variant))
136 {
137 Eldbus_Error_Info error_info = {"", ""};
138 cb(user_data, pending, "Location", proxy, &error_info, NULL);
139 return;
140 }
141 if (!eldbus_message_iter_arguments_get(variant, "o", &v))
142 {
143 Eldbus_Error_Info error_info = {"", ""};
144 cb(user_data, pending, "Location", proxy, &error_info, NULL);
145 return;
146 }
147 cb(user_data, pending, "Location", proxy, NULL, v);
148}
149
150Eldbus_Pending *
151geo_clue2_client_location_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_String_Get_Cb cb, const void *data)
152{
153 Eldbus_Pending *p;
154 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
155 p = eldbus_proxy_property_get(proxy, "Location", cb_geo_clue2_client_location, cb);
156 if (data)
157 eldbus_pending_data_set(p, "__user_data", data);
158 eldbus_pending_data_set(p, "__proxy", proxy);
159 return p;
160}
161
162static void
163cb_geo_clue2_client_distance_threshold(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
164{
165 void *user_data = eldbus_pending_data_del(pending, "__user_data");
166 const char *error, *error_msg;
167 Eldbus_Codegen_Property_Uint32_Get_Cb cb = data;
168 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
169 Eldbus_Message_Iter *variant;
170 unsigned int v;
171 if (eldbus_message_error_get(msg, &error, &error_msg))
172 {
173 Eldbus_Error_Info error_info = {error, error_msg};
174 cb(user_data, pending, "DistanceThreshold", proxy, &error_info, 0);
175 return;
176 }
177 if (!eldbus_message_arguments_get(msg, "v", &variant))
178 {
179 Eldbus_Error_Info error_info = {"", ""};
180 cb(user_data, pending, "DistanceThreshold", proxy, &error_info, 0);
181 return;
182 }
183 if (!eldbus_message_iter_arguments_get(variant, "u", &v))
184 {
185 Eldbus_Error_Info error_info = {"", ""};
186 cb(user_data, pending, "DistanceThreshold", proxy, &error_info, 0);
187 return;
188 }
189 cb(user_data, pending, "DistanceThreshold", proxy, NULL, v);
190}
191
192Eldbus_Pending *
193geo_clue2_client_distance_threshold_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Uint32_Get_Cb cb, const void *data)
194{
195 Eldbus_Pending *p;
196 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
197 p = eldbus_proxy_property_get(proxy, "DistanceThreshold", cb_geo_clue2_client_distance_threshold, cb);
198 if (data)
199 eldbus_pending_data_set(p, "__user_data", data);
200 eldbus_pending_data_set(p, "__proxy", proxy);
201 return p;
202}
203
204static void
205cb_geo_clue2_client_distance_threshold_set(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
206{
207 const char *error, *error_msg;
208 void *user_data = eldbus_pending_data_del(pending, "__user_data");
209 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
210 Eldbus_Codegen_Property_Set_Cb cb = data;
211 if (eldbus_message_error_get(msg, &error, &error_msg)) {
212 Eldbus_Error_Info error_info = {error, error_msg};
213
214 cb(user_data, "DistanceThreshold", proxy, pending, &error_info);
215 return;
216 }
217 cb(user_data, "DistanceThreshold", proxy, pending, NULL);
218}
219
220Eldbus_Pending *
221geo_clue2_client_distance_threshold_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value)
222{
223 Eldbus_Pending *p;
224 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
225 EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL);
226 p = eldbus_proxy_property_set(proxy, "DistanceThreshold", "u", value, cb_geo_clue2_client_distance_threshold_set, data);
227 eldbus_pending_data_set(p, "__user_data", data);
228 eldbus_pending_data_set(p, "__proxy", proxy);
229 return p;
230}
231
232static void
233cb_geo_clue2_client_desktop_id(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
234{
235 void *user_data = eldbus_pending_data_del(pending, "__user_data");
236 const char *error, *error_msg;
237 Eldbus_Codegen_Property_String_Get_Cb cb = data;
238 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
239 Eldbus_Message_Iter *variant;
240 const char *v;
241 if (eldbus_message_error_get(msg, &error, &error_msg))
242 {
243 Eldbus_Error_Info error_info = {error, error_msg};
244 cb(user_data, pending, "DesktopId", proxy, &error_info, NULL);
245 return;
246 }
247 if (!eldbus_message_arguments_get(msg, "v", &variant))
248 {
249 Eldbus_Error_Info error_info = {"", ""};
250 cb(user_data, pending, "DesktopId", proxy, &error_info, NULL);
251 return;
252 }
253 if (!eldbus_message_iter_arguments_get(variant, "s", &v))
254 {
255 Eldbus_Error_Info error_info = {"", ""};
256 cb(user_data, pending, "DesktopId", proxy, &error_info, NULL);
257 return;
258 }
259 cb(user_data, pending, "DesktopId", proxy, NULL, v);
260}
261
262Eldbus_Pending *
263geo_clue2_client_desktop_id_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_String_Get_Cb cb, const void *data)
264{
265 Eldbus_Pending *p;
266 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
267 p = eldbus_proxy_property_get(proxy, "DesktopId", cb_geo_clue2_client_desktop_id, cb);
268 if (data)
269 eldbus_pending_data_set(p, "__user_data", data);
270 eldbus_pending_data_set(p, "__proxy", proxy);
271 return p;
272}
273
274static void
275cb_geo_clue2_client_desktop_id_set(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
276{
277 const char *error, *error_msg;
278 void *user_data = eldbus_pending_data_del(pending, "__user_data");
279 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
280 Eldbus_Codegen_Property_Set_Cb cb = data;
281 if (eldbus_message_error_get(msg, &error, &error_msg)) {
282 Eldbus_Error_Info error_info = {error, error_msg};
283
284 cb(user_data, "DesktopId", proxy, pending, &error_info);
285 return;
286 }
287 cb(user_data, "DesktopId", proxy, pending, NULL);
288}
289
290Eldbus_Pending *
291geo_clue2_client_desktop_id_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value)
292{
293 Eldbus_Pending *p;
294 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
295 EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL);
296 p = eldbus_proxy_property_set(proxy, "DesktopId", "s", value, cb_geo_clue2_client_desktop_id_set, data);
297 eldbus_pending_data_set(p, "__user_data", data);
298 eldbus_pending_data_set(p, "__proxy", proxy);
299 return p;
300}
301
302static void
303cb_geo_clue2_client_requested_accuracy_level(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
304{
305 void *user_data = eldbus_pending_data_del(pending, "__user_data");
306 const char *error, *error_msg;
307 Eldbus_Codegen_Property_Uint32_Get_Cb cb = data;
308 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
309 Eldbus_Message_Iter *variant;
310 unsigned int v;
311 if (eldbus_message_error_get(msg, &error, &error_msg))
312 {
313 Eldbus_Error_Info error_info = {error, error_msg};
314 cb(user_data, pending, "RequestedAccuracyLevel", proxy, &error_info, 0);
315 return;
316 }
317 if (!eldbus_message_arguments_get(msg, "v", &variant))
318 {
319 Eldbus_Error_Info error_info = {"", ""};
320 cb(user_data, pending, "RequestedAccuracyLevel", proxy, &error_info, 0);
321 return;
322 }
323 if (!eldbus_message_iter_arguments_get(variant, "u", &v))
324 {
325 Eldbus_Error_Info error_info = {"", ""};
326 cb(user_data, pending, "RequestedAccuracyLevel", proxy, &error_info, 0);
327 return;
328 }
329 cb(user_data, pending, "RequestedAccuracyLevel", proxy, NULL, v);
330}
331
332Eldbus_Pending *
333geo_clue2_client_requested_accuracy_level_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Uint32_Get_Cb cb, const void *data)
334{
335 Eldbus_Pending *p;
336 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
337 p = eldbus_proxy_property_get(proxy, "RequestedAccuracyLevel", cb_geo_clue2_client_requested_accuracy_level, cb);
338 if (data)
339 eldbus_pending_data_set(p, "__user_data", data);
340 eldbus_pending_data_set(p, "__proxy", proxy);
341 return p;
342}
343
344static void
345cb_geo_clue2_client_requested_accuracy_level_set(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
346{
347 const char *error, *error_msg;
348 void *user_data = eldbus_pending_data_del(pending, "__user_data");
349 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
350 Eldbus_Codegen_Property_Set_Cb cb = data;
351 if (eldbus_message_error_get(msg, &error, &error_msg)) {
352 Eldbus_Error_Info error_info = {error, error_msg};
353
354 cb(user_data, "RequestedAccuracyLevel", proxy, pending, &error_info);
355 return;
356 }
357 cb(user_data, "RequestedAccuracyLevel", proxy, pending, NULL);
358}
359
360Eldbus_Pending *
361geo_clue2_client_requested_accuracy_level_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value)
362{
363 Eldbus_Pending *p;
364 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
365 EINA_SAFETY_ON_NULL_RETURN_VAL(value, NULL);
366 p = eldbus_proxy_property_set(proxy, "RequestedAccuracyLevel", "u", value, cb_geo_clue2_client_requested_accuracy_level_set, data);
367 eldbus_pending_data_set(p, "__user_data", data);
368 eldbus_pending_data_set(p, "__proxy", proxy);
369 return p;
370}
371
372static void
373cb_geo_clue2_client_active(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
374{
375 void *user_data = eldbus_pending_data_del(pending, "__user_data");
376 const char *error, *error_msg;
377 Eldbus_Codegen_Property_Bool_Get_Cb cb = data;
378 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
379 Eldbus_Message_Iter *variant;
380 Eina_Bool v;
381 if (eldbus_message_error_get(msg, &error, &error_msg))
382 {
383 Eldbus_Error_Info error_info = {error, error_msg};
384 cb(user_data, pending, "Active", proxy, &error_info, 0);
385 return;
386 }
387 if (!eldbus_message_arguments_get(msg, "v", &variant))
388 {
389 Eldbus_Error_Info error_info = {"", ""};
390 cb(user_data, pending, "Active", proxy, &error_info, 0);
391 return;
392 }
393 if (!eldbus_message_iter_arguments_get(variant, "b", &v))
394 {
395 Eldbus_Error_Info error_info = {"", ""};
396 cb(user_data, pending, "Active", proxy, &error_info, 0);
397 return;
398 }
399 cb(user_data, pending, "Active", proxy, NULL, v);
400}
401
402Eldbus_Pending *
403geo_clue2_client_active_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Bool_Get_Cb cb, const void *data)
404{
405 Eldbus_Pending *p;
406 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
407 p = eldbus_proxy_property_get(proxy, "Active", cb_geo_clue2_client_active, cb);
408 if (data)
409 eldbus_pending_data_set(p, "__user_data", data);
410 eldbus_pending_data_set(p, "__proxy", proxy);
411 return p;
412}
413
414void
415geo_clue2_client_log_domain_set(int id)
416{
417 _log_main = id;
418}
419
420void
421geo_clue2_client_proxy_unref(Eldbus_Proxy *proxy)
422{
423 Eldbus_Object *obj = eldbus_proxy_object_get(proxy);
424 eldbus_proxy_unref(proxy);
425 eldbus_object_unref(obj);
426}
427
428Eldbus_Proxy *
429geo_clue2_client_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path)
430{
431 Eldbus_Object *obj;
432 Eldbus_Proxy *proxy;
433 EINA_SAFETY_ON_NULL_RETURN_VAL(conn, NULL);
434 EINA_SAFETY_ON_NULL_RETURN_VAL(bus, NULL);
435 if (!path) path = "/";
436 obj = eldbus_object_get(conn, bus, path);
437 proxy = eldbus_proxy_get(obj, "org.freedesktop.GeoClue2.Client");
438 eldbus_proxy_signal_handler_add(proxy, "LocationUpdated", on_geo_clue2_client_location_updated, proxy);
439 if (!GEO_CLUE2_CLIENT_LOCATION_UPDATED_EVENT)
440 GEO_CLUE2_CLIENT_LOCATION_UPDATED_EVENT = ecore_event_type_new();
441 return proxy;
442}
diff --git a/src/lib/elocation/gen/eldbus_geo_clue2_client.h b/src/lib/elocation/gen/eldbus_geo_clue2_client.h
new file mode 100644
index 0000000..5f73069
--- /dev/null
+++ b/src/lib/elocation/gen/eldbus_geo_clue2_client.h
@@ -0,0 +1,32 @@
1#ifndef ELDBUS_GEO_CLUE2_CLIENT_H
2#define ELDBUS_GEO_CLUE2_CLIENT_H
3
4#include <Eina.h>
5#include <Ecore.h>
6#include <Eldbus.h>
7#include "eldbus_utils.h"
8
9Eldbus_Proxy *geo_clue2_client_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path);
10void geo_clue2_client_proxy_unref(Eldbus_Proxy *proxy);
11void geo_clue2_client_log_domain_set(int id);
12typedef void (*Geo_Clue2_Client_Start_Cb)(Eldbus_Proxy *proxy, void *data, Eldbus_Pending *pending, Eldbus_Error_Info *error);
13Eldbus_Pending *geo_clue2_client_start_call(Eldbus_Proxy *proxy, Geo_Clue2_Client_Start_Cb cb, const void *data);
14typedef void (*Geo_Clue2_Client_Stop_Cb)(Eldbus_Proxy *proxy, void *data, Eldbus_Pending *pending, Eldbus_Error_Info *error);
15Eldbus_Pending *geo_clue2_client_stop_call(Eldbus_Proxy *proxy, Geo_Clue2_Client_Stop_Cb cb, const void *data);
16extern int GEO_CLUE2_CLIENT_LOCATION_UPDATED_EVENT;
17typedef struct _Geo_Clue2_Client_LocationUpdated_Data
18{
19 Eldbus_Proxy *proxy;
20 char *old;
21 char *new;
22} Geo_Clue2_Client_LocationUpdated_Data;
23Eldbus_Pending *geo_clue2_client_location_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_String_Get_Cb cb, const void *data);
24Eldbus_Pending *geo_clue2_client_distance_threshold_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Uint32_Get_Cb cb, const void *data);
25Eldbus_Pending *geo_clue2_client_distance_threshold_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value);
26Eldbus_Pending *geo_clue2_client_desktop_id_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_String_Get_Cb cb, const void *data);
27Eldbus_Pending *geo_clue2_client_desktop_id_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value);
28Eldbus_Pending *geo_clue2_client_requested_accuracy_level_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Uint32_Get_Cb cb, const void *data);
29Eldbus_Pending *geo_clue2_client_requested_accuracy_level_propset(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Set_Cb cb, const void *data, const void *value);
30Eldbus_Pending *geo_clue2_client_active_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Bool_Get_Cb cb, const void *data);
31
32#endif
diff --git a/src/lib/elocation/gen/eldbus_geo_clue2_location.c b/src/lib/elocation/gen/eldbus_geo_clue2_location.c
new file mode 100644
index 0000000..53dbf3c
--- /dev/null
+++ b/src/lib/elocation/gen/eldbus_geo_clue2_location.c
@@ -0,0 +1,242 @@
1#include "eldbus_geo_clue2_location.h"
2
3static int _log_main = -1;
4#undef ERR
5#define ERR(...) EINA_LOG_DOM_ERR(_log_main, __VA_ARGS__);
6
7static void
8cb_geo_clue2_location_latitude(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
9{
10 void *user_data = eldbus_pending_data_del(pending, "__user_data");
11 const char *error, *error_msg;
12 Eldbus_Codegen_Property_Double_Get_Cb cb = data;
13 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
14 Eldbus_Message_Iter *variant;
15 double v;
16 if (eldbus_message_error_get(msg, &error, &error_msg))
17 {
18 Eldbus_Error_Info error_info = {error, error_msg};
19 cb(user_data, pending, "Latitude", proxy, &error_info, 0);
20 return;
21 }
22 if (!eldbus_message_arguments_get(msg, "v", &variant))
23 {
24 Eldbus_Error_Info error_info = {"", ""};
25 cb(user_data, pending, "Latitude", proxy, &error_info, 0);
26 return;
27 }
28 if (!eldbus_message_iter_arguments_get(variant, "d", &v))
29 {
30 Eldbus_Error_Info error_info = {"", ""};
31 cb(user_data, pending, "Latitude", proxy, &error_info, 0);
32 return;
33 }
34 cb(user_data, pending, "Latitude", proxy, NULL, v);
35}
36
37Eldbus_Pending *
38geo_clue2_location_latitude_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data)
39{
40 Eldbus_Pending *p;
41 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
42 p = eldbus_proxy_property_get(proxy, "Latitude", cb_geo_clue2_location_latitude, cb);
43 if (data)
44 eldbus_pending_data_set(p, "__user_data", data);
45 eldbus_pending_data_set(p, "__proxy", proxy);
46 return p;
47}
48
49static void
50cb_geo_clue2_location_longitude(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
51{
52 void *user_data = eldbus_pending_data_del(pending, "__user_data");
53 const char *error, *error_msg;
54 Eldbus_Codegen_Property_Double_Get_Cb cb = data;
55 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
56 Eldbus_Message_Iter *variant;
57 double v;
58 if (eldbus_message_error_get(msg, &error, &error_msg))
59 {
60 Eldbus_Error_Info error_info = {error, error_msg};
61 cb(user_data, pending, "Longitude", proxy, &error_info, 0);
62 return;
63 }
64 if (!eldbus_message_arguments_get(msg, "v", &variant))
65 {
66 Eldbus_Error_Info error_info = {"", ""};
67 cb(user_data, pending, "Longitude", proxy, &error_info, 0);
68 return;
69 }
70 if (!eldbus_message_iter_arguments_get(variant, "d", &v))
71 {
72 Eldbus_Error_Info error_info = {"", ""};
73 cb(user_data, pending, "Longitude", proxy, &error_info, 0);
74 return;
75 }
76 cb(user_data, pending, "Longitude", proxy, NULL, v);
77}
78
79Eldbus_Pending *
80geo_clue2_location_longitude_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data)
81{
82 Eldbus_Pending *p;
83 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
84 p = eldbus_proxy_property_get(proxy, "Longitude", cb_geo_clue2_location_longitude, cb);
85 if (data)
86 eldbus_pending_data_set(p, "__user_data", data);
87 eldbus_pending_data_set(p, "__proxy", proxy);
88 return p;
89}
90
91static void
92cb_geo_clue2_location_accuracy(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
93{
94 void *user_data = eldbus_pending_data_del(pending, "__user_data");
95 const char *error, *error_msg;
96 Eldbus_Codegen_Property_Double_Get_Cb cb = data;
97 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
98 Eldbus_Message_Iter *variant;
99 double v;
100 if (eldbus_message_error_get(msg, &error, &error_msg))
101 {
102 Eldbus_Error_Info error_info = {error, error_msg};
103 cb(user_data, pending, "Accuracy", proxy, &error_info, 0);
104 return;
105 }
106 if (!eldbus_message_arguments_get(msg, "v", &variant))
107 {
108 Eldbus_Error_Info error_info = {"", ""};
109 cb(user_data, pending, "Accuracy", proxy, &error_info, 0);
110 return;
111 }
112 if (!eldbus_message_iter_arguments_get(variant, "d", &v))
113 {
114 Eldbus_Error_Info error_info = {"", ""};
115 cb(user_data, pending, "Accuracy", proxy, &error_info, 0);
116 return;
117 }
118 cb(user_data, pending, "Accuracy", proxy, NULL, v);
119}
120
121Eldbus_Pending *
122geo_clue2_location_accuracy_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data)
123{
124 Eldbus_Pending *p;
125 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
126 p = eldbus_proxy_property_get(proxy, "Accuracy", cb_geo_clue2_location_accuracy, cb);
127 if (data)
128 eldbus_pending_data_set(p, "__user_data", data);
129 eldbus_pending_data_set(p, "__proxy", proxy);
130 return p;
131}
132
133static void
134cb_geo_clue2_location_altitude(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
135{
136 void *user_data = eldbus_pending_data_del(pending, "__user_data");
137 const char *error, *error_msg;
138 Eldbus_Codegen_Property_Double_Get_Cb cb = data;
139 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
140 Eldbus_Message_Iter *variant;
141 double v;
142 if (eldbus_message_error_get(msg, &error, &error_msg))
143 {
144 Eldbus_Error_Info error_info = {error, error_msg};
145 cb(user_data, pending, "Altitude", proxy, &error_info, 0);
146 return;
147 }
148 if (!eldbus_message_arguments_get(msg, "v", &variant))
149 {
150 Eldbus_Error_Info error_info = {"", ""};
151 cb(user_data, pending, "Altitude", proxy, &error_info, 0);
152 return;
153 }
154 if (!eldbus_message_iter_arguments_get(variant, "d", &v))
155 {
156 Eldbus_Error_Info error_info = {"", ""};
157 cb(user_data, pending, "Altitude", proxy, &error_info, 0);
158 return;
159 }
160 cb(user_data, pending, "Altitude", proxy, NULL, v);
161}
162
163Eldbus_Pending *
164geo_clue2_location_altitude_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data)
165{
166 Eldbus_Pending *p;
167 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
168 p = eldbus_proxy_property_get(proxy, "Altitude", cb_geo_clue2_location_altitude, cb);
169 if (data)
170 eldbus_pending_data_set(p, "__user_data", data);
171 eldbus_pending_data_set(p, "__proxy", proxy);
172 return p;
173}
174
175static void
176cb_geo_clue2_location_description(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
177{
178 void *user_data = eldbus_pending_data_del(pending, "__user_data");
179 const char *error, *error_msg;
180 Eldbus_Codegen_Property_String_Get_Cb cb = data;
181 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
182 Eldbus_Message_Iter *variant;
183 const char *v;
184 if (eldbus_message_error_get(msg, &error, &error_msg))
185 {
186 Eldbus_Error_Info error_info = {error, error_msg};
187 cb(user_data, pending, "Description", proxy, &error_info, NULL);
188 return;
189 }
190 if (!eldbus_message_arguments_get(msg, "v", &variant))
191 {
192 Eldbus_Error_Info error_info = {"", ""};
193 cb(user_data, pending, "Description", proxy, &error_info, NULL);
194 return;
195 }
196 if (!eldbus_message_iter_arguments_get(variant, "s", &v))
197 {
198 Eldbus_Error_Info error_info = {"", ""};
199 cb(user_data, pending, "Description", proxy, &error_info, NULL);
200 return;
201 }
202 cb(user_data, pending, "Description", proxy, NULL, v);
203}
204
205Eldbus_Pending *
206geo_clue2_location_description_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_String_Get_Cb cb, const void *data)
207{
208 Eldbus_Pending *p;
209 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
210 p = eldbus_proxy_property_get(proxy, "Description", cb_geo_clue2_location_description, cb);
211 if (data)
212 eldbus_pending_data_set(p, "__user_data", data);
213 eldbus_pending_data_set(p, "__proxy", proxy);
214 return p;
215}
216
217void
218geo_clue2_location_log_domain_set(int id)
219{
220 _log_main = id;
221}
222
223void
224geo_clue2_location_proxy_unref(Eldbus_Proxy *proxy)
225{
226 Eldbus_Object *obj = eldbus_proxy_object_get(proxy);
227 eldbus_proxy_unref(proxy);
228 eldbus_object_unref(obj);
229}
230
231Eldbus_Proxy *
232geo_clue2_location_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path)
233{
234 Eldbus_Object *obj;
235 Eldbus_Proxy *proxy;
236 EINA_SAFETY_ON_NULL_RETURN_VAL(conn, NULL);
237 EINA_SAFETY_ON_NULL_RETURN_VAL(bus, NULL);
238 if (!path) path = "/";
239 obj = eldbus_object_get(conn, bus, path);
240 proxy = eldbus_proxy_get(obj, "org.freedesktop.GeoClue2.Location");
241 return proxy;
242}
diff --git a/src/lib/elocation/gen/eldbus_geo_clue2_location.h b/src/lib/elocation/gen/eldbus_geo_clue2_location.h
new file mode 100644
index 0000000..38793a1
--- /dev/null
+++ b/src/lib/elocation/gen/eldbus_geo_clue2_location.h
@@ -0,0 +1,18 @@
1#ifndef ELDBUS_GEO_CLUE2_LOCATION_H
2#define ELDBUS_GEO_CLUE2_LOCATION_H
3
4#include <Eina.h>
5#include <Ecore.h>
6#include <Eldbus.h>
7#include "eldbus_utils.h"
8
9Eldbus_Proxy *geo_clue2_location_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path);
10void geo_clue2_location_proxy_unref(Eldbus_Proxy *proxy);
11void geo_clue2_location_log_domain_set(int id);
12Eldbus_Pending *geo_clue2_location_latitude_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data);
13Eldbus_Pending *geo_clue2_location_longitude_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data);
14Eldbus_Pending *geo_clue2_location_accuracy_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data);
15Eldbus_Pending *geo_clue2_location_altitude_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Double_Get_Cb cb, const void *data);
16Eldbus_Pending *geo_clue2_location_description_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_String_Get_Cb cb, const void *data);
17
18#endif \ No newline at end of file
diff --git a/src/lib/elocation/gen/eldbus_geo_clue2_manager.c b/src/lib/elocation/gen/eldbus_geo_clue2_manager.c
new file mode 100644
index 0000000..1fea889
--- /dev/null
+++ b/src/lib/elocation/gen/eldbus_geo_clue2_manager.c
@@ -0,0 +1,203 @@
1#include "eldbus_geo_clue2_manager.h"
2
3static int _log_main = -1;
4#undef ERR
5#define ERR(...) EINA_LOG_DOM_ERR(_log_main, __VA_ARGS__);
6
7static void
8cb_geo_clue2_manager_get_client(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
9{
10 void *user_data = eldbus_pending_data_del(pending, "__user_data");
11 Geo_Clue2_Manager_Get_Client_Cb cb = data;
12 const char *error, *error_msg;
13 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
14 const char *client = NULL;
15 if (eldbus_message_error_get(msg, &error, &error_msg))
16 {
17 Eldbus_Error_Info error_info = {error, error_msg};
18 cb(proxy, user_data, pending, &error_info, client);
19 return;
20 }
21 if (!eldbus_message_arguments_get(msg, "o", &client))
22 {
23 Eldbus_Error_Info error_info = {"", ""};
24 ERR("Error: Getting arguments from message.");
25 cb(proxy, user_data, pending, &error_info, client);
26 return;
27 }
28 cb(proxy, user_data, pending, NULL, client);
29 return;
30}
31
32Eldbus_Pending *
33geo_clue2_manager_get_client_call(Eldbus_Proxy *proxy, Geo_Clue2_Manager_Get_Client_Cb cb, const void *data)
34{
35 Eldbus_Message *msg;
36 Eldbus_Pending *p;
37 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
38 msg = eldbus_proxy_method_call_new(proxy, "GetClient");
39 if (!eldbus_message_arguments_append(msg, ""))
40 {
41 ERR("Error: Filling message.");
42 return NULL;
43 }
44 p = eldbus_proxy_send(proxy, msg, cb_geo_clue2_manager_get_client, cb, -1);
45 if (data)
46 eldbus_pending_data_set(p, "__user_data", data);
47 eldbus_pending_data_set(p, "__proxy", proxy);
48 return p;
49}
50
51static void
52cb_geo_clue2_manager_add_agent(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
53{
54 void *user_data = eldbus_pending_data_del(pending, "__user_data");
55 Geo_Clue2_Manager_Add_Agent_Cb cb = data;
56 const char *error, *error_msg;
57 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
58 if (eldbus_message_error_get(msg, &error, &error_msg))
59 {
60 Eldbus_Error_Info error_info = {error, error_msg};
61 cb(proxy, user_data, pending, &error_info);
62 return;
63 }
64 if (!eldbus_message_arguments_get(msg, ""))
65 {
66 Eldbus_Error_Info error_info = {"", ""};
67 ERR("Error: Getting arguments from message.");
68 cb(proxy, user_data, pending, &error_info);
69 return;
70 }
71 cb(proxy, user_data, pending, NULL);
72 return;
73}
74
75Eldbus_Pending *
76geo_clue2_manager_add_agent_call(Eldbus_Proxy *proxy, Geo_Clue2_Manager_Add_Agent_Cb cb, const void *data, const char *id)
77{
78 Eldbus_Message *msg;
79 Eldbus_Pending *p;
80 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
81 msg = eldbus_proxy_method_call_new(proxy, "AddAgent");
82 if (!eldbus_message_arguments_append(msg, "s", id))
83 {
84 ERR("Error: Filling message.");
85 return NULL;
86 }
87 p = eldbus_proxy_send(proxy, msg, cb_geo_clue2_manager_add_agent, cb, -1);
88 if (data)
89 eldbus_pending_data_set(p, "__user_data", data);
90 eldbus_pending_data_set(p, "__proxy", proxy);
91 return p;
92}
93
94static void
95cb_geo_clue2_manager_in_use(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
96{
97 void *user_data = eldbus_pending_data_del(pending, "__user_data");
98 const char *error, *error_msg;
99 Eldbus_Codegen_Property_Bool_Get_Cb cb = data;
100 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
101 Eldbus_Message_Iter *variant;
102 Eina_Bool v;
103 if (eldbus_message_error_get(msg, &error, &error_msg))
104 {
105 Eldbus_Error_Info error_info = {error, error_msg};
106 cb(user_data, pending, "InUse", proxy, &error_info, 0);
107 return;
108 }
109 if (!eldbus_message_arguments_get(msg, "v", &variant))
110 {
111 Eldbus_Error_Info error_info = {"", ""};
112 cb(user_data, pending, "InUse", proxy, &error_info, 0);
113 return;
114 }
115 if (!eldbus_message_iter_arguments_get(variant, "b", &v))
116 {
117 Eldbus_Error_Info error_info = {"", ""};
118 cb(user_data, pending, "InUse", proxy, &error_info, 0);
119 return;
120 }
121 cb(user_data, pending, "InUse", proxy, NULL, v);
122}
123
124Eldbus_Pending *
125geo_clue2_manager_in_use_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Bool_Get_Cb cb, const void *data)
126{
127 Eldbus_Pending *p;
128 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
129 p = eldbus_proxy_property_get(proxy, "InUse", cb_geo_clue2_manager_in_use, cb);
130 if (data)
131 eldbus_pending_data_set(p, "__user_data", data);
132 eldbus_pending_data_set(p, "__proxy", proxy);
133 return p;
134}
135
136static void
137cb_geo_clue2_manager_available_accuracy_level(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
138{
139 void *user_data = eldbus_pending_data_del(pending, "__user_data");
140 const char *error, *error_msg;
141 Eldbus_Codegen_Property_Uint32_Get_Cb cb = data;
142 Eldbus_Proxy *proxy = eldbus_pending_data_del(pending, "__proxy");
143 Eldbus_Message_Iter *variant;
144 unsigned int v;
145 if (eldbus_message_error_get(msg, &error, &error_msg))
146 {
147 Eldbus_Error_Info error_info = {error, error_msg};
148 cb(user_data, pending, "AvailableAccuracyLevel", proxy, &error_info, 0);
149 return;
150 }
151 if (!eldbus_message_arguments_get(msg, "v", &variant))
152 {
153 Eldbus_Error_Info error_info = {"", ""};
154 cb(user_data, pending, "AvailableAccuracyLevel", proxy, &error_info, 0);
155 return;
156 }
157 if (!eldbus_message_iter_arguments_get(variant, "u", &v))
158 {
159 Eldbus_Error_Info error_info = {"", ""};
160 cb(user_data, pending, "AvailableAccuracyLevel", proxy, &error_info, 0);
161 return;
162 }
163 cb(user_data, pending, "AvailableAccuracyLevel", proxy, NULL, v);
164}
165
166Eldbus_Pending *
167geo_clue2_manager_available_accuracy_level_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Uint32_Get_Cb cb, const void *data)
168{
169 Eldbus_Pending *p;
170 EINA_SAFETY_ON_NULL_RETURN_VAL(proxy, NULL);
171 p = eldbus_proxy_property_get(proxy, "AvailableAccuracyLevel", cb_geo_clue2_manager_available_accuracy_level, cb);
172 if (data)
173 eldbus_pending_data_set(p, "__user_data", data);
174 eldbus_pending_data_set(p, "__proxy", proxy);
175 return p;
176}
177
178void
179geo_clue2_manager_log_domain_set(int id)
180{
181 _log_main = id;
182}
183
184void
185geo_clue2_manager_proxy_unref(Eldbus_Proxy *proxy)
186{
187 Eldbus_Object *obj = eldbus_proxy_object_get(proxy);
188 eldbus_proxy_unref(proxy);
189 eldbus_object_unref(obj);
190}
191
192Eldbus_Proxy *
193geo_clue2_manager_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path)
194{
195 Eldbus_Object *obj;
196 Eldbus_Proxy *proxy;
197 EINA_SAFETY_ON_NULL_RETURN_VAL(conn, NULL);
198 EINA_SAFETY_ON_NULL_RETURN_VAL(bus, NULL);
199 if (!path) path = "/";
200 obj = eldbus_object_get(conn, bus, path);
201 proxy = eldbus_proxy_get(obj, "org.freedesktop.GeoClue2.Manager");
202 return proxy;
203}
diff --git a/src/lib/elocation/gen/eldbus_geo_clue2_manager.h b/src/lib/elocation/gen/eldbus_geo_clue2_manager.h
new file mode 100644
index 0000000..b96323a
--- /dev/null
+++ b/src/lib/elocation/gen/eldbus_geo_clue2_manager.h
@@ -0,0 +1,19 @@
1#ifndef ELDBUS_GEO_CLUE2_MANAGER_H
2#define ELDBUS_GEO_CLUE2_MANAGER_H
3
4#include <Eina.h>
5#include <Ecore.h>
6#include <Eldbus.h>
7#include "eldbus_utils.h"
8
9Eldbus_Proxy *geo_clue2_manager_proxy_get(Eldbus_Connection *conn, const char *bus, const char *path);
10void geo_clue2_manager_proxy_unref(Eldbus_Proxy *proxy);
11void geo_clue2_manager_log_domain_set(int id);
12typedef void (*Geo_Clue2_Manager_Get_Client_Cb)(Eldbus_Proxy *proxy, void *data, Eldbus_Pending *pending, Eldbus_Error_Info *error, const char *client);
13Eldbus_Pending *geo_clue2_manager_get_client_call(Eldbus_Proxy *proxy, Geo_Clue2_Manager_Get_Client_Cb cb, const void *data);
14typedef void (*Geo_Clue2_Manager_Add_Agent_Cb)(Eldbus_Proxy *proxy, void *data, Eldbus_Pending *pending, Eldbus_Error_Info *error);
15Eldbus_Pending *geo_clue2_manager_add_agent_call(Eldbus_Proxy *proxy, Geo_Clue2_Manager_Add_Agent_Cb cb, const void *data, const char *id);
16Eldbus_Pending *geo_clue2_manager_in_use_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Bool_Get_Cb cb, const void *data);
17Eldbus_Pending *geo_clue2_manager_available_accuracy_level_propget(Eldbus_Proxy *proxy, Eldbus_Codegen_Property_Uint32_Get_Cb cb, const void *data);
18
19#endif \ No newline at end of file
diff --git a/src/lib/elocation/gen/eldbus_utils.h b/src/lib/elocation/gen/eldbus_utils.h
new file mode 100644
index 0000000..db4f9ae
--- /dev/null
+++ b/src/lib/elocation/gen/eldbus_utils.h
@@ -0,0 +1,24 @@
1#ifndef ELDBUS_UTILS_H
2#define ELDBUS_UTILS_H 1
3
4typedef struct _Eldbus_Error_Info
5{
6 const char *error;
7 const char *message;
8} Eldbus_Error_Info;
9
10typedef void (*Eldbus_Codegen_Property_Set_Cb)(void *data, const char *propname, Eldbus_Proxy *proxy, Eldbus_Pending *p, Eldbus_Error_Info *error_info);
11
12typedef void (*Eldbus_Codegen_Property_String_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, const char *value);
13typedef void (*Eldbus_Codegen_Property_Int32_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, int value);
14typedef void (*Eldbus_Codegen_Property_Byte_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned char value);
15typedef void (*Eldbus_Codegen_Property_Bool_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, Eina_Bool value);
16typedef void (*Eldbus_Codegen_Property_Int16_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, short int value);
17typedef void (*Eldbus_Codegen_Property_Uint16_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned short int value);
18typedef void (*Eldbus_Codegen_Property_Uint32_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, unsigned int value);
19typedef void (*Eldbus_Codegen_Property_Double_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, double value);
20typedef void (*Eldbus_Codegen_Property_Int64_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, int64_t value);
21typedef void (*Eldbus_Codegen_Property_Uint64_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, uint64_t value);
22typedef void (*Eldbus_Codegen_Property_Complex_Get_Cb)(void *data, Eldbus_Pending *p, const char *propname, Eldbus_Proxy *proxy, Eldbus_Error_Info *error_info, Eina_Value *value);
23
24#endif \ No newline at end of file
diff --git a/src/lib/elocation/gen/org.freedesktop.GeoClue2.xml b/src/lib/elocation/gen/org.freedesktop.GeoClue2.xml
new file mode 100644
index 0000000..ab14565
--- /dev/null
+++ b/src/lib/elocation/gen/org.freedesktop.GeoClue2.xml
@@ -0,0 +1,199 @@
1<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
2"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
3
4<!--
5 GeoClue 2.0 Interface Specification
6
7 Copyright (C) 2013 Red Hat, Inc.
8-->
9
10<node>
11
12 <!--
13 org.freedesktop.GeoClue2.Manager:
14 @short_description: The GeoClue service manager
15
16 This is the interface you use to talk to main GeoClue2 manager object at
17 path "/org/freedesktop/GeoClue2/Manager". The only thing you do with this
18 interface is to call org.freedesktop.GeoClue2.Manager.GetClient() on it
19 to get your application specific client object.
20 -->
21 <interface name="org.freedesktop.GeoClue2.Manager">
22 <!--
23 InUse:
24
25 Whether service is currently is use by any application.
26 -->
27 <property name="InUse" type="b" access="read"/>
28
29 <!--
30 AvailableAccuracyLevel:
31
32 The level of available accuracy, as
33 <link linkend="GClueAccuracyLevel">GClueAccuracyLevel</link>.
34 -->
35 <property name="AvailableAccuracyLevel" type="u" access="read"/>
36
37 <!--
38 GetClient:
39 @client: The path for newly created client object
40
41 Retrieves a client object which can only be used by the calling
42 application only.
43 -->
44 <method name="GetClient">
45 <arg name="client" type="o" direction="out"/>
46 </method>
47
48 <!--
49 AddAgent:
50 @id: The Desktop ID (excluding .desktop) of the agent
51
52 An API for user authorization agents to register themselves. Each agent
53 is responsible for the user it is running as. Application developers
54 can and should simply ignore this API.
55 -->
56 <method name="AddAgent">
57 <arg name="id" type="s" direction="in"/>
58 </method>
59 </interface>
60
61 <!--
62 org.freedesktop.GeoClue2.Client:
63 @short_description: The Application-specific client API
64
65 This is the interface you use to retrieve location information and receive
66 location update signals from GeoClue service. You get the client object to
67 use this interface on from org.freedesktop.GeoClue2.Manager.GetClient()
68 method.
69 -->
70 <interface name="org.freedesktop.GeoClue2.Client">
71 <!--
72 Location:
73
74 Current location as path to a #org.freedesktop.GeoClue2.Location object.
75 -->
76 <property name="Location" type="o" access="read"/>
77
78 <!--
79 DistanceThreshold:
80
81 Contains the current distance threshold in meters. This value is used
82 by the service when it gets new location info. If the distance moved is
83 below the threshold, it won't emit the LocationUpdated signal.
84 -->
85 <property name="DistanceThreshold" type="u" access="readwrite"/>
86
87 <!--
88 DesktopId:
89
90 The desktop file id (the basename of the desktop file). This property
91 must be set by applications for authorization to work.
92 -->
93 <property name="DesktopId" type="s" access="readwrite"/>
94
95 <!--
96 RequestedAccuracyLevel:
97
98 The level of accuracy requested by client, as
99 <link linkend="GClueAccuracyLevel">GClueAccuracyLevel</link>.
100
101 Please keep in mind that the actual accuracy of location information is
102 dependent on available hardware on your machine, external resources
103 and/or how much accuracy user agrees to be confortable with.
104 -->
105 <property name="RequestedAccuracyLevel" type="u" access="readwrite"/>
106
107 <!--
108 Active:
109
110 If client is active, i-e started successfully using
111 org.freedesktop.GeoClue2.Client.Start() and receiving location updates.
112
113 Please keep in mind that geoclue can at any time stop and start the
114 client on user (agent) request. Applications that are interested in
115 in these changes, should watch for changes in this property.
116 -->
117 <property name="Active" type="b" access="read"/>
118
119 <!--
120 Start:
121
122 Start receiving events about the current location. Applications should
123 hook-up to #org.freedesktop.GeoClue2.Client::LocationUpdated signal
124 before calling this method.
125 -->
126 <method name="Start"/>
127
128 <!--
129 Stop:
130
131 Stop receiving events about the current location.
132 -->
133 <method name="Stop"/>
134
135 <!--
136 LocationUpdated:
137 @old: old location as path to a #org.freedesktop.GeoClue2.Location object
138 @new: new location as path to a #org.freedesktop.GeoClue2.Location object
139
140 The signal is emitted every time the location changes.
141 The client should set the DistanceThreshold property to control how
142 often this signal is emitted.
143 -->
144 <signal name="LocationUpdated">
145 <arg name="old" type="o"/>
146 <arg name="new" type="o"/>
147 </signal>
148 </interface>
149
150 <!--
151 org.freedesktop.GeoClue2.Location:
152 @short_description: The Location interface
153
154 This is the interface you use on location objects.
155 -->
156 <interface name="org.freedesktop.GeoClue2.Location">
157
158 <!--
159 Latitude:
160
161 The latitude of the location, in degrees.
162 -->
163 <property name="Latitude" type="d" access="read"/>
164
165 <!--
166 Longitude:
167
168 The longitude of the location, in degrees.
169 -->
170 <property name="Longitude" type="d" access="read"/>
171
172 <!--
173 Accuracy:
174
175 The accuracy of the location fix, in meters.
176 -->
177 <property name="Accuracy" type="d" access="read"/>
178
179 <!--
180 Altitude:
181
182 The altitude of the location fix, in meters. When unknown, its set to
183 minimum double value, -1.7976931348623157e+308.
184 -->
185 <property name="Altitude" type="d" access="read"/>
186
187 <!--
188 Description:
189
190 A human-readable description of the location, if available.
191
192 WARNING: Applications should not rely on this property since not all
193 sources provide a description. If you really need a description (or
194 more details) about current location, use a reverse-geocoding API, e.g
195 geocode-glib.
196 -->
197 <property name="Description" type="s" access="read"/>
198 </interface>
199</node>