aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-10-06 23:08:11 -0600
committerTed Gould <ted@gould.cx>2010-10-06 23:08:11 -0600
commit2fb4d57632b33592b9ce56563a50a47be2b2544f (patch)
tree9d62ac38695baf881a848a27da2be8273830ebfa
parent54eacfe376c81914781f367c928bbd14f09b0fb8 (diff)
downloadayatana-indicator-datetime-2fb4d57632b33592b9ce56563a50a47be2b2544f.tar.gz
ayatana-indicator-datetime-2fb4d57632b33592b9ce56563a50a47be2b2544f.tar.bz2
ayatana-indicator-datetime-2fb4d57632b33592b9ce56563a50a47be2b2544f.zip
Setting up our requirements for providers
-rw-r--r--src/datetime-service.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 420148d..712bbd6 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -270,6 +270,16 @@ geo_create_address (GeoclueMasterClient * master, GeoclueAddress * address, GErr
return;
}
+/* Callback from setting requirements */
+static void
+geo_req_set (GeoclueMasterClient * master, GError * error, gpointer user_data)
+{
+ if (error != NULL) {
+ g_warning("Unable to set Geoclue requirements: %s", error->message);
+ }
+ return;
+}
+
/* Callback from creating the client */
static void
geo_create_client (GeoclueMaster * master, GeoclueMasterClient * client, gchar * path, GError * error, gpointer user_data)
@@ -277,6 +287,10 @@ geo_create_client (GeoclueMaster * master, GeoclueMasterClient * client, gchar *
g_debug("Created Geoclue client at: %s", path);
geo_master = client;
+
+ geoclue_master_client_set_requirements_async(geo_master, GEOCLUE_ACCURACY_LEVEL_REGION, 0,
+ FALSE, GEOCLUE_RESOURCE_ALL, geo_req_set, NULL);
+
geoclue_master_client_create_address_async(geo_master, geo_create_address, NULL);
return;