[gnome-clocks] Use ObjectPath instead of string in geocoding dbus stuff



commit 20145ad04996177c6bc690a4554f67b5a19bcb69
Author: Paolo Borelli <pborelli gnome org>
Date:   Wed Sep 17 10:51:20 2014 +0200

    Use ObjectPath instead of string in geocoding dbus stuff

 src/geocoding.vala |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/src/geocoding.vala b/src/geocoding.vala
index c8d3700..2a06662 100644
--- a/src/geocoding.vala
+++ b/src/geocoding.vala
@@ -31,14 +31,22 @@ private interface Manager : Object {
     public abstract async void get_client (out string client_path) throws IOError;
 }
 
+[DBus (name = "org.freedesktop.GeoClue2.Location")]
+public interface Location : Object {
+    public abstract double latitude { get; }
+    public abstract double longitude { get; }
+    public abstract double accuracy { get; }
+    public abstract string description { owned get; }
+}
+
 [DBus (name = "org.freedesktop.GeoClue2.Client")]
 private interface Client : Object {
-    public abstract string location { owned get; }
+    public abstract ObjectPath 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);
+    public signal void location_updated (ObjectPath old_path, ObjectPath new_path);
 
     public abstract async void start () throws IOError;
 
@@ -46,14 +54,6 @@ private interface Client : Object {
     // public abstract async void stop () throws IOError;
 }
 
-[DBus (name = "org.freedesktop.GeoClue2.Location")]
-public interface Location : Object {
-    public abstract double latitude { get; }
-    public abstract double longitude { get; }
-    public abstract double accuracy { get; }
-    public abstract string description { owned get; }
-}
-
 public class Info : Object {
     public Geo.Location? geo_location { get; private set; default = null; }
 
@@ -123,7 +123,7 @@ public class Info : Object {
         }
     }
 
-    public async void on_location_updated (string old_path, string new_path) {
+    public async void on_location_updated (ObjectPath old_path, ObjectPath new_path) {
         try {
             geo_location = yield Bus.get_proxy (GLib.BusType.SYSTEM,
                                                 "org.freedesktop.GeoClue2",


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