Check c++ coding style 56/204456/2
authormk5004.lee <mk5004.lee@samsung.com>
Wed, 24 Apr 2019 05:07:57 +0000 (14:07 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Wed, 24 Apr 2019 06:03:26 +0000 (15:03 +0900)
 - cpplint tool

Change-Id: I422f557ddc22bea22cb3212c57de137d6299c875
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
src/notification_ex_service.cc

index 34670a2..f2f8c23 100755 (executable)
@@ -17,6 +17,7 @@
 #include <dlog.h>
 #include <stdio.h>
 #include <stdlib.h>
+
 #include <iostream>
 #include <sstream>
 #include <algorithm>
 #include "debug.h"
 #include "notification_ex_service.h"
 
-using namespace notification;
 using namespace std;
+using namespace notification;
 using namespace notification::item;
 
 class DPMFacade {
 public:
-   DPMFacade(unique_ptr<Reporter> reporter, unique_ptr<Manager> manager)
-    : reporter_(move(reporter)), manager_(move(manager)) {
-      DBManager::InitializeDB();
-      DBManager::InitializeData();
-      hide_map_ = DBManager::GetHideMap();
-   }
-
-   void DelegateReporterEvent(const IEventInfo& info, shared_ptr<item::AbstractItem> item) {
-     reporter_->SendEvent(info, item);
-   }
-
-   void DelegateManagerEvent(const IEventInfo& info, shared_ptr<item::AbstractItem> noti) {
-     manager_->SendEvent(info, noti);
-   }
-
-   unique_ptr<Reporter> reporter_;
-   unique_ptr<Manager> manager_;
-   map<string, string> hide_map_;
+ public:
+  DPMFacade(unique_ptr<Reporter> reporter, unique_ptr<Manager> manager)
+      : reporter_(move(reporter)), manager_(move(manager)) {
+    DBManager::InitializeDB();
+    DBManager::InitializeData();
+    hide_map_ = DBManager::GetHideMap();
+  }
+
+  void DelegateReporterEvent(const IEventInfo& info, shared_ptr<item::AbstractItem> item) {
+    reporter_->SendEvent(info, item);
+  }
+
+  void DelegateManagerEvent(const IEventInfo& info, shared_ptr<item::AbstractItem> noti) {
+    manager_->SendEvent(info, noti);
+  }
+
+  unique_ptr<Reporter> reporter_;
+  unique_ptr<Manager> manager_;
+  map<string, string> hide_map_;
 };
 
 static DPMFacade* facade_;
 
 class DPMReporter : public Reporter {
  protected:
-
   void OnUpdate(const IEventInfo& info,
       shared_ptr<item::AbstractItem> updatedItem) {
     DBG("Update !!!");
@@ -95,7 +95,6 @@ class DPMReporter : public Reporter {
     } else {
       SendError(info, static_cast<NotificationError>(ret));
     }
-
   }
 
   void OnDelete(const IEventInfo& info,
@@ -113,7 +112,6 @@ class DPMReporter : public Reporter {
     } else {
       SendError(info, static_cast<NotificationError>(ret));
     }
-
   }
 
   void OnEvent(const IEventInfo& info,
@@ -121,7 +119,7 @@ class DPMReporter : public Reporter {
     LOGI("Event received (%d) !!", (int)info.GetEventType());
     int type = info.GetEventType();
     for (auto& i : noti_list) {
-      switch(type) {
+      switch (type) {
       case IEventInfo::EventType::Update:
         OnUpdate(info, i);
         break;
@@ -171,7 +169,7 @@ class DPMReporter : public Reporter {
     /* Check new hide app */
     hide_list = noti->second;
     for (auto& i : updated_hide_list) {
-      if(hide_list.find(i + ";") == string::npos) {
+      if (hide_list.find(i + ";") == string::npos) {
         string new_hide_list = hide_list + i + ";";
         ret = DBManager::UpdateHideList(updatedItem, new_hide_list);
         if (ret != ERROR_NONE)
@@ -218,7 +216,7 @@ class DPMManager : public Manager {
     }
   }
 
-  void  OnAdd(const IEventInfo& info,
+  void OnAdd(const IEventInfo& info,
       list<shared_ptr<item::AbstractItem>> addedItem) override {
     DBG("Add !!!");
     int ret;
@@ -230,7 +228,6 @@ class DPMManager : public Manager {
     } else {
         DBG("SendError !!!");
         SendError(info, static_cast<NotificationError>(ret));
-
     }
   }
 
@@ -260,7 +257,6 @@ class DPMManager : public Manager {
     } else {
       SendError(info, static_cast<NotificationError>(ret));
     }
-
   }
 
   list<shared_ptr<item::AbstractItem>> OnRequestEvent(const IEventInfo& info) override {
@@ -289,16 +285,11 @@ HAPI int notification_ex_service_init() {
     unique_ptr<Reporter>(
       new DPMReporter(
         unique_ptr<DBusSender>(new DBusSender(Manager::GetPath())),
-        unique_ptr<DBusEventListener>(new DBusEventListener(Reporter::GetPath()))
-      )
-    ),
+        unique_ptr<DBusEventListener>(new DBusEventListener(Reporter::GetPath())))),
     unique_ptr<Manager>(
       new DPMManager(
         unique_ptr<DBusSender>(new DBusSender(Reporter::GetPath())),
-        unique_ptr<DBusEventListener>(new DBusEventListener(Manager::GetPath()))
-      )
-    )
-  );
+        unique_ptr<DBusEventListener>(new DBusEventListener(Manager::GetPath())))));
 
   return ERROR_NONE;
 }