Check coding style 33/214633/1
authormk5004.lee <mk5004.lee@samsung.com>
Wed, 25 Sep 2019 01:44:15 +0000 (10:44 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Wed, 25 Sep 2019 01:44:15 +0000 (10:44 +0900)
Change-Id: I84c560ab963105c2dbbfce2e4f368c4d41b9fc87
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
31 files changed:
notification-ex/abstract_item.cc
notification-ex/abstract_item.h
notification-ex/abstract_item_implementation.h
notification-ex/api/notification_ex_event_info.h
notification-ex/api/notification_ex_manager.h
notification-ex/api/notification_ex_reporter.h
notification-ex/app_control_action.h
notification-ex/common.h
notification-ex/db_manager.cc
notification-ex/db_manager.h
notification-ex/dbus_connection_manager.h
notification-ex/dbus_event_listener.h
notification-ex/dbus_sender.h
notification-ex/event_observer_interface.h
notification-ex/event_sender_interface.h
notification-ex/group_item_implementation.h
notification-ex/ievent_info.h
notification-ex/iitem_factory.h
notification-ex/iitem_info_internal.h
notification-ex/image_item.h
notification-ex/input_selector_item.h
notification-ex/item_inflator.h
notification-ex/item_info_internal.h
notification-ex/manager.h
notification-ex/progress_item.h
notification-ex/progress_item_implementation.h
notification-ex/reporter.h
notification-ex/stub.cc
notification-ex/text_item.h
notification-ex/visibility_action.h
notification-ex/visibility_action_implementation.h

index 375fe0e..5ab91e9 100644 (file)
@@ -571,7 +571,7 @@ bool AbstractItem::SetMainType(std::string target_id, MainType type) {
   AbstractItem& target = FindByID(target_id);
   if (target.GetType() == NullObject)
     return false;
-  if (!impl_->IsValidMainType(target,type)) {
+  if (!impl_->IsValidMainType(target, type)) {
     LOGE("Main type and item type are not matched (%d, %d)",
         type, target.GetType());
     return false;
index 223ba2a..8c80bb6 100644 (file)
@@ -23,6 +23,7 @@
 #include <memory>
 #include <string>
 #include <list>
+#include <vector>
 
 #include "notification-ex/abstract_action.h"
 #include "notification-ex/multi_language.h"
index 29dc0bd..f943a0c 100644 (file)
@@ -20,6 +20,7 @@
 #include <string>
 #include <memory>
 #include <list>
+#include <vector>
 
 #include "notification-ex/abstract_item.h"
 
index 59f9139..f0fed1b 100644 (file)
@@ -43,7 +43,7 @@ typedef enum _noti_ex_event_info_type {
  * @brief The handle for the notification event information.
  * @since_tizen 5.5
  */
-typedef voidnoti_ex_event_info_h;
+typedef void *noti_ex_event_info_h;
 
 /**
  * @brief Clones the notification event info handle.
index f72d484..5039fc1 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  * @brief The notification_ex manager handle.
  * @since_tizen 5.5
  */
-typedef voidnoti_ex_manager_h;
+typedef void *noti_ex_manager_h;
 
 /**
  * @brief Called when a notification addition event is received.
index 12835e8..f0fb401 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  * @brief The notification_ex reporter handle.
  * @since_tizen 5.5
  */
-typedef voidnoti_ex_reporter_h;
+typedef void *noti_ex_reporter_h;
 
 /**
  * @brief Called when the error event is received.
index efb8d70..d32985c 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <app_control.h>
 
+#include <string>
+
 #include "notification-ex/abstract_action.h"
 
 namespace notification {
index 72b4677..74cebbd 100644 (file)
 namespace notification {
 
 enum NotificationError {
- ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
- ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
- ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
- ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
- ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01, /**< Error from DB query */
- ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Already exist private ID */
- ERROR_FROM_DBUS = TIZEN_ERROR_NOTIFICATION | 0x03, /**< Error from DBus */
- ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x04, /**< Not exist private ID */
- ERROR_SERVICE_NOT_READY = TIZEN_ERROR_NOTIFICATION | 0x05, /**< No response from notification service */
- ERROR_MAX_EXCEEDED = TIZEN_ERROR_NOTIFICATION | 0x06, /**< Max notification count exceeded (@b Since: 3.0) */
 ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
 ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
 ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
 ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
 ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
 ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Function not implemented (@b Since: @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
 ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01, /**< Error from DB query */
 ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Already exist private ID */
 ERROR_FROM_DBUS = TIZEN_ERROR_NOTIFICATION | 0x03, /**< Error from DBus */
 ERROR_NOT_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x04, /**< Not exist private ID */
 ERROR_SERVICE_NOT_READY = TIZEN_ERROR_NOTIFICATION | 0x05, /**< No response from notification service */
 ERROR_MAX_EXCEEDED = TIZEN_ERROR_NOTIFICATION | 0x06, /**< Max notification count exceeded (@b Since: 3.0) */
 };
 
 }  // namespace notification
index e36c387..6652aff 100644 (file)
@@ -413,7 +413,7 @@ int DBManager::InsertNotification(list<shared_ptr<item::AbstractItem>> addedItem
           uid,
           i->GetChannel().c_str(),
           util::GetQuarkFromString(i->GetId() + to_string(uid)),
-          GetPkgId(i->GetSenderAppId(),uid).c_str(),
+          GetPkgId(i->GetSenderAppId(), uid).c_str(),
           static_cast<int>(i->GetPolicy()),
           reinterpret_cast<char*>(b.ToRaw().first.get()),
           static_pointer_cast<IItemInfo>(i->GetInfo())->GetTime());
index f2751ad..51d7e5d 100644 (file)
@@ -60,8 +60,7 @@ class EXPORT_API DBManager {
   static void CheckLimit(std::shared_ptr<item::AbstractItem> addedItem, sqlite3* db);
   static int UpdateReceiverList(std::shared_ptr<item::AbstractItem> updatedItem,  sqlite3* db);
   static std::list<std::shared_ptr<item::AbstractItem>> ExecuteGetList(char* query);
-
 };
 }  // namespace notification
 
-#endif  // NOTIFICATION_EX_DB_MANAGER_H_
\ No newline at end of file
+#endif  // NOTIFICATION_EX_DB_MANAGER_H_
index 995d045..1f96758 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NOTIFICATION_EX_DBUS_MANAGER_H_
-#define NOTIFICATION_EX_DBUS_MANAGER_H_
+#ifndef NOTIFICATION_EX_DBUS_CONNECTION_MANAGER_H_
+#define NOTIFICATION_EX_DBUS_CONNECTION_MANAGER_H_
 
 #include <gio/gio.h>
 
@@ -47,4 +47,4 @@ class EXPORT_API DBusConnectionManager {
 
 }  // namespace notification
 
-#endif  // NOTIFICATION_EX_DBUS_MANAGER_H_
+#endif  // NOTIFICATION_EX_DBUS_CONNECTION_MANAGER_H_
index 9e8b3a5..1daef17 100644 (file)
  * limitations under the License.
  */
 
-#ifndef NOTIFICATION_EX_DBUS_LISTENER_H_
-#define NOTIFICATION_EX_DBUS_LISTENER_H_
+#ifndef NOTIFICATION_EX_DBUS_EVENT_LISTENER_H_
+#define NOTIFICATION_EX_DBUS_EVENT_LISTENER_H_
+
+#include <string>
+#include <list>
 
 #include "notification-ex/event_listener_interface.h"
 
@@ -40,4 +43,4 @@ class EXPORT_API DBusEventListener : public IEventListener {
 
 }  // namespace notification
 
-#endif  // NOTIFICATION_EX_DBUS_LISTENER_H_
+#endif  // NOTIFICATION_EX_DBUS_EVENT_LISTENER_H_
index 4626e26..8f95d25 100644 (file)
@@ -19,6 +19,9 @@
 
 #include <bundle_cpp.h>
 
+#include <string>
+#include <list>
+
 #include "notification-ex/event_sender_interface.h"
 #include "notification-ex/ievent_info.h"
 
index 6627652..bad3a23 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NOTIFICATION_EX_OBSERVER_INTERFACE_H_
-#define NOTIFICATION_EX_OBSERVER_INTERFACE_H_
+#ifndef NOTIFICATION_EX_EVENT_OBSERVER_INTERFACE_H_
+#define NOTIFICATION_EX_EVENT_OBSERVER_INTERFACE_H_
 
 #include <bundle_cpp.h>
 
@@ -40,4 +40,4 @@ class EXPORT_API IEventObserver {
 
 }  // namespace notification
 
-#endif
+#endif  // NOTIFICATION_EX_EVENT_OBSERVER_INTERFACE_H_
index 2bdd2e3..dadfc6c 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <bundle_cpp.h>
 
+#include <string>
 #include <list>
 
 #include "notification-ex/ievent_info.h"
index df83034..afdc60b 100644 (file)
@@ -40,7 +40,6 @@ class GroupItem::Impl {
   bool is_vertical_ = true;
   std::string app_label_;
   GroupItem* parent_;
-
 };
 
 }  // namespace item
index b34eb50..d0c746c 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <bundle_cpp.h>
 
+#include <string>
+
 namespace notification {
 
 #ifndef EXPORT_API
index 8f12d69..0cd0358 100644 (file)
@@ -49,4 +49,4 @@ class EXPORT_API IItemFactory {
 }  // namespace item
 }  // namespace notification
 
-#endif  // NOTIFICATION_EX_ITEM_FACTORY_H_
+#endif  // NOTIFICATION_EX_IITEM_FACTORY_H_
index f2dd10d..38edea4 100644 (file)
@@ -17,6 +17,9 @@
 #ifndef NOTIFICATION_EX_IITEM_INFO_INTERNAL_H_
 #define NOTIFICATION_EX_IITEM_INFO_INTERNAL_H_
 
+#include <string>
+#include <list>
+
 #include "notification-ex/iitem_info.h"
 
 #ifndef EXPORT_API
index 8cf6066..490e329 100644 (file)
@@ -97,7 +97,7 @@ class EXPORT_API ImageItem : public AbstractItem {
  private:
   class Impl;
   std::unique_ptr<Impl> impl_;
-};  //class ImageItem
+};  // class ImageItem
 
 }  // namespace item
 }  // namespace notification
index 2325860..e57d3a1 100644 (file)
@@ -61,14 +61,14 @@ class EXPORT_API InputSelectorItem : public AbstractItem {
    * @since_tizen 5.5
    * @return Bundle type data
    */
-  virtual tizen_base::Bundle Serialize() const override;
+  tizen_base::Bundle Serialize() const override;
 
   /**
    * @brief Deserialize the serialized data.
    * @since_tizen 5.5
    * @param[in] b The serialized Bundle data
    */
-  virtual void Deserialize(tizen_base::Bundle b) override;
+  void Deserialize(tizen_base::Bundle b) override;
 
   /**
    * @brief Checks the item type exist in this notification.
index db59895..5f74972 100644 (file)
@@ -32,7 +32,6 @@ namespace item {
  */
 class EXPORT_API ItemInflator {
  public:
-
   /**
    * @brief Creates AbstractItem from Bundle data
    * @since_tizen 5.5
index 90df358..45257d9 100644 (file)
@@ -17,6 +17,9 @@
 #ifndef NOTIFICATION_EX_ITEM_INFO_INTERNAL_H_
 #define NOTIFICATION_EX_ITEM_INFO_INTERNAL_H_
 
+#include <string>
+#include <list>
+
 #include "notification-ex/abstract_item_implementation.h"
 #include "notification-ex/iitem_info_internal.h"
 
index 44cff3f..55148b3 100644 (file)
@@ -66,7 +66,6 @@ class EXPORT_API Manager : public IEventObserver {
  private:
   class Impl;
   std::unique_ptr<Impl> impl_;
-
 };
 
 }  // namespace notification
index 0db7550..adedb8a 100644 (file)
@@ -75,14 +75,14 @@ class EXPORT_API ProgressItem : public AbstractItem {
    * @since_tizen 5.5
    * @return Bundle type data
    */
-  virtual tizen_base::Bundle Serialize() const override;
+  tizen_base::Bundle Serialize() const override;
 
   /**
    * @brief Deserialize the serialized data.
    * @since_tizen 5.5
    * @param[in] b The serialized Bundle data
    */
-  virtual void Deserialize(tizen_base::Bundle b) override;
+  void Deserialize(tizen_base::Bundle b) override;
 
   /**
    * @brief Checks the item type exist in this notification.
index 24040be..a244923 100644 (file)
@@ -1,5 +1,3 @@
-
-
 /*
  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
@@ -16,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NOTIFICATION_EX_INPUT_SELECTOR_ITEM_IMPLEMENTATION_H_
-#define NOTIFICATION_EX_INPUT_SELECTOR_ITEM_IMPLEMENTATION_H_
+#ifndef NOTIFICATION_EX_PROGRESS_ITEM_IMPLEMENTATION_H_
+#define NOTIFICATION_EX_PROGRESS_ITEM_IMPLEMENTATION_H_
 
 #include <string>
 #include <memory>
@@ -50,4 +48,4 @@ class ProgressItem::Impl {
 }  // namespace item
 }  // namespace notification
 
-#endif  // NOTIFICATION_EX_INPUT_SELECTOR_ITEM_IMPLEMENTATION_H_
+#endif  // NOTIFICATION_EX_PROGRESS_ITEM_IMPLEMENTATION_H_
index 45ab0b1..d5ca8a4 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef NOTIFICATION_EX_REPOTER_H_
-#define NOTIFICATION_EX_REPOTER_H_
+#ifndef NOTIFICATION_EX_REPORTER_H_
+#define NOTIFICATION_EX_REPORTER_H_
 
 #include <string>
 #include <list>
@@ -68,4 +68,4 @@ class EXPORT_API Reporter : public IEventObserver {
 
 }  // namespace notification
 
-#endif  // NOTIFICATION_EX_REPOTER_H_
+#endif  // NOTIFICATION_EX_REPORTER_H_
index 74627cc..5b77758 100644 (file)
@@ -150,7 +150,7 @@ class ManagerCallbackInfo {
     if (cb_.deleted == nullptr)
       return;
     IEventInfo* c_info = const_cast<IEventInfo*>(&info);
-    if(c_info->GetEventType() == static_cast<int>(IEventInfo::EventType::DeleteAll)) {
+    if (c_info->GetEventType() == static_cast<int>(IEventInfo::EventType::DeleteAll)) {
       cb_.deleted(static_cast<noti_ex_manager_h>(manager),
         static_cast<noti_ex_event_info_h>(c_info),
         nullptr, user_data_);
index 5139241..fadd3fc 100644 (file)
@@ -45,7 +45,7 @@ class EXPORT_API TextItem : public AbstractItem {
    * @param[in] hyperlink The hyperlink of TextItem
    * @param[in] action The action for TextItem
    */
-  TextItem(std::string id ,std::string text,
+  TextItem(std::string idstd::string text,
       std::string hyperlink = std::string(),
       std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
 
index 8855226..bb75681 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef NOTIFICATION_EX_VISIBILITY_ACTION_H_
 #define NOTIFICATION_EX_VISIBILITY_ACTION_H_
 
+#include <string>
+
 #include "notification-ex/abstract_action.h"
 
 namespace notification {
index d21479f..9d73447 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef NOTIFICATION_EX_VISIBILITY_ACTION_IMPLEMENTATION_H_
 #define NOTIFICATION_EX_VISIBILITY_ACTION_IMPLEMENTATION_H_
 
+#include <string>
 #include <list>
 
 #include "notification-ex/visibility_action.h"
@@ -40,7 +41,7 @@ class VisibilityAction::Impl {
      VisibilityEntity(std::string id, bool visibility)
        : id_(id), visibility_(visibility) {
      }
-   };
+  };
 
  private:
   VisibilityAction* parent_;