[PPM] Deprecate whole module 02/287902/1 accepted/tizen/unified/20230221.031426
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 7 Feb 2023 11:04:53 +0000 (12:04 +0100)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Tue, 7 Feb 2023 11:04:53 +0000 (12:04 +0100)
PPM module was required by mobile and wearable profiles, now it is not
needed.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-290

[Verification] Code compiles witout errors.
Deprecation warnings checked in chrome console.

Change-Id: Ice28c351ac5f40cf835fe89dad1ddbf6d0a184db

src/ppm/ppm_api.js
src/ppm/ppm_instance.cc

index 9f0dfcf..5adb1b9 100644 (file)
@@ -17,6 +17,7 @@
 var validator_ = xwalk.utils.validator;
 var type_ = xwalk.utils.type;
 var types_ = validator_.Types;
+var utils_ = xwalk.utils;
 var native_ = new xwalk.utils.NativeManager(extension);
 
 function PPMManager() {}
@@ -29,6 +30,11 @@ function RequestStatus(privilege, result_) {
 }
 
 PPMManager.prototype.checkPermission = function() {
+    utils_.deprecationWarn(
+        'checkPermission() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '7.5'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'privilege', type: types_.STRING }
     ]);
@@ -46,7 +52,12 @@ PPMManager.prototype.checkPermission = function() {
     return native_.getResultObject(result);
 };
 
-PPMManager.prototype.checkPermissions = function() {
+PPMManager.prototype.checkPermissions = function () {
+    utils_.deprecationWarn(
+        'checkPermissions() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '7.5'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'privileges', type: types_.ARRAY, values: types_.STRING }
     ]);
@@ -72,7 +83,12 @@ PPMManager.prototype.checkPermissions = function() {
     return data;
 };
 
-PPMManager.prototype.requestPermission = function() {
+PPMManager.prototype.requestPermission = function () {
+    utils_.deprecationWarn(
+        'requestPermission() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '7.5'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'privilege', type: types_.STRING },
         { name: 'successCallback', type: types_.FUNCTION },
@@ -98,7 +114,12 @@ PPMManager.prototype.requestPermission = function() {
     }
 };
 
-PPMManager.prototype.requestPermissions = function() {
+PPMManager.prototype.requestPermissions = function () {
+    utils_.deprecationWarn(
+        'requestPermissions() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '7.5'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'privileges', type: types_.ARRAY, values: types_.STRING },
         { name: 'successCallback', type: types_.FUNCTION },
index 3796c2b..93f7e1e 100644 (file)
@@ -163,6 +163,9 @@ void PPMInstance::ResponseMultipleCallback(ppm_call_cause_e cause,
 
 void PPMInstance::PPMManagerCheckPermission(const picojson::value& args, picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "checkPermission() is deprecated and will be removed from next release without any alternatives.",
+      "7.5");
   const std::string& privilege = args.get("privilege").get<std::string>();
   LoggerD("Checking privilege: %s ", privilege.c_str());
 
@@ -181,6 +184,9 @@ void PPMInstance::PPMManagerCheckPermission(const picojson::value& args, picojso
 
 void PPMInstance::PPMManagerCheckPermissions(const picojson::value& args, picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "checkPermissions() is deprecated and will be removed from next release without any alternatives.",
+      "7.5");
 
   const picojson::array& privileges = args.get("privileges").get<picojson::array>();
   std::vector<const char*> privilege_array;
@@ -219,6 +225,9 @@ void PPMInstance::PPMManagerCheckPermissions(const picojson::value& args, picojs
 
 void PPMInstance::PPMManagerRequestPermission(const picojson::value& args, picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "requestPermission() is deprecated and will be removed from next release without any alternatives.",
+      "7.5");
 
   const double callback_id = args.get("callbackId").get<double>();
 
@@ -243,6 +252,9 @@ void PPMInstance::PPMManagerRequestPermission(const picojson::value& args, picoj
 
 void PPMInstance::PPMManagerRequestPermissions(const picojson::value& args, picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "requestPermissions() is deprecated and will be removed from next release without any alternatives.",
+      "7.5");
 
   const double callback_id = args.get("callbackId").get<double>();
   const picojson::array& privileges = args.get("privileges").get<picojson::array>();