[gnome-maps] geoclue: Specify desired accuracy level



commit ab7f8883d5c5e1c1f2945c909c3ade99524c6d53
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Jan 20 16:17:56 2014 +0000

    geoclue: Specify desired accuracy level

 src/geoclue.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/geoclue.js b/src/geoclue.js
index 1f60c99..ed31ddf 100644
--- a/src/geoclue.js
+++ b/src/geoclue.js
@@ -47,6 +47,7 @@ const ClientInterface = '<node> \
 <interface name="org.freedesktop.GeoClue2.Client"> \
     <property name="Location" type="o" access="read"/> \
     <property name="DesktopId" type="s" access="readwrite"/> \
+    <property name="RequestedAccuracyLevel" type="u" access="readwrite"/> \
     <property name="DistanceThreshold" type="u" access="readwrite"/> \
     <method name="Start"/> \
     <method name="Stop"/> \
@@ -58,6 +59,13 @@ const ClientInterface = '<node> \
 </node>';
 const ClientProxy = Gio.DBusProxy.makeProxyWrapper(ClientInterface);
 
+const AccuracyLevel = {
+    COUNTRY: 1,
+    CITY: 4,
+    STREET: 6,
+    EXACT: 8,
+};
+
 const LocationInterface = '<node> \
 <interface name="org.freedesktop.GeoClue2.Location"> \
     <property name="Latitude" type="d" access="read"/> \
@@ -128,6 +136,7 @@ const Geoclue = new Lang.Class({
                                             "org.freedesktop.GeoClue2",
                                             clientPath);
         this._clientProxy.DesktopId = "gnome-maps";
+        this._clientProxy.RequestedAccuracyLevel = AccuracyLevel.EXACT;
 
         if (!this.userSetLocation)
             this.findLocation();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]