build,core,plugins: Port to GDBus and GVariant
[profile/ivi/rygel.git] / src / plugins / tracker / rygel-tracker-search-container.vala
index c94de34..a0c1029 100644 (file)
@@ -23,7 +23,6 @@
  */
 
 using GUPnP;
-using DBus;
 using Gee;
 
 /**
@@ -92,10 +91,12 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
                                          MODIFIED_VARIABLE);
 
         try {
-            this.create_proxies ();
+            this.resources = Bus.get_proxy_sync (BusType.SESSION,
+                                                 TRACKER_SERVICE,
+                                                 RESOURCES_PATH);
 
             this.get_children_count.begin ();
-        } catch (DBus.Error error) {
+        } catch (IOError error) {
             critical (_("Failed to connect to session bus: %s"), error.message);
         }
     }
@@ -282,13 +283,6 @@ public class Rygel.Tracker.SearchContainer : Rygel.MediaContainer {
         }
     }
 
-    private void create_proxies () throws DBus.Error {
-        DBus.Connection connection = DBus.Bus.get (DBus.BusType.SESSION);
-
-        this.resources = connection.get_object (TRACKER_SERVICE, RESOURCES_PATH)
-                         as ResourcesIface;
-    }
-
     /**
      * Chops the tail of a particular row in a 2-dimensional string array.
      *