[rygel] core: RelationalExpression keeps search caps
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: RelationalExpression keeps search caps
- Date: Mon, 19 Jul 2010 17:51:06 +0000 (UTC)
commit 1332d77909e9ff47dccba948024f7b93de35d402
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Jul 19 19:31:24 2010 +0300
core: RelationalExpression keeps search caps
Move static CSV list of properties supported in Search action from
ContentDirectory to RelationalExpression.
src/rygel/rygel-content-directory.vala | 7 ++-----
src/rygel/rygel-relational-expression.vala | 4 ++++
2 files changed, 6 insertions(+), 5 deletions(-)
---
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<SearchCriteriaOp,string,string> {
+ 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":
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]