Browse just forwards the Cancellable to async calls.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Thu, 19 Feb 2009 17:17:27 +0000 (17:17 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Thu, 19 Feb 2009 17:17:27 +0000 (17:17 +0000)
svn path=/trunk/; revision=621

src/rygel/rygel-browse.vala

index ea36b83..5d3401f 100644 (file)
@@ -68,10 +68,7 @@ public class Rygel.Browse: GLib.Object, Rygel.StateMachine {
     }
 
     public void run (Cancellable? cancellable) {
-        if (cancellable != null) {
-            this.cancellable = cancellable;
-            cancellable.cancelled += this.on_cancelled;
-        }
+        this.cancellable = cancellable;
 
         /* Start DIDL-Lite fragment */
         this.didl_writer.start_didl_lite (null, null, true);
@@ -80,10 +77,6 @@ public class Rygel.Browse: GLib.Object, Rygel.StateMachine {
         this.parse_args ();
     }
 
-    private void on_cancelled (Cancellable cancellable) {
-        // FIXME: implement canceling of browse request here
-    }
-
     private void got_media_object () {
         if (this.media_object == null) {
             this.handle_error (
@@ -109,7 +102,7 @@ public class Rygel.Browse: GLib.Object, Rygel.StateMachine {
         }
 
         this.root_container.find_object (this.object_id,
-                                         null,
+                                         this.cancellable,
                                          this.on_media_object_found);
     }
 
@@ -268,10 +261,10 @@ public class Rygel.Browse: GLib.Object, Rygel.StateMachine {
     private void fetch_children () {
         var container = (MediaContainer) this.media_object;
 
-         container.get_children (this.index,
-                                 this.requested_count,
-                                 null,
-                                 this.on_children_fetched);
+        container.get_children (this.index,
+                                this.requested_count,
+                                this.cancellable,
+                                this.on_children_fetched);
     }
 
     private void on_children_fetched (Object      source_object,