[Content] Filter fixed for contentUri
authorPiotr Kosko <p.kosko@samsung.com>
Wed, 17 Jun 2015 13:28:16 +0000 (15:28 +0200)
committerPiotr Kosko <p.kosko@samsung.com>
Wed, 17 Jun 2015 13:28:21 +0000 (15:28 +0200)
[Verification] Finding content by uri is possible.

Change-Id: I5fba83a17aa1572ada1ba8030c91de2167d31aa6
Signed-off-by: Piotr Kosko <p.kosko@samsung.com>
src/content/content_filter.cc

index 132e6f8e8e6faf12ba1d098b793c49f5e3122653..a962c3ab41e3a24f6f16e5417f46b559e8d822eb 100755 (executable)
@@ -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<std::string>(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 :