From: Zeeshan Ali (Khattak) Date: Mon, 19 Jul 2010 16:31:24 +0000 (+0300) Subject: core: RelationalExpression keeps search caps X-Git-Tag: RYGEL_0_7_3~86 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1332d77909e9ff47dccba948024f7b93de35d402;p=profile%2Fivi%2Frygel.git core: RelationalExpression keeps search caps Move static CSV list of properties supported in Search action from ContentDirectory to RelationalExpression. --- diff --git a/src/rygel/rygel-content-directory.vala b/src/rygel/rygel-content-directory.vala index ba56f97..46c7edf 100644 --- a/src/rygel/rygel-content-directory.vala +++ b/src/rygel/rygel-content-directory.vala @@ -48,9 +48,6 @@ public class Rygel.ContentDirectory: Service { public const string UPNP_TYPE_V1 = "urn:schemas-upnp-org:service:ContentDirectory:1"; public const string DESCRIPTION_PATH = "xml/ContentDirectory.xml"; - private const string SEARCH_CAPS = "@id,@parentID,@refID," + - "upnp:class,dc:title,dc:creator," + - "res,res@protocolInfo"; protected string feature_list; protected string sort_caps; @@ -260,7 +257,7 @@ public class Rygel.ContentDirectory: Service { private void get_search_capabilities_cb (Service content_dir, owned ServiceAction action) { /* Set action return arguments */ - action.set ("SearchCaps", typeof (string), SEARCH_CAPS); + action.set ("SearchCaps", typeof (string), RelationalExpression.CAPS); action.return (); } @@ -271,7 +268,7 @@ public class Rygel.ContentDirectory: Service { ref GLib.Value value) { /* Set action return arguments */ value.init (typeof (string)); - value.set_string (SEARCH_CAPS); + value.set_string (RelationalExpression.CAPS); } /* action GetSortCapabilities implementation */ diff --git a/src/rygel/rygel-relational-expression.vala b/src/rygel/rygel-relational-expression.vala index 9849524..7888ce8 100644 --- a/src/rygel/rygel-relational-expression.vala +++ b/src/rygel/rygel-relational-expression.vala @@ -26,6 +26,10 @@ using GUPnP; // relational operator. public class Rygel.RelationalExpression : Rygel.SearchExpression { + internal const string CAPS = "@id,@parentID,@refID," + + "upnp:class,dc:title,dc:creator," + + "res,res@protocolInfo"; + public override bool satisfied_by (MediaObject media_object) { switch (this.operand1) { case "@id":