From: Piotr Kosko
Date: Wed, 17 Jun 2015 13:28:16 +0000 (+0200)
Subject: [Content] Filter fixed for contentUri
X-Git-Tag: submit/tizen/20150702.103311^2~2^2~22^2~1
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a59ea72fd170139cbf543d5d132a2e583b3aba9;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Content] Filter fixed for contentUri
[Verification] Finding content by uri is possible.
Change-Id: I5fba83a17aa1572ada1ba8030c91de2167d31aa6
Signed-off-by: Piotr Kosko
---
diff --git a/src/content/content_filter.cc b/src/content/content_filter.cc
index 132e6f8e..a962c3ab 100755
--- a/src/content/content_filter.cc
+++ b/src/content/content_filter.cc
@@ -127,7 +127,6 @@ PlatformResult ContentFilter::BuildQuery(const picojson::object& jsFilter,
LoggerE("INVALID_VALUES_ERR");
return PlatformResult(ErrorCode::INVALID_VALUES_ERR);
}
-
if (AttributeMatchFlag::kExists != match_flag) {
query.append("\"");
matchValue = escapeValueString(JsonCast(match_value));
@@ -141,6 +140,9 @@ PlatformResult ContentFilter::BuildQuery(const picojson::object& jsFilter,
} else { // OTHER
matchValue = "4";
}
+ } else if (name == "contentURI") {
+ //simple convertion of URI to globalpath
+ matchValue = matchValue.substr(strlen("file://"));
}
switch (match_flag) {
case AttributeMatchFlag::kStartsWith :