tracker: SearchContainer takes keywords
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sun, 20 Sep 2009 22:24:37 +0000 (01:24 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sun, 20 Sep 2009 22:39:24 +0000 (01:39 +0300)
SearchContainer allows users to limit the search by keywords.

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

index 77ab3e4..d0cf1fd 100644 (file)
@@ -46,16 +46,20 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
 
     public string query_condition;
 
+    public string[] keywords;
+
     Gee.List<AsyncResult> results;
 
     public TrackerSearchContainer (string         id,
                                    MediaContainer parent,
                                    string         title,
                                    string         service,
-                                   string?        query_condition) {
+                                   string?        query_condition,
+                                   string[]       keywords = new string[0]) {
         base (id, parent, title, 0);
 
         this.service = service;
+        this.keywords = keywords;
 
         if (query_condition != null) {
             this.query_condition = query_condition;
@@ -86,7 +90,7 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
                                this.service,
                                new string[0],
                                "",
-                               new string[0],
+                               this.keywords,
                                this.query_condition,
                                false,
                                new string[0],
@@ -130,7 +134,7 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
                                this.service,
                                TrackerItem.get_metadata_keys (),
                                "",
-                               new string[0],
+                               this.keywords,
                                this.query_condition,
                                false,
                                new string[0],