tracker: SearchContainer() takes query as argument
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sat, 19 Sep 2009 01:17:50 +0000 (04:17 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sat, 19 Sep 2009 16:50:16 +0000 (19:50 +0300)
SearchContainer construction method now takes RDF query as argument.

src/plugins/tracker/rygel-tracker-root-container.vala
src/plugins/tracker/rygel-tracker-search-container.vala

index 48edc97..cc308c0 100644 (file)
@@ -37,17 +37,20 @@ public class Rygel.TrackerRootContainer : Rygel.SimpleContainer {
                                         "16",
                                         this,
                                         "Pictures",
-                                        TrackerImageItem.SERVICE));
+                                        TrackerImageItem.SERVICE,
+                                        null));
         this.children.add (new TrackerSearchContainer (
                                         "14",
                                         this,
                                         "Music",
-                                        TrackerMusicItem.SERVICE));
+                                        TrackerMusicItem.SERVICE,
+                                        null));
         this.children.add (new TrackerSearchContainer (
                                         "15",
                                         this,
                                         "Videos",
-                                        TrackerVideoItem.SERVICE));
+                                        TrackerVideoItem.SERVICE,
+                                        null));
         this.children.add (new TrackerMetadataValues ("Audio:Artist",
                                                       "17",
                                                       this,
index 068b2c1..10e0438 100644 (file)
@@ -51,11 +51,17 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
     public TrackerSearchContainer (string         id,
                                    MediaContainer parent,
                                    string         title,
-                                   string         service) {
+                                   string         service,
+                                   string?        query_condition) {
         base (id, parent, title, 0);
 
         this.service = service;
-        this.query_condition = "";
+
+        if (query_condition != null) {
+            this.query_condition = query_condition;
+        } else {
+            this.query_condition = "";
+        }
 
         try {
             this.create_proxies ();