[SystemInfo] - Resolving problem with the datacontrol capability
authorAndrzej Popowski <a.popowski@samsung.com>
Mon, 2 Feb 2015 12:55:02 +0000 (13:55 +0100)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Mon, 2 Feb 2015 13:38:31 +0000 (22:38 +0900)
Change-Id: Ib00fb3cc57780232e3a9aaa61d48d674b93c2392
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
src/systeminfo/systeminfo-utils.cpp
src/systeminfo/systeminfo-utils.h

index 03414c515e6d80838f1ae065aa0c9939f6fa8586..88cbf8c0f6cbfab8ceb43c007b6e60bbc43f962f 100644 (file)
@@ -191,6 +191,7 @@ const char* kTizenFeatureBookmark = "http://tizen.org/feature/bookmark";
 const char* kTizenFeatureCalendar = "http://tizen.org/feature/calendar";
 const char* kTizenFeatureContact  = "http://tizen.org/feature/contact";
 const char* kTizenFeatureContent  = "http://tizen.org/feature/content";
+const char* kTizenFeatureDatacontrol  = "http://tizen.org/feature/datacontrol";
 const char* kTizenFeatureDatasync  = "http://tizen.org/feature/datasync";
 const char* kTizenFeatureDownload = "http://tizen.org/feature/download";
 const char* kTizenFeatureExif = "http://tizen.org/feature/exif";
@@ -2522,6 +2523,9 @@ static bool CheckBoolCapability(const std::string& key, bool* bool_value)
     } else if(key == kTizenFeatureContent) {
         *bool_value = SystemInfoDeviceCapability::IsContent();
         fetched = true;
+    } else if(key == kTizenFeatureDatacontrol) {
+        *bool_value = SystemInfoDeviceCapability::IsDataControl();
+        fetched = true;
     } else if(key == kTizenFeatureDatasync) {
         *bool_value = SystemInfoDeviceCapability::IsDataSync();
         fetched = true;
@@ -3458,6 +3462,15 @@ bool SystemInfoDeviceCapability::IsContent()
 #endif
 }
 
+bool SystemInfoDeviceCapability::IsDataControl()
+{
+#ifdef FEATURE_OPTIONAL_DATACONTROL
+    return true;
+#else
+    return false;
+#endif
+}
+
 bool SystemInfoDeviceCapability::IsDataSync()
 {
 #ifdef FEATURE_OPTIONAL_DATASYNC
index a247c6f37aa039c49ce070d5ef149080da85c8e3..cf6ab649540bb55b62806cf438a797e21ef54eee 100644 (file)
@@ -167,6 +167,7 @@ public:
     static bool IsCalendar();
     static bool IsContact();
     static bool IsContent();
+    static bool IsDataControl();
     static bool IsDataSync();
     static bool IsDownload();
     static bool IsExif();