From: mk5004.lee Date: Wed, 25 Sep 2019 01:44:15 +0000 (+0900) Subject: Check coding style X-Git-Tag: submit/tizen/20190925.022713~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01a0c321e45263a43dfcd301b65b7ef4d4954cb9;p=platform%2Fcore%2Fapi%2Fnotification.git Check coding style Change-Id: I84c560ab963105c2dbbfce2e4f368c4d41b9fc87 Signed-off-by: mk5004.lee --- diff --git a/notification-ex/abstract_item.cc b/notification-ex/abstract_item.cc index 375fe0ef..5ab91e95 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 223ba2a8..8c80bb62 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 29dc0bdb..f943a0c7 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 59f9139f..f0fed1b7 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 f72d4849..5039fc14 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 12835e8e..f0fb4012 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 efb8d70c..d32985c9 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 72b4677d..74cebbda 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 e36c3873..6652afff 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 f2751ada..51d7e5da 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 995d0453..1f967585 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 9e8b3a58..1daef176 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 4626e269..8f95d25f 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 66276526..bad3a231 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 2bdd2e3c..dadfc6c6 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 df830346..afdc60b9 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 b34eb507..d0c746cf 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 8f12d69b..0cd03582 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 f2dd10d1..38edea46 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 8cf60663..490e3291 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 2325860f..e57d3a1a 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 db59895c..5f749725 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 90df3584..45257d9b 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 44cff3fa..55148b38 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 0db75501..adedb8a6 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 24040be6..a244923a 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 45ab0b1a..d5ca8a4b 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 74627ccc..5b777589 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 5139241a..fadd3fc0 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 8855226c..bb75681d 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 d21479f0..9d734476 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_;