From: Enlightenment S. <no-...@en...> - 2012-10-15 14:56:44
|
Log: PROTO/elocation: Do the magic to get the meta provider working. A set of requirements needs to be given to the meta provider to choose the best one internally. After that one also has to start the address and position provider. No idea why actually. Author: stefan Date: 2012-10-15 07:56:36 -0700 (Mon, 15 Oct 2012) New Revision: 78001 Trac: http://trac.enlightenment.org/e/changeset/78001 Modified: trunk/PROTO/elocation/src/lib/elocation.c Modified: trunk/PROTO/elocation/src/lib/elocation.c =================================================================== --- trunk/PROTO/elocation/src/lib/elocation.c 2012-10-15 14:56:30 UTC (rev 78000) +++ trunk/PROTO/elocation/src/lib/elocation.c 2012-10-15 14:56:36 UTC (rev 78001) @@ -283,11 +283,18 @@ } static void +_dummy_cb(void *data, const EDBus_Message *msg, EDBus_Pending *pending) +{ +} + +static void create_cb(void *data, const EDBus_Message *reply, EDBus_Pending *pending) { const char *object_path; const char *signature; EDBus_Pending *pending1, *pending2; + Eina_Bool updates; + int accur_level, time, resources; signature = edbus_message_signature_get(reply); if (strcmp(signature, "o")) @@ -338,6 +345,17 @@ return; } + /* Send Geoclue a set of requirements we have for the provider and start the address and position + * meta provider afterwards. After this we should be ready for operation. */ + updates = EINA_FALSE; /* Especially the web providers do not offer updates */ + accur_level = ELOCATION_ACCURACY_LEVEL_COUNTRY; + time = 0; /* Still need to figure out what this is used for */ + resources = ELOCATION_RESOURCE_ALL; + + edbus_proxy_call(meta_masterclient, "SetRequirements", _dummy_cb, NULL, -1, "iibi", accur_level, time, updates, resources); + edbus_proxy_call(meta_masterclient, "AddressStart", _dummy_cb, NULL, -1, ""); + edbus_proxy_call(meta_masterclient, "PositionStart", _dummy_cb, NULL, -1, ""); + pending1 = edbus_proxy_call(meta_geoclue, "AddReference", _reference_add_cb, NULL, -1, ""); if (!pending1) { |