From 01a0c321e45263a43dfcd301b65b7ef4d4954cb9 Mon Sep 17 00:00:00 2001 From: "mk5004.lee" Date: Wed, 25 Sep 2019 10:44:15 +0900 Subject: Check coding style Change-Id: I84c560ab963105c2dbbfce2e4f368c4d41b9fc87 Signed-off-by: mk5004.lee --- notification-ex/abstract_item.cc | 2 +- notification-ex/abstract_item.h | 1 + notification-ex/abstract_item_implementation.h | 1 + notification-ex/api/notification_ex_event_info.h | 2 +- notification-ex/api/notification_ex_manager.h | 2 +- notification-ex/api/notification_ex_reporter.h | 2 +- notification-ex/app_control_action.h | 2 ++ notification-ex/common.h | 24 +++++++++++----------- notification-ex/db_manager.cc | 2 +- notification-ex/db_manager.h | 3 +-- notification-ex/dbus_connection_manager.h | 6 +++--- notification-ex/dbus_event_listener.h | 9 +++++--- notification-ex/dbus_sender.h | 3 +++ notification-ex/event_observer_interface.h | 6 +++--- notification-ex/event_sender_interface.h | 1 + notification-ex/group_item_implementation.h | 1 - notification-ex/ievent_info.h | 2 ++ notification-ex/iitem_factory.h | 2 +- notification-ex/iitem_info_internal.h | 3 +++ notification-ex/image_item.h | 2 +- notification-ex/input_selector_item.h | 4 ++-- notification-ex/item_inflator.h | 1 - notification-ex/item_info_internal.h | 3 +++ notification-ex/manager.h | 1 - notification-ex/progress_item.h | 4 ++-- notification-ex/progress_item_implementation.h | 8 +++----- notification-ex/reporter.h | 6 +++--- notification-ex/stub.cc | 2 +- notification-ex/text_item.h | 2 +- notification-ex/visibility_action.h | 2 ++ notification-ex/visibility_action_implementation.h | 3 ++- 31 files changed, 64 insertions(+), 48 deletions(-) diff --git a/notification-ex/abstract_item.cc b/notification-ex/abstract_item.cc index 375fe0e..5ab91e9 100644 --- a/notification-ex/abstract_item.cc +++ b/notification-ex/abstract_item.cc @@ -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; diff --git a/notification-ex/abstract_item.h b/notification-ex/abstract_item.h index 223ba2a..8c80bb6 100644 --- a/notification-ex/abstract_item.h +++ b/notification-ex/abstract_item.h @@ -23,6 +23,7 @@ #include #include #include +#include #include "notification-ex/abstract_action.h" #include "notification-ex/multi_language.h" diff --git a/notification-ex/abstract_item_implementation.h b/notification-ex/abstract_item_implementation.h index 29dc0bd..f943a0c 100644 --- a/notification-ex/abstract_item_implementation.h +++ b/notification-ex/abstract_item_implementation.h @@ -20,6 +20,7 @@ #include #include #include +#include #include "notification-ex/abstract_item.h" diff --git a/notification-ex/api/notification_ex_event_info.h b/notification-ex/api/notification_ex_event_info.h index 59f9139..f0fed1b 100644 --- a/notification-ex/api/notification_ex_event_info.h +++ b/notification-ex/api/notification_ex_event_info.h @@ -43,7 +43,7 @@ typedef enum _noti_ex_event_info_type { * @brief The handle for the notification event information. * @since_tizen 5.5 */ -typedef void* noti_ex_event_info_h; +typedef void *noti_ex_event_info_h; /** * @brief Clones the notification event info handle. diff --git a/notification-ex/api/notification_ex_manager.h b/notification-ex/api/notification_ex_manager.h index f72d484..5039fc1 100644 --- a/notification-ex/api/notification_ex_manager.h +++ b/notification-ex/api/notification_ex_manager.h @@ -34,7 +34,7 @@ extern "C" { * @brief The notification_ex manager handle. * @since_tizen 5.5 */ -typedef void* noti_ex_manager_h; +typedef void *noti_ex_manager_h; /** * @brief Called when a notification addition event is received. diff --git a/notification-ex/api/notification_ex_reporter.h b/notification-ex/api/notification_ex_reporter.h index 12835e8..f0fb401 100644 --- a/notification-ex/api/notification_ex_reporter.h +++ b/notification-ex/api/notification_ex_reporter.h @@ -34,7 +34,7 @@ extern "C" { * @brief The notification_ex reporter handle. * @since_tizen 5.5 */ -typedef void* noti_ex_reporter_h; +typedef void *noti_ex_reporter_h; /** * @brief Called when the error event is received. diff --git a/notification-ex/app_control_action.h b/notification-ex/app_control_action.h index efb8d70..d32985c 100644 --- a/notification-ex/app_control_action.h +++ b/notification-ex/app_control_action.h @@ -19,6 +19,8 @@ #include +#include + #include "notification-ex/abstract_action.h" namespace notification { diff --git a/notification-ex/common.h b/notification-ex/common.h index 72b4677..74cebbd 100644 --- a/notification-ex/common.h +++ b/notification-ex/common.h @@ -22,18 +22,18 @@ 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 diff --git a/notification-ex/db_manager.cc b/notification-ex/db_manager.cc index e36c387..6652aff 100644 --- a/notification-ex/db_manager.cc +++ b/notification-ex/db_manager.cc @@ -413,7 +413,7 @@ int DBManager::InsertNotification(list> 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(i->GetPolicy()), reinterpret_cast(b.ToRaw().first.get()), static_pointer_cast(i->GetInfo())->GetTime()); diff --git a/notification-ex/db_manager.h b/notification-ex/db_manager.h index f2751ad..51d7e5d 100644 --- a/notification-ex/db_manager.h +++ b/notification-ex/db_manager.h @@ -60,8 +60,7 @@ class EXPORT_API DBManager { static void CheckLimit(std::shared_ptr addedItem, sqlite3* db); static int UpdateReceiverList(std::shared_ptr updatedItem, sqlite3* db); static std::list> ExecuteGetList(char* query); - }; } // namespace notification -#endif // NOTIFICATION_EX_DB_MANAGER_H_ \ No newline at end of file +#endif // NOTIFICATION_EX_DB_MANAGER_H_ diff --git a/notification-ex/dbus_connection_manager.h b/notification-ex/dbus_connection_manager.h index 995d045..1f96758 100644 --- a/notification-ex/dbus_connection_manager.h +++ b/notification-ex/dbus_connection_manager.h @@ -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 @@ -47,4 +47,4 @@ class EXPORT_API DBusConnectionManager { } // namespace notification -#endif // NOTIFICATION_EX_DBUS_MANAGER_H_ +#endif // NOTIFICATION_EX_DBUS_CONNECTION_MANAGER_H_ diff --git a/notification-ex/dbus_event_listener.h b/notification-ex/dbus_event_listener.h index 9e8b3a5..1daef17 100644 --- a/notification-ex/dbus_event_listener.h +++ b/notification-ex/dbus_event_listener.h @@ -14,8 +14,11 @@ * 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 +#include #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_ diff --git a/notification-ex/dbus_sender.h b/notification-ex/dbus_sender.h index 4626e26..8f95d25 100644 --- a/notification-ex/dbus_sender.h +++ b/notification-ex/dbus_sender.h @@ -19,6 +19,9 @@ #include +#include +#include + #include "notification-ex/event_sender_interface.h" #include "notification-ex/ievent_info.h" diff --git a/notification-ex/event_observer_interface.h b/notification-ex/event_observer_interface.h index 6627652..bad3a23 100644 --- a/notification-ex/event_observer_interface.h +++ b/notification-ex/event_observer_interface.h @@ -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 @@ -40,4 +40,4 @@ class EXPORT_API IEventObserver { } // namespace notification -#endif +#endif // NOTIFICATION_EX_EVENT_OBSERVER_INTERFACE_H_ diff --git a/notification-ex/event_sender_interface.h b/notification-ex/event_sender_interface.h index 2bdd2e3..dadfc6c 100644 --- a/notification-ex/event_sender_interface.h +++ b/notification-ex/event_sender_interface.h @@ -19,6 +19,7 @@ #include +#include #include #include "notification-ex/ievent_info.h" diff --git a/notification-ex/group_item_implementation.h b/notification-ex/group_item_implementation.h index df83034..afdc60b 100644 --- a/notification-ex/group_item_implementation.h +++ b/notification-ex/group_item_implementation.h @@ -40,7 +40,6 @@ class GroupItem::Impl { bool is_vertical_ = true; std::string app_label_; GroupItem* parent_; - }; } // namespace item diff --git a/notification-ex/ievent_info.h b/notification-ex/ievent_info.h index b34eb50..d0c746c 100644 --- a/notification-ex/ievent_info.h +++ b/notification-ex/ievent_info.h @@ -19,6 +19,8 @@ #include +#include + namespace notification { #ifndef EXPORT_API diff --git a/notification-ex/iitem_factory.h b/notification-ex/iitem_factory.h index 8f12d69..0cd0358 100644 --- a/notification-ex/iitem_factory.h +++ b/notification-ex/iitem_factory.h @@ -49,4 +49,4 @@ class EXPORT_API IItemFactory { } // namespace item } // namespace notification -#endif // NOTIFICATION_EX_ITEM_FACTORY_H_ +#endif // NOTIFICATION_EX_IITEM_FACTORY_H_ diff --git a/notification-ex/iitem_info_internal.h b/notification-ex/iitem_info_internal.h index f2dd10d..38edea4 100644 --- a/notification-ex/iitem_info_internal.h +++ b/notification-ex/iitem_info_internal.h @@ -17,6 +17,9 @@ #ifndef NOTIFICATION_EX_IITEM_INFO_INTERNAL_H_ #define NOTIFICATION_EX_IITEM_INFO_INTERNAL_H_ +#include +#include + #include "notification-ex/iitem_info.h" #ifndef EXPORT_API diff --git a/notification-ex/image_item.h b/notification-ex/image_item.h index 8cf6066..490e329 100644 --- a/notification-ex/image_item.h +++ b/notification-ex/image_item.h @@ -97,7 +97,7 @@ class EXPORT_API ImageItem : public AbstractItem { private: class Impl; std::unique_ptr impl_; -}; //class ImageItem +}; // class ImageItem } // namespace item } // namespace notification diff --git a/notification-ex/input_selector_item.h b/notification-ex/input_selector_item.h index 2325860..e57d3a1 100644 --- a/notification-ex/input_selector_item.h +++ b/notification-ex/input_selector_item.h @@ -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. diff --git a/notification-ex/item_inflator.h b/notification-ex/item_inflator.h index db59895..5f74972 100644 --- a/notification-ex/item_inflator.h +++ b/notification-ex/item_inflator.h @@ -32,7 +32,6 @@ namespace item { */ class EXPORT_API ItemInflator { public: - /** * @brief Creates AbstractItem from Bundle data * @since_tizen 5.5 diff --git a/notification-ex/item_info_internal.h b/notification-ex/item_info_internal.h index 90df358..45257d9 100644 --- a/notification-ex/item_info_internal.h +++ b/notification-ex/item_info_internal.h @@ -17,6 +17,9 @@ #ifndef NOTIFICATION_EX_ITEM_INFO_INTERNAL_H_ #define NOTIFICATION_EX_ITEM_INFO_INTERNAL_H_ +#include +#include + #include "notification-ex/abstract_item_implementation.h" #include "notification-ex/iitem_info_internal.h" diff --git a/notification-ex/manager.h b/notification-ex/manager.h index 44cff3f..55148b3 100644 --- a/notification-ex/manager.h +++ b/notification-ex/manager.h @@ -66,7 +66,6 @@ class EXPORT_API Manager : public IEventObserver { private: class Impl; std::unique_ptr impl_; - }; } // namespace notification diff --git a/notification-ex/progress_item.h b/notification-ex/progress_item.h index 0db7550..adedb8a 100644 --- a/notification-ex/progress_item.h +++ b/notification-ex/progress_item.h @@ -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. diff --git a/notification-ex/progress_item_implementation.h b/notification-ex/progress_item_implementation.h index 24040be..a244923 100644 --- a/notification-ex/progress_item_implementation.h +++ b/notification-ex/progress_item_implementation.h @@ -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 #include @@ -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_ diff --git a/notification-ex/reporter.h b/notification-ex/reporter.h index 45ab0b1..d5ca8a4 100644 --- a/notification-ex/reporter.h +++ b/notification-ex/reporter.h @@ -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 #include @@ -68,4 +68,4 @@ class EXPORT_API Reporter : public IEventObserver { } // namespace notification -#endif // NOTIFICATION_EX_REPOTER_H_ +#endif // NOTIFICATION_EX_REPORTER_H_ diff --git a/notification-ex/stub.cc b/notification-ex/stub.cc index 74627cc..5b77758 100644 --- a/notification-ex/stub.cc +++ b/notification-ex/stub.cc @@ -150,7 +150,7 @@ class ManagerCallbackInfo { if (cb_.deleted == nullptr) return; IEventInfo* c_info = const_cast(&info); - if(c_info->GetEventType() == static_cast(IEventInfo::EventType::DeleteAll)) { + if (c_info->GetEventType() == static_cast(IEventInfo::EventType::DeleteAll)) { cb_.deleted(static_cast(manager), static_cast(c_info), nullptr, user_data_); diff --git a/notification-ex/text_item.h b/notification-ex/text_item.h index 5139241..fadd3fc 100644 --- a/notification-ex/text_item.h +++ b/notification-ex/text_item.h @@ -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 id, std::string text, std::string hyperlink = std::string(), std::shared_ptr action = std::shared_ptr({})); diff --git a/notification-ex/visibility_action.h b/notification-ex/visibility_action.h index 8855226..bb75681 100644 --- a/notification-ex/visibility_action.h +++ b/notification-ex/visibility_action.h @@ -17,6 +17,8 @@ #ifndef NOTIFICATION_EX_VISIBILITY_ACTION_H_ #define NOTIFICATION_EX_VISIBILITY_ACTION_H_ +#include + #include "notification-ex/abstract_action.h" namespace notification { diff --git a/notification-ex/visibility_action_implementation.h b/notification-ex/visibility_action_implementation.h index d21479f..9d73447 100644 --- a/notification-ex/visibility_action_implementation.h +++ b/notification-ex/visibility_action_implementation.h @@ -17,6 +17,7 @@ #ifndef NOTIFICATION_EX_VISIBILITY_ACTION_IMPLEMENTATION_H_ #define NOTIFICATION_EX_VISIBILITY_ACTION_IMPLEMENTATION_H_ +#include #include #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_; -- cgit v1.2.3