Change func argument name 98/228898/1
authormk5004.lee <mk5004.lee@samsung.com>
Thu, 26 Mar 2020 08:31:02 +0000 (17:31 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Thu, 26 Mar 2020 08:31:02 +0000 (17:31 +0900)
Change-Id: Ia94bd935ffc8dd07e829ab5b5ceafa9ae8ede0c3
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
notification-ex/db_manager.cc
notification-ex/db_manager.h
notification-ex/manager.cc
notification-ex/manager.h
notification-ex/stub.cc

index d0498c4..325e8b4 100644 (file)
@@ -413,7 +413,7 @@ int DBManager::UpdateReceiverList
   return ERROR_NONE;
 }
 
-int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedItem) {
+int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedList) {
   int ret = ERROR_NONE;
   char* query;
   int64_t priv_id = 0;
@@ -428,7 +428,7 @@ int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedItem
     return ERROR_FROM_DB;
   }
 
-  for (auto& i : addedItem) {
+  for (auto& i : addedList) {
     uid_t uid = static_pointer_cast<IItemInfoInternal>(i->GetInfo())->GetUid();
     list<shared_ptr<item::AbstractItem>> item_list =
         GetNotificationList(i->GetSenderAppId(), i->GetId(), uid);
@@ -476,7 +476,7 @@ int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedItem
   }
 
   if (ret == ERROR_NONE) {
-    CheckLimit(*(addedItem.begin()), db);
+    CheckLimit(*(addedList.begin()), db);
     if (sqlite3_exec(db, "END TRANSACTION", nullptr, nullptr, nullptr)) {
       LOGE("end transaction error : %s", sqlite3_errmsg(db));
       ret = ERROR_FROM_DB;
@@ -606,7 +606,7 @@ int DBManager::UpdateHideList(shared_ptr<item::AbstractItem> updatedItem,
   return ret;
 }
 
-int DBManager::UpdateNotification(list<shared_ptr<item::AbstractItem>> updatedItem) {
+int DBManager::UpdateNotification(list<shared_ptr<item::AbstractItem>> updatedList) {
   int ret = ERROR_NONE;
   char* query;
   sqlite3* db = OpenDB();
@@ -619,7 +619,7 @@ int DBManager::UpdateNotification(list<shared_ptr<item::AbstractItem>> updatedIt
     return ERROR_FROM_DB;
   }
 
-  for (auto& i : updatedItem) {
+  for (auto& i : updatedList) {
     uid_t uid = static_pointer_cast<IItemInfoInternal>(i->GetInfo())->GetUid();
     list<shared_ptr<item::AbstractItem>> item_list =
         GetNotificationList(i->GetSenderAppId(), i->GetId(), uid);
@@ -811,7 +811,7 @@ list<shared_ptr<item::AbstractItem>> DBManager::GetNotificationList(
 }
 
 int DBManager::DeleteNotification(
-    list<shared_ptr<item::AbstractItem>> deletedItem) {
+    list<shared_ptr<item::AbstractItem>> deletedList) {
   int ret = ERROR_NONE;
   char* query;
   sqlite3* db = OpenDB();
@@ -824,7 +824,7 @@ int DBManager::DeleteNotification(
     return ERROR_FROM_DB;
   }
 
-  for (auto& i : deletedItem) {
+  for (auto& i : deletedList) {
     query = sqlite3_mprintf("DELETE FROM noti_ex_list WHERE priv_id = %" PRId64 "",
       static_pointer_cast<IItemInfoInternal>(i->GetInfo())->GetPrivateId());
     if (!query) {
index 1af21da..f2a4e5e 100644 (file)
@@ -36,13 +36,13 @@ class EXPORT_API DBManager {
  public:
   static int InitializeDB();
   static void InitializeData();
-  static int InsertNotification(std::list<std::shared_ptr<item::AbstractItem>> addedItem);
+  static int InsertNotification(std::list<std::shared_ptr<item::AbstractItem>> addedList);
   static std::map<std::string, std::string> GetHideMap();
   static int UpdateHideList(std::shared_ptr<item::AbstractItem> updatedItem, const std::string& hide_list);
-  static int UpdateNotification(std::list<std::shared_ptr<item::AbstractItem>> updatedItem);
+  static int UpdateNotification(std::list<std::shared_ptr<item::AbstractItem>> updatedList);
   static int GetCount(int64_t priv_id, const std::string& root_id, const std::string& app_id,  uid_t uid, int* count);
   static int GetCount(const std::string& app_id, uid_t uid, int* count);
-  static int DeleteNotification(std::list<std::shared_ptr<item::AbstractItem>> deletedItem);
+  static int DeleteNotification(std::list<std::shared_ptr<item::AbstractItem>> deletedList);
   static std::list<std::shared_ptr<item::AbstractItem>> GetNotificationList(uid_t uid, std::string channel = "");
   static std::list<std::shared_ptr<item::AbstractItem>> GetNotificationList(std::string app_id, uid_t uid, std::string channel = "");
   static std::list<std::shared_ptr<item::AbstractItem>> GetNotificationList(std::string app_id, std::string root_id, uid_t uid);
index 112143c..5243dfb 100644 (file)
@@ -257,15 +257,15 @@ void Manager::OnEvent(const IEventInfo& info, list<Bundle> serialized) {
 }
 
 void Manager::OnAdd(const IEventInfo& info,
-      list<shared_ptr<item::AbstractItem>> addedItem) {
+      list<shared_ptr<item::AbstractItem>> addedList) {
 }
 
 void Manager::OnUpdate(const IEventInfo& info,
-      list<shared_ptr<item::AbstractItem>> updatedItem) {
+      list<shared_ptr<item::AbstractItem>> updatedList) {
 }
 
 void Manager::OnDelete(const IEventInfo& info,
-      list<shared_ptr<item::AbstractItem>> deletedItem) {
+      list<shared_ptr<item::AbstractItem>> deletedList) {
 }
 
 void Manager::OnError(NotificationError error, int requestId) {
index 30318f6..5134dee 100644 (file)
@@ -58,9 +58,9 @@ class EXPORT_API Manager : public IEventObserver {
   static std::string GetPath();
 
  protected:
-  virtual void OnAdd(const IEventInfo& info, std::list<std::shared_ptr<item::AbstractItem>> addedItem);
-  virtual void OnUpdate(const IEventInfo& info, std::list<std::shared_ptr<item::AbstractItem>> updatedItem);
-  virtual void OnDelete(const IEventInfo& info, std::list<std::shared_ptr<item::AbstractItem>> deletedItem);
+  virtual void OnAdd(const IEventInfo& info, std::list<std::shared_ptr<item::AbstractItem>> addedList);
+  virtual void OnUpdate(const IEventInfo& info, std::list<std::shared_ptr<item::AbstractItem>> updatedList);
+  virtual void OnDelete(const IEventInfo& info, std::list<std::shared_ptr<item::AbstractItem>> deletedList);
   virtual void OnError(NotificationError error, int requestId);
   virtual std::list<std::shared_ptr<item::AbstractItem>> OnRequestEvent(
       const IEventInfo& info);
index cabc644..804af1b 100644 (file)
@@ -100,18 +100,18 @@ class ManagerCallbackInfo {
   }
 
   void InvokeAdded(Manager* manager, const IEventInfo& info,
-      list<shared_ptr<AbstractItem>> addedItem) {
+      list<shared_ptr<AbstractItem>> addedList) {
     if (cb_.added == nullptr)
       return;
     noti_ex_item_h* added_item =
-        (noti_ex_item_h*)calloc(addedItem.size(), sizeof(noti_ex_item_h));
+        (noti_ex_item_h*)calloc(addedList.size(), sizeof(noti_ex_item_h));
     if (added_item == nullptr) {
       LOGE("Out of memory");
       return;
     }
 
     int idx = 0;
-    for (auto& i : addedItem) {
+    for (auto& i : addedList) {
       added_item[idx++] =
           static_cast<noti_ex_item_h>(new Handle(shared_ptr<AbstractItem>(i)));
     }
@@ -119,16 +119,16 @@ class ManagerCallbackInfo {
     IEventInfo* c_info = const_cast<IEventInfo*>(&info);
     cb_.added(static_cast<noti_ex_manager_h>(manager),
         static_cast<noti_ex_event_info_h>(c_info), added_item,
-        addedItem.size(), user_data_);
+        addedList.size(), user_data_);
   }
 
   void InvokeUpdated(Manager* manager, const IEventInfo& info,
-      list<shared_ptr<AbstractItem>> updatedItem) {
+      list<shared_ptr<AbstractItem>> updatedList) {
     if (cb_.updated == nullptr)
       return;
 
     IEventInfo* c_info = const_cast<IEventInfo*>(&info);
-    for (auto& i : updatedItem) {
+    for (auto& i : updatedList) {
       cb_.updated(static_cast<noti_ex_manager_h>(manager),
         static_cast<noti_ex_event_info_h>(c_info),
         static_cast<noti_ex_item_h>(new Handle(shared_ptr<AbstractItem>(i))),
@@ -137,12 +137,12 @@ class ManagerCallbackInfo {
   }
 
   void InvokeDeleted(Manager* manager, const IEventInfo& info,
-      list<shared_ptr<AbstractItem>> deletedItem) {
+      list<shared_ptr<AbstractItem>> deletedList) {
     if (cb_.deleted == nullptr)
       return;
 
     IEventInfo* c_info = const_cast<IEventInfo*>(&info);
-    for (auto& i : deletedItem) {
+    for (auto& i : deletedList) {
       cb_.deleted(static_cast<noti_ex_manager_h>(manager),
         static_cast<noti_ex_event_info_h>(c_info),
         static_cast<noti_ex_item_h>(new Handle(shared_ptr<AbstractItem>(i))),
@@ -170,18 +170,18 @@ class ManagerStub : public Manager {
   }
 
   void OnAdd(const IEventInfo& info,
-      list<shared_ptr<AbstractItem>> addedItem) override {
-    cb_->InvokeAdded(this, info, addedItem);
+      list<shared_ptr<AbstractItem>> addedList) override {
+    cb_->InvokeAdded(this, info, addedList);
   }
 
   void OnUpdate(const IEventInfo& info,
-      list<shared_ptr<AbstractItem>> updatedItem) override {
-    cb_->InvokeUpdated(this, info, updatedItem);
+      list<shared_ptr<AbstractItem>> updatedList) override {
+    cb_->InvokeUpdated(this, info, updatedList);
   }
 
   void OnDelete(const IEventInfo& info,
-      list<shared_ptr<AbstractItem>> deletedItem) override {
-    cb_->InvokeDeleted(this, info, deletedItem);
+      list<shared_ptr<AbstractItem>> deletedList) override {
+    cb_->InvokeDeleted(this, info, deletedList);
   }
 
   void OnError(NotificationError error, int requestId) override {