[Messaging] Deprecated whole module 92/299392/1 accepted/tizen/unified/20231004.100248 accepted/tizen/unified/riscv/20231215.050401
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Wed, 27 Sep 2023 05:31:39 +0000 (07:31 +0200)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Wed, 27 Sep 2023 06:39:27 +0000 (08:39 +0200)
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-292

Change-Id: I118f257d8b922cf8d0e67c8f067b025a416d8ef8

src/messaging/messaging_api.js
src/messaging/messaging_instance.cc

index f3e39e9..5f796de 100755 (executable)
@@ -98,6 +98,11 @@ var MessageServiceTag = {
 };
 
 function Message(type, data) {
+    privUtils_.deprecationWarn(
+        'Message() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     validator_.isConstructorCall(this, Message);
 
     if (Object.values(MessageServiceTag).indexOf(type) == -1) {
@@ -504,6 +509,11 @@ function MessageBody(data) {
 var messageAttachmentsLoaded = {};
 
 function MessageAttachment(first, second) {
+    privUtils_.deprecationWarn(
+        'MessageAttachment() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     validator_.isConstructorCall(this, MessageAttachment);
     if (!this instanceof MessageAttachment) {
         return new MessageAttachment(data);
@@ -569,6 +579,11 @@ function MessageAttachment(first, second) {
 function Messaging() {}
 
 Messaging.prototype.getMessageServices = function() {
+    privUtils_.deprecationWarn(
+        'getMessageServices() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'messageServiceType',
@@ -612,6 +627,11 @@ function MessageService(data) {
 }
 
 MessageService.prototype.sendMessage = function() {
+    privUtils_.deprecationWarn(
+        'sendMessage() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'message', type: types_.PLATFORM_OBJECT, values: tizen.Message },
         {
@@ -659,6 +679,11 @@ MessageService.prototype.sendMessage = function() {
 };
 
 MessageService.prototype.loadMessageBody = function() {
+    privUtils_.deprecationWarn(
+        'loadMessageBody() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'message', type: types_.PLATFORM_OBJECT, values: tizen.Message },
         { name: 'successCallback', type: types_.FUNCTION },
@@ -697,6 +722,11 @@ MessageService.prototype.loadMessageBody = function() {
     }
 };
 MessageService.prototype.loadMessageAttachment = function() {
+    privUtils_.deprecationWarn(
+        'loadMessageAttachment() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'attachment', type: types_.PLATFORM_OBJECT, values: MessageAttachment },
         { name: 'successCallback', type: types_.FUNCTION },
@@ -737,6 +767,11 @@ MessageService.prototype.loadMessageAttachment = function() {
 };
 
 MessageService.prototype.sync = function() {
+    privUtils_.deprecationWarn(
+        'sync() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'successCallback',
@@ -773,6 +808,11 @@ MessageService.prototype.sync = function() {
 };
 
 MessageService.prototype.syncFolder = function() {
+    privUtils_.deprecationWarn(
+        'syncFolder() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'folder', type: types_.PLATFORM_OBJECT, values: MessageFolder },
         {
@@ -811,6 +851,11 @@ MessageService.prototype.syncFolder = function() {
 };
 
 MessageService.prototype.stopSync = function() {
+    privUtils_.deprecationWarn(
+        'stopSync() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [{ name: 'opId', type: types_.LONG }]);
 
     var self = this;
@@ -829,6 +874,11 @@ function MessageStorage(service) {
 }
 
 MessageStorage.prototype.addDraftMessage = function() {
+    privUtils_.deprecationWarn(
+        'addDraftMessage() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'message', type: types_.PLATFORM_OBJECT, values: tizen.Message },
         {
@@ -880,6 +930,11 @@ MessageStorage.prototype.addDraftMessage = function() {
 };
 
 MessageStorage.prototype.findMessages = function() {
+    privUtils_.deprecationWarn(
+        'findMessages() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'filter',
@@ -932,6 +987,11 @@ MessageStorage.prototype.findMessages = function() {
 };
 
 MessageStorage.prototype.removeMessages = function() {
+    privUtils_.deprecationWarn(
+        'removeMessages() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'messages', type: types_.ARRAY, values: Message },
         {
@@ -970,6 +1030,11 @@ MessageStorage.prototype.removeMessages = function() {
 };
 
 MessageStorage.prototype.updateMessages = function() {
+    privUtils_.deprecationWarn(
+        'updateMessages() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'messages', type: types_.ARRAY, values: Message },
         {
@@ -1031,6 +1096,11 @@ MessageStorage.prototype.updateMessages = function() {
 };
 
 MessageStorage.prototype.findConversations = function() {
+    privUtils_.deprecationWarn(
+        'findConversations() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'filter',
@@ -1082,6 +1152,11 @@ MessageStorage.prototype.findConversations = function() {
 };
 
 MessageStorage.prototype.removeConversations = function() {
+    privUtils_.deprecationWarn(
+        'removeConversations() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'conversations', type: types_.ARRAY },
         {
@@ -1120,6 +1195,11 @@ MessageStorage.prototype.removeConversations = function() {
 };
 
 MessageStorage.prototype.findFolders = function() {
+    privUtils_.deprecationWarn(
+        'findFolders() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'filter',
@@ -1212,6 +1292,11 @@ native.addListener(
 );
 
 MessageStorage.prototype.addMessagesChangeListener = function() {
+    privUtils_.deprecationWarn(
+        'addMessagesChangeListener() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'messagesChangeCallback',
@@ -1248,6 +1333,11 @@ MessageStorage.prototype.addMessagesChangeListener = function() {
 };
 
 MessageStorage.prototype.addConversationsChangeListener = function() {
+    privUtils_.deprecationWarn(
+        'addConversationsChangeListener() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'conversationsChangeCallback',
@@ -1287,6 +1377,11 @@ MessageStorage.prototype.addConversationsChangeListener = function() {
 };
 
 MessageStorage.prototype.addFoldersChangeListener = function() {
+    privUtils_.deprecationWarn(
+        'addFoldersChangeListener() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         {
             name: 'foldersChangeCallback',
@@ -1323,6 +1418,11 @@ MessageStorage.prototype.addFoldersChangeListener = function() {
 };
 
 MessageStorage.prototype.removeChangeListener = function() {
+    privUtils_.deprecationWarn(
+        'removeChangeListener() is deprecated and will be ' +
+        'removed from next release without any alternatives. ',
+        '8.0'
+    );
     var args = validator_.validateArgs(arguments, [
         { name: 'watchId', type: types_.LONG }
     ]);
index 0a5e057..fe1137c 100644 (file)
@@ -140,6 +140,10 @@ ShortMsgManager& MessagingInstance::getShortMsgManager() {
 
 void MessagingInstance::GetMessageServices(const picojson::value& args, picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "GetMessageServices() is deprecated and will be removed from next "
+      "release without any alternatives.",
+      "8.0");
 
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
 
@@ -153,6 +157,10 @@ void MessagingInstance::GetMessageServices(const picojson::value& args, picojson
 void MessagingInstance::MessageServiceSendMessage(const picojson::value& args,
                                                   picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageServiceSendMessage() is deprecated and will be removed from next "
+      "release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -219,6 +227,10 @@ void MessagingInstance::MessageServiceSendMessage(const picojson::value& args,
 void MessagingInstance::MessageServiceLoadMessageBody(const picojson::value& args,
                                                       picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageServiceLoadMessageBody() is deprecated and will be removed from "
+      "next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -253,6 +265,10 @@ void MessagingInstance::MessageServiceLoadMessageBody(const picojson::value& arg
 void MessagingInstance::MessageServiceLoadMessageAttachment(const picojson::value& args,
                                                             picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageServiceLoadMessageAttachment() is deprecated and will be removed "
+      "from next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -278,6 +294,10 @@ void MessagingInstance::MessageServiceLoadMessageAttachment(const picojson::valu
 
 void MessagingInstance::MessageServiceSync(const picojson::value& args, picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageServiceSync() is deprecated and will be removed from next "
+      "release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -319,6 +339,10 @@ void MessagingInstance::MessageServiceSync(const picojson::value& args, picojson
 void MessagingInstance::MessageServiceSyncFolder(const picojson::value& args,
                                                  picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageServiceSyncFolder() is deprecated and will be removed from next "
+      "release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -362,6 +386,10 @@ void MessagingInstance::MessageServiceSyncFolder(const picojson::value& args,
 
 void MessagingInstance::MessageServiceStopSync(const picojson::value& args, picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageServiceStopSync() is deprecated and will be removed from next "
+      "release without any alternatives.",
+      "8.0");
   CHECK_EXIST(args, STOP_SYNC_ARGS_OPID, out);
 
   picojson::object data = args.get<picojson::object>();
@@ -399,6 +427,10 @@ void MessagingInstance::MessageServiceStopSync(const picojson::value& args, pico
 void MessagingInstance::MessageStorageAddDraftMessage(const picojson::value& args,
                                                       picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageAddDraftMessage() is deprecated and will be removed from "
+      "next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -431,6 +463,10 @@ void MessagingInstance::MessageStorageAddDraftMessage(const picojson::value& arg
 void MessagingInstance::MessageStorageFindMessages(const picojson::value& args,
                                                    picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageFindMessages() is deprecated and will be removed from "
+      "next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingRead, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -472,6 +508,10 @@ void MessagingInstance::MessageStorageFindMessages(const picojson::value& args,
 void MessagingInstance::MessageStorageRemoveMessages(const picojson::value& args,
                                                      picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageRemoveMessages() is deprecated and will be removed from "
+      "next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -501,6 +541,10 @@ void MessagingInstance::MessageStorageRemoveMessages(const picojson::value& args
 void MessagingInstance::MessageStorageUpdateMessages(const picojson::value& args,
                                                      picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageUpdateMessages() is deprecated and will be removed from "
+      "next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -530,6 +574,10 @@ void MessagingInstance::MessageStorageUpdateMessages(const picojson::value& args
 void MessagingInstance::MessageStorageFindConversations(const picojson::value& args,
                                                         picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageFindConversations() is deprecated and will be removed "
+      "from next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingRead, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -569,6 +617,10 @@ void MessagingInstance::MessageStorageFindConversations(const picojson::value& a
 void MessagingInstance::MessageStorageRemoveConversations(const picojson::value& args,
                                                           picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageRemoveConversations() is deprecated and will be removed "
+      "from next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingWrite, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -604,6 +656,10 @@ void MessagingInstance::MessageStorageRemoveConversations(const picojson::value&
 void MessagingInstance::MessageStorageFindFolders(const picojson::value& args,
                                                   picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageFindFolders() is deprecated and will be removed from next "
+      "release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingRead, &out);
   CHECK_EXIST(args, JSON_CALLBACK_ID, out);
@@ -631,6 +687,10 @@ void MessagingInstance::MessageStorageFindFolders(const picojson::value& args,
 void MessagingInstance::MessageStorageAddMessagesChangeListener(const picojson::value& args,
                                                                 picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageAddMessagesChangeListener() is deprecated and will be "
+      "removed from next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingRead, &out);
 
@@ -661,6 +721,10 @@ void MessagingInstance::MessageStorageAddMessagesChangeListener(const picojson::
 void MessagingInstance::MessageStorageAddConversationsChangeListener(const picojson::value& args,
                                                                      picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageAddConversationsChangeListener() is deprecated and will "
+      "be removed from next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingRead, &out);
 
@@ -691,6 +755,10 @@ void MessagingInstance::MessageStorageAddConversationsChangeListener(const picoj
 void MessagingInstance::MessageStorageAddFolderChangeListener(const picojson::value& args,
                                                               picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageAddFolderChangeListener() is deprecated and will be "
+      "removed from next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingRead, &out);
 
@@ -721,6 +789,10 @@ void MessagingInstance::MessageStorageAddFolderChangeListener(const picojson::va
 void MessagingInstance::MessageStorageRemoveChangeListener(const picojson::value& args,
                                                            picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageStorageRemoveChangeListener() is deprecated and will be removed "
+      "from next release without any alternatives.",
+      "8.0");
 
   CHECK_PRIVILEGE_ACCESS(kPrivilegeMessagingRead, &out);
 
@@ -737,6 +809,10 @@ void MessagingInstance::MessageStorageRemoveChangeListener(const picojson::value
 void MessagingInstance::MessageGetMessageStatus(const picojson::value& args,
                                                 picojson::object& out) {
   ScopeLogger();
+  DEPRECATION_WARN(
+      "MessageGetMessageStatus() is deprecated and will be removed from next "
+      "release without any alternatives.",
+      "8.0");
 
   picojson::object data = args.get<picojson::object>();
   const int id = stoi(data.at("id").get<std::string>());