rygel r585 - trunk/src/plugins/tracker



Author: zeeshanak
Date: Sat Feb 14 15:29:59 2009
New Revision: 585
URL: http://svn.gnome.org/viewvc/rygel?rev=585&view=rev

Log:
TrackerSearchResult doesn't inherit from SimpleAsyncResult.

This is a temporary hack (hopefully) till bug#567319 is fixed.

Modified:
   trunk/src/plugins/tracker/rygel-tracker-container.vala

Modified: trunk/src/plugins/tracker/rygel-tracker-container.vala
==============================================================================
--- trunk/src/plugins/tracker/rygel-tracker-container.vala	(original)
+++ trunk/src/plugins/tracker/rygel-tracker-container.vala	Sat Feb 14 15:29:59 2009
@@ -221,12 +221,17 @@
                                                       string[] metadata);
 }
 
-public class Rygel.TrackerSearchResult :
-             Rygel.SimpleAsyncResult<Gee.List<MediaObject>> {
+public class Rygel.TrackerSearchResult : GLib.Object, GLib.AsyncResult {
+    protected GLib.Object source_object;
+    protected AsyncReadyCallback callback;
+
+    public Gee.List<MediaObject> data;
+    public GLib.Error error;
 
     public TrackerSearchResult (TrackerContainer   container,
-                         AsyncReadyCallback callback) {
-        base (container, callback);
+                                AsyncReadyCallback callback) {
+        this.source_object = container;
+        this.callback = callback;
 
         this.data = new ArrayList<MediaObject> ();
     }
@@ -286,4 +291,26 @@
 
         return i + 1;
     }
+
+    public unowned GLib.Object get_source_object () {
+        return this.source_object;
+    }
+
+    public void* get_user_data () {
+        return null;
+    }
+
+    public void complete () {
+        this.callback (this.source_object, this);
+    }
+
+    public void complete_in_idle () {
+        Idle.add_full (Priority.DEFAULT, idle_func);
+    }
+
+    private bool idle_func () {
+        this.complete ();
+
+        return false;
+    }
 }



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