[Content] Deprecate filtering attribute 87/202887/7
authorDawid Juszczak <d.juszczak@samsung.com>
Fri, 5 Apr 2019 11:16:45 +0000 (13:16 +0200)
committerDawid Juszczak <d.juszczak@samsung.com>
Mon, 15 Apr 2019 08:29:58 +0000 (08:29 +0000)
[ACR] http://suprem.sec.samsung.net/jira/browse/TWDAPI-210

Change-Id: Ib0ebdee662d7dbb57ad29e98d2b7e427911f9182
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
src/content/content_filter.cc

index cb69310919d148a0ca9cf6254c09365df89d7fd4..f9acabd3b6c1053ee39b2797b74a181f5ce2f0fd 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "common/converter.h"
 #include "common/logger.h"
+#include "common/tools.h"
 
 using common::AttributeMatchFlag;
 using common::CompositeFilterType;
@@ -84,6 +85,9 @@ PlatformResult ContentFilter::MapField(const std::string& name, std::string* res
   ScopeLogger();
   auto it = attributeNameMap.find(name);
   if (it != attributeNameMap.end()) {
+    if (name == "rating" || name == "description") {
+      common::tools::PrintDeprecationWarningFor("Filtering by attribute '" + name + "'");
+    }
     *result = it->second;
   } else {
     return LogAndCreateResult(ErrorCode::INVALID_VALUES_ERR);