[gnome-clocks] geocoding: Specify needed accuracy level to geoclue
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] geocoding: Specify needed accuracy level to geoclue
- Date: Tue, 21 Jan 2014 12:43:07 +0000 (UTC)
commit 952d671250c2602f8608a41175181f9b35b2c192
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Jan 20 18:06:20 2014 +0000
geocoding: Specify needed accuracy level to geoclue
https://bugzilla.gnome.org/show_bug.cgi?id=722375
src/geocoding.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/geocoding.vala b/src/geocoding.vala
index a6d6a96..34675b9 100644
--- a/src/geocoding.vala
+++ b/src/geocoding.vala
@@ -19,6 +19,13 @@
namespace Clocks {
namespace Geo {
+private enum AccuracyLevel {
+ COUNTRY = 1,
+ CITY = 4,
+ STREET = 6,
+ EXACT = 8,
+}
+
[DBus (name = "org.freedesktop.GeoClue2.Manager")]
private interface Manager : Object {
public abstract async void get_client (out string client_path) throws IOError;
@@ -29,6 +36,7 @@ private interface Client : Object {
public abstract string location { owned get; }
public abstract string desktop_id { owned get; set; }
public abstract uint distance_threshold { get; set; }
+ public abstract uint requested_accuracy_level { get; set; }
public signal void location_updated (string old_path, string new_path);
@@ -99,6 +107,7 @@ public class Info : Object {
}
client.desktop_id = DESKTOP_ID;
+ client.requested_accuracy_level = AccuracyLevel.CITY;
client.location_updated.connect ((old_path, new_path) => {
on_location_updated.begin (old_path, new_path, (obj, res) => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]