#ifndef EFL_BETA_API_SUPPORT
# define EFL_BETA_API_SUPPORT
#endif
#include <Elementary.h>
#ifdef ELM_ELOCATION
#endif
static Evas_Object *pos_label, *addr_label, *box, *win;
#ifdef ELM_ELOCATION
static void
{
char buffer[1024];
if (!position) return;
snprintf(buffer, sizeof(buffer),
"<b>### Position Detail ###</b><br/>"
"<b>GeoClue position reply with data from timestamp</b> %i<br/>"
"<b>Latitude:</b> %f<br/>"
"<b>Longitude:</b> %f<br/>"
"<b>Altitude:</b> %f<br/>"
"<b>Accuracy level:</b> %i<br/>"
"<b>Accuracy horizontal:</b> %f<br/>"
"<b>Accuracy vertical:</b> %f",
position->
timestamp, position->
latitude, position->
longitude,
position->
altitude, position->
accur->
level,
position->accur->
horizontal, position->accur->
vertical);
elm_object_text_set(pos_label, buffer);
}
static void
{
char buffer[1024];
if (!address) return;
snprintf(buffer, sizeof(buffer),
"<b>### Address Detail ###</b><br/>"
"<b>Address update with data from timestamp:</b> %i<br/>"
"<b>Country:</b> %s<br/>"
"<b>Countrycode:</b> %s<br/>"
"<b>Locality:</b> %s<br/>"
"<b>Postalcode:</b> %s<br/>"
"<b>Region:</b> %s<br/>"
"<b>Timezone:</b> %s<br/>"
"<b>Accuracy level:</b> %i<br/>"
"<b>Accuracy horizontal:</b> %f<br/>"
"<b>Accuracy vertical:</b> %f",
address->
timestamp, address->
country, address->
countrycode,
address->
locality, address->
postalcode, address->
region,
address->
timezone, address->
accur->level, address->accur->horizontal,
address->accur->vertical);
elm_object_text_set(addr_label, buffer);
}
{
position = event;
_print_position(position);
}
{
address = event;
_print_address(address);
}
#endif
EAPI_MAIN int
{
#ifdef ELM_ELOCATION
#endif
return -1;
elm_object_text_set(pos_label, "Getting location ...");
elm_box_pack_end(box, pos_label);
elm_box_padding_set(box, 0, 50);
elm_object_text_set(addr_label, "Getting location ...");
elm_box_pack_end(box, addr_label);
#ifdef ELM_ELOCATION
_print_position(position);
_print_address(address);
#endif
evas_object_resize(win, 600, 480);
#ifdef ELM_ELOCATION
#endif
return 0;
}