[Content] Add deprecation to some not frequently used members
[platform/core/api/webapi-plugins.git] / src / content / content_filter.cc
index 4d3bfb9..e17ce5b 100644 (file)
@@ -46,9 +46,12 @@ std::map<std::string, std::string> const attributeNameMap = {
     {"createdDate", "MEDIA_ADDED_TIME"},
     {"releaseDate", "MEDIA_DATETAKEN"},
     {"modifiedDate", "MEDIA_MODIFIED_TIME"},
-    {"geolocation.latitude", "MEDIA_LATITUDE"},
-    {"geolocation.longitude", "MEDIA_LONGITUDE"},
-    {"duration", "MEDIA_DURATION"},
+    {"geolocation.latitude",
+     "MEDIA_LATITUDE"},  // Deprecated since 9.0 //TODO remove after 2 versions
+    {"geolocation.longitude",
+     "MEDIA_LONGITUDE"},  // Deprecated since 9.0 //TODO remove after 2 versions
+    {"duration",
+     "MEDIA_DURATION"},  // Deprecated since 9.0 //TODO remove after 2 versions
     {"album", "MEDIA_ALBUM"},
     {"artists", "MEDIA_ARTIST"},
     {"width", "MEDIA_WIDTH"},
@@ -85,7 +88,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") {
+    if (name == "rating" || name == "description" ||
+        name == "geolocation.latitude" || name == "geolocation.longitude" ||
+        name == "duration") {
       std::string warning = "Filtering by attribute '" + name + "'";
       common::tools::PrintDeprecationWarningFor(warning.c_str());
     }