summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--notification-ex/abstract_action.cc2
-rw-r--r--notification-ex/abstract_action.h8
-rw-r--r--notification-ex/abstract_item.cc1
-rw-r--r--notification-ex/abstract_item.h8
-rw-r--r--notification-ex/action_inflator.cc3
-rw-r--r--notification-ex/action_inflator.h2
-rw-r--r--notification-ex/app_control_action.cc6
-rw-r--r--notification-ex/app_control_action.h4
-rw-r--r--notification-ex/button_item.cc2
-rw-r--r--notification-ex/button_item.h4
-rw-r--r--notification-ex/chat_message_item.cc2
-rw-r--r--notification-ex/chat_message_item.h4
-rw-r--r--notification-ex/checkbox_item.cc2
-rw-r--r--notification-ex/checkbox_item.h4
-rw-r--r--notification-ex/db_manager.cc1
-rw-r--r--notification-ex/dbus_connection_manager.h4
-rw-r--r--notification-ex/dbus_event_listener.cc2
-rw-r--r--notification-ex/dbus_event_listener.h4
-rw-r--r--notification-ex/dbus_sender.cc1
-rw-r--r--notification-ex/dbus_sender.h7
-rw-r--r--notification-ex/dbus_sender_implementation.h5
-rw-r--r--notification-ex/entry_item.cc2
-rw-r--r--notification-ex/entry_item.h4
-rw-r--r--notification-ex/event_info.cc1
-rw-r--r--notification-ex/event_info_internal.h7
-rw-r--r--notification-ex/event_listener_interface.h5
-rw-r--r--notification-ex/event_observer_interface.h8
-rw-r--r--notification-ex/event_sender_interface.h8
-rw-r--r--notification-ex/ex_bundle.h230
-rw-r--r--notification-ex/group_item.cc1
-rw-r--r--notification-ex/group_item.h4
-rw-r--r--notification-ex/icon_text_item.cc2
-rw-r--r--notification-ex/icon_text_item.h4
-rw-r--r--notification-ex/ievent_info.h4
-rw-r--r--notification-ex/image_item.cc2
-rw-r--r--notification-ex/image_item.h4
-rw-r--r--notification-ex/input_selector_item.cc2
-rw-r--r--notification-ex/input_selector_item.h4
-rw-r--r--notification-ex/item_inflator.cc2
-rw-r--r--notification-ex/item_inflator.h2
-rw-r--r--notification-ex/manager.cc1
-rw-r--r--notification-ex/manager.h5
-rw-r--r--notification-ex/mock_sender.h2
-rw-r--r--notification-ex/null_item.cc2
-rw-r--r--notification-ex/null_item.h4
-rw-r--r--notification-ex/progress_item.cc2
-rw-r--r--notification-ex/progress_item.h4
-rw-r--r--notification-ex/reporter.cc1
-rw-r--r--notification-ex/reporter.h5
-rw-r--r--notification-ex/stub.cc2
-rw-r--r--notification-ex/text_item.cc2
-rw-r--r--notification-ex/text_item.h4
-rw-r--r--notification-ex/time_item.cc2
-rw-r--r--notification-ex/time_item.h4
-rw-r--r--notification-ex/visibility_action.cc2
-rw-r--r--notification-ex/visibility_action.h4
-rw-r--r--unittest/src/test_abstract_item.cc1
-rw-r--r--unittest/src/test_app_control_action.cc1
-rw-r--r--unittest/src/test_bundle.cc120
-rw-r--r--unittest/src/test_button_item.cc1
-rw-r--r--unittest/src/test_chat_message_item.cc1
-rw-r--r--unittest/src/test_checkbox_item.cc1
-rw-r--r--unittest/src/test_entry_item.cc1
-rw-r--r--unittest/src/test_event_info.cc1
-rw-r--r--unittest/src/test_group_item.cc1
-rw-r--r--unittest/src/test_icon_item.cc1
-rw-r--r--unittest/src/test_icon_text_item.cc1
-rw-r--r--unittest/src/test_image_item.cc1
-rw-r--r--unittest/src/test_input_selector_item.cc1
-rw-r--r--unittest/src/test_progress_item.cc1
-rw-r--r--unittest/src/test_text_item.cc1
-rw-r--r--unittest/src/test_time_item.cc1
-rw-r--r--unittest/src/test_visibility_action.cc1
73 files changed, 136 insertions, 418 deletions
diff --git a/notification-ex/abstract_action.cc b/notification-ex/abstract_action.cc
index 82b388b..0e8f279 100644
--- a/notification-ex/abstract_action.cc
+++ b/notification-ex/abstract_action.cc
@@ -28,6 +28,8 @@
#define ABSTRACT_ACTION_IS_LOCAL_KEY "__ABSTRACT_ACTION_IS_LOCAL_KEY__"
#define ABSTRACT_ACTION_EXTRA_KEY "__ABSTRACT_ACTION_EXTRA_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
AbstractAction::AbstractAction(bool isLocal)
diff --git a/notification-ex/abstract_action.h b/notification-ex/abstract_action.h
index 71d9f1a..f8ace1b 100644
--- a/notification-ex/abstract_action.h
+++ b/notification-ex/abstract_action.h
@@ -20,7 +20,7 @@
#include <memory>
#include <string>
-#include "notification-ex/ex_bundle.h"
+#include <bundle_cpp.h>
#ifndef EXPORT_API
#define EXPORT_API __attribute__((visibility("default")))
@@ -82,21 +82,21 @@ class EXPORT_API AbstractAction {
* @param[in] b Bundle type data
* @return The type of action
*/
- static int GetType(Bundle b);
+ static int GetType(tizen_base::Bundle b);
/**
* @brief Serialize the data of AbstractAction.
* @since_tizen 5.5
* @return Bundle type data
*/
- virtual Bundle Serialize() const = 0;
+ virtual tizen_base::Bundle Serialize() const = 0;
/**
* @brief Deserialize the serialized data.
* @since_tizen 5.5
* @param[in] b The serialized Bundle data
*/
- virtual void Deserialize(Bundle b) = 0;
+ virtual void Deserialize(tizen_base::Bundle b) = 0;
/**
* @brief Gets whether local or not.
diff --git a/notification-ex/abstract_item.cc b/notification-ex/abstract_item.cc
index c24cd17..9010e76 100644
--- a/notification-ex/abstract_item.cc
+++ b/notification-ex/abstract_item.cc
@@ -81,6 +81,7 @@
#define ABSTRACT_ITEM_TRUE "TRUE"
using namespace std;
+using namespace tizen_base;
namespace notification {
namespace item {
diff --git a/notification-ex/abstract_item.h b/notification-ex/abstract_item.h
index 4a9f3b7..3da84f3 100644
--- a/notification-ex/abstract_item.h
+++ b/notification-ex/abstract_item.h
@@ -18,13 +18,13 @@
#define NOTIFICATION_EX_ABSTRACT_ITEM_H_
#include <time.h>
+#include <bundle_cpp.h>
#include <memory>
#include <string>
#include <list>
#include "notification-ex/abstract_action.h"
-#include "notification-ex/ex_bundle.h"
#include "notification-ex/iitem_info.h"
#ifndef EXPORT_API
@@ -758,14 +758,14 @@ class EXPORT_API AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- virtual Bundle Serialize() const = 0;
+ virtual tizen_base::Bundle Serialize() const = 0;
/**
* @brief Deserialize the serialized data.
* @since_tizen 5.5
* @param[in] b The serialized Bundle data
*/
- virtual void Deserialize(Bundle b) = 0;
+ virtual void Deserialize(tizen_base::Bundle b) = 0;
/**
* @brief Finds the AbstractItem using by notification item id.
@@ -795,7 +795,7 @@ class EXPORT_API AbstractItem {
* @since_tizen 5.5
* @return The type of notification item
*/
- static int GetType(Bundle b);
+ static int GetType(tizen_base::Bundle b);
/**
* @brief Gets the path of shared file location.
diff --git a/notification-ex/action_inflator.cc b/notification-ex/action_inflator.cc
index c757e46..23eaa22 100644
--- a/notification-ex/action_inflator.cc
+++ b/notification-ex/action_inflator.cc
@@ -15,6 +15,7 @@
*/
#include <dlog.h>
+#include <bundle_cpp.h>
#include <memory>
@@ -30,7 +31,7 @@
namespace notification {
namespace item {
-std::shared_ptr<AbstractAction> ActionInflator::Create(Bundle b) {
+std::shared_ptr<AbstractAction> ActionInflator::Create(tizen_base::Bundle b) {
std::shared_ptr<AbstractAction> action =
FactoryManager::GetInst().CreateAction(AbstractAction::GetType(b));
action.get()->Deserialize(b);
diff --git a/notification-ex/action_inflator.h b/notification-ex/action_inflator.h
index 243db27..eff5e6d 100644
--- a/notification-ex/action_inflator.h
+++ b/notification-ex/action_inflator.h
@@ -37,7 +37,7 @@ class EXPORT_API ActionInflator {
* @since_tizen 5.5
* @param[in] b Bundle type data
*/
- static std::shared_ptr<AbstractAction> Create(Bundle b);
+ static std::shared_ptr<AbstractAction> Create(tizen_base::Bundle b);
};
} // namespace item
diff --git a/notification-ex/app_control_action.cc b/notification-ex/app_control_action.cc
index 2aa94b6..aef6ee4 100644
--- a/notification-ex/app_control_action.cc
+++ b/notification-ex/app_control_action.cc
@@ -30,6 +30,8 @@
#define LOG_TAG "NOTIFICATION_EX"
#define APPCONTROL_ACTION_KEY "__APPCONTROL_ACTION_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
@@ -71,13 +73,13 @@ Bundle AppControlAction::Serialize() const {
app_control_export_as_bundle(impl_->control_, &control_b);
if (control_b == NULL) {
LOGE("failed to get bundle from app_control");
- return nullptr;
+ return {};
}
bundle_encode(control_b, &control_raw, &len);
if (len <= 0) {
LOGE("bundle encode failed");
- return nullptr;
+ return {};
}
b = AbstractAction::Serialize();
diff --git a/notification-ex/app_control_action.h b/notification-ex/app_control_action.h
index 564b4be..efb8d70 100644
--- a/notification-ex/app_control_action.h
+++ b/notification-ex/app_control_action.h
@@ -64,14 +64,14 @@ class EXPORT_API AppControlAction : public AbstractAction {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Gets whether local or not.
diff --git a/notification-ex/button_item.cc b/notification-ex/button_item.cc
index 1535914..1263cb3 100644
--- a/notification-ex/button_item.cc
+++ b/notification-ex/button_item.cc
@@ -30,6 +30,8 @@
#define BUTTON_TITLE_KEY "__BUTTON_TITLE_KEY__"
using namespace std;
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/button_item.h b/notification-ex/button_item.h
index d489208..431fb25 100644
--- a/notification-ex/button_item.h
+++ b/notification-ex/button_item.h
@@ -65,14 +65,14 @@ class EXPORT_API ButtonItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/chat_message_item.cc b/notification-ex/chat_message_item.cc
index bad7938..616ae95 100644
--- a/notification-ex/chat_message_item.cc
+++ b/notification-ex/chat_message_item.cc
@@ -32,6 +32,8 @@
#define CHATMESSAGE_TIME_KEY "__CHATMESSAGE_TIME_KEY__"
#define CHATMESSAGE_TYPE_KEY "__CHATMESSAGE_TYPE_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/chat_message_item.h b/notification-ex/chat_message_item.h
index 95f4c9c..303bb17 100644
--- a/notification-ex/chat_message_item.h
+++ b/notification-ex/chat_message_item.h
@@ -78,14 +78,14 @@ class EXPORT_API ChatMessageItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/checkbox_item.cc b/notification-ex/checkbox_item.cc
index a67dce0..b668e01 100644
--- a/notification-ex/checkbox_item.cc
+++ b/notification-ex/checkbox_item.cc
@@ -29,6 +29,8 @@
#define CHECKBOX_TITLE_KEY "__CHECKBOX_TITLE_KEY__"
#define CHECKBOX_CHECKED_KEY "__CHECKBOX_CHECKED_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/checkbox_item.h b/notification-ex/checkbox_item.h
index b59fa04..2cdf211 100644
--- a/notification-ex/checkbox_item.h
+++ b/notification-ex/checkbox_item.h
@@ -55,14 +55,14 @@ class EXPORT_API CheckBoxItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/db_manager.cc b/notification-ex/db_manager.cc
index 3710d36..e36c387 100644
--- a/notification-ex/db_manager.cc
+++ b/notification-ex/db_manager.cc
@@ -64,6 +64,7 @@
#define NOTI_LIMIT 100
using namespace std;
+using namespace tizen_base;
using namespace notification::item;
namespace notification {
diff --git a/notification-ex/dbus_connection_manager.h b/notification-ex/dbus_connection_manager.h
index 9b37f09..995d045 100644
--- a/notification-ex/dbus_connection_manager.h
+++ b/notification-ex/dbus_connection_manager.h
@@ -21,7 +21,9 @@
#include <string>
-#include "notification-ex/ex_bundle.h"
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__((visibility("default")))
+#endif
namespace notification {
diff --git a/notification-ex/dbus_event_listener.cc b/notification-ex/dbus_event_listener.cc
index 318521f..13de3e4 100644
--- a/notification-ex/dbus_event_listener.cc
+++ b/notification-ex/dbus_event_listener.cc
@@ -36,6 +36,8 @@
#define MAX_PACKAGE_STR_SIZE 512
using namespace std;
+using namespace tizen_base;
+
namespace notification {
DBusEventListener::DBusEventListener(string path)
diff --git a/notification-ex/dbus_event_listener.h b/notification-ex/dbus_event_listener.h
index 54900d4..9e8b3a5 100644
--- a/notification-ex/dbus_event_listener.h
+++ b/notification-ex/dbus_event_listener.h
@@ -29,8 +29,8 @@ class EXPORT_API DBusEventListener : public IEventListener {
void RegisterObserver(IEventObserver* observer) override;
void UnRegisterObserver(IEventObserver* observer) override;
void NotifyObserver(
- const IEventInfo& info, std::list<Bundle> serialized) override;
- std::list<Bundle> NotifyObserver(const IEventInfo& info) override;
+ const IEventInfo& info, std::list<tizen_base::Bundle> serialized) override;
+ std::list<tizen_base::Bundle> NotifyObserver(const IEventInfo& info) override;
int NotifyNumberRequest(const IEventInfo& info) override;
private:
diff --git a/notification-ex/dbus_sender.cc b/notification-ex/dbus_sender.cc
index df91ac6..3628c7f 100644
--- a/notification-ex/dbus_sender.cc
+++ b/notification-ex/dbus_sender.cc
@@ -35,6 +35,7 @@
#define MAX_PACKAGE_STR_SIZE 512
using namespace std;
+using namespace tizen_base;
namespace notification {
DBusSender::DBusSender(string path) : impl_(new Impl(this, path)) {
diff --git a/notification-ex/dbus_sender.h b/notification-ex/dbus_sender.h
index 046afb6..4626e26 100644
--- a/notification-ex/dbus_sender.h
+++ b/notification-ex/dbus_sender.h
@@ -17,7 +17,8 @@
#ifndef NOTIFICATION_EX_DBUS_SENDER_H_
#define NOTIFICATION_EX_DBUS_SENDER_H_
-#include "notification-ex/ex_bundle.h"
+#include <bundle_cpp.h>
+
#include "notification-ex/event_sender_interface.h"
#include "notification-ex/ievent_info.h"
@@ -31,9 +32,9 @@ class EXPORT_API DBusSender : public IEventSender {
public:
DBusSender(std::string path);
virtual ~DBusSender();
- void Notify(const IEventInfo& info, std::list<Bundle> serialized,
+ void Notify(const IEventInfo& info, std::list<tizen_base::Bundle> serialized,
std::string dest_appid = "") override;
- std::list<Bundle> Request(const IEventInfo& info) override;
+ std::list<tizen_base::Bundle> Request(const IEventInfo& info) override;
int RequestNumber(const IEventInfo& info) override;
private:
diff --git a/notification-ex/dbus_sender_implementation.h b/notification-ex/dbus_sender_implementation.h
index 1ce5e5f..cef9c70 100644
--- a/notification-ex/dbus_sender_implementation.h
+++ b/notification-ex/dbus_sender_implementation.h
@@ -17,6 +17,8 @@
#ifndef NOTIFICATION_EX_DBUS_SENDER_IMPLEMENTATION_H_
#define NOTIFICATION_EX_DBUS_SENDER_IMPLEMENTATION_H_
+#include <bundle_cpp.h>
+
#include <string>
#include <memory>
#include <list>
@@ -37,7 +39,8 @@ class DBusSender::Impl {
std::string GetBusName(
std::string appid, std::string dest_appid) const;
bool EmitSignal(std::string bus_name, std::string signal_name, GVariant* data);
- GDBusMessage* MethodCall(std::string appid, std::string method_name, Bundle serialized);
+ GDBusMessage* MethodCall(std::string appid, std::string method_name,
+ tizen_base::Bundle serialized);
std::string path_;
DBusSender* parent_;
};
diff --git a/notification-ex/entry_item.cc b/notification-ex/entry_item.cc
index de242cb..56b1aab 100644
--- a/notification-ex/entry_item.cc
+++ b/notification-ex/entry_item.cc
@@ -30,6 +30,8 @@
#define ENTRY_TEXT_KEY "__ENTRY_TEXT_KEY__"
#define ENTRY_LIMIT_KEY "__ENTRY_LIMIT_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/entry_item.h b/notification-ex/entry_item.h
index 23bb400..35f5c99 100644
--- a/notification-ex/entry_item.h
+++ b/notification-ex/entry_item.h
@@ -63,14 +63,14 @@ class EXPORT_API EntryItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/event_info.cc b/notification-ex/event_info.cc
index fda2de5..18e5728 100644
--- a/notification-ex/event_info.cc
+++ b/notification-ex/event_info.cc
@@ -37,6 +37,7 @@
#define NOTIFICATION_EX_EVENT_ERROR_KEY "__NOTIFICATION_EX_EVENT_ERROR_KEY__"
using namespace std;
+using namespace tizen_base;
namespace notification {
EventInfo::EventInfo(int type, std::string owner, std::string channel,
diff --git a/notification-ex/event_info_internal.h b/notification-ex/event_info_internal.h
index ada713a..b2b175d 100644
--- a/notification-ex/event_info_internal.h
+++ b/notification-ex/event_info_internal.h
@@ -17,11 +17,12 @@
#ifndef NOTIFICATION_EX_EVENT_INFO_INTERNAL_H_
#define NOTIFICATION_EX_EVENT_INFO_INTERNAL_H_
+#include <bundle_cpp.h>
+
#include <string>
#include <list>
#include "notification-ex/common.h"
-#include "notification-ex/ex_bundle.h"
#include "notification-ex/ievent_info_internal.h"
#ifndef EXPORT_API
@@ -34,7 +35,7 @@ class EventInfo : public IEventInfoInternal {
public:
EventInfo(int type, std::string owner, std::string channel = "",
std::string item_id = "");
- EventInfo(Bundle serialized);
+ EventInfo(tizen_base::Bundle serialized);
virtual ~EventInfo();
uid_t GetUid() const override;
void SetUid(uid_t uid) override;
@@ -46,7 +47,7 @@ class EventInfo : public IEventInfoInternal {
std::string GetChannel() const override;
std::string GetItemId() const override;
int GetRequestId() const override;
- Bundle Serialize() const override;
+ tizen_base::Bundle Serialize() const override;
static std::string GetString(int type);
private:
diff --git a/notification-ex/event_listener_interface.h b/notification-ex/event_listener_interface.h
index 824677c..9813a71 100644
--- a/notification-ex/event_listener_interface.h
+++ b/notification-ex/event_listener_interface.h
@@ -33,8 +33,9 @@ class EXPORT_API IEventListener {
virtual ~IEventListener() = default;
virtual void RegisterObserver(IEventObserver* observer) = 0;
virtual void UnRegisterObserver(IEventObserver* observer) = 0;
- virtual void NotifyObserver(const IEventInfo& info, std::list<Bundle> serialized) = 0;
- virtual std::list<Bundle> NotifyObserver(const IEventInfo& info) = 0;
+ virtual void NotifyObserver(const IEventInfo& info,
+ std::list<tizen_base::Bundle> serialized) = 0;
+ virtual std::list<tizen_base::Bundle> NotifyObserver(const IEventInfo& info) = 0;
virtual int NotifyNumberRequest(const IEventInfo& info) = 0;
};
diff --git a/notification-ex/event_observer_interface.h b/notification-ex/event_observer_interface.h
index ce6872f..6627652 100644
--- a/notification-ex/event_observer_interface.h
+++ b/notification-ex/event_observer_interface.h
@@ -17,9 +17,10 @@
#ifndef NOTIFICATION_EX_OBSERVER_INTERFACE_H_
#define NOTIFICATION_EX_OBSERVER_INTERFACE_H_
+#include <bundle_cpp.h>
+
#include <list>
-#include "notification-ex/ex_bundle.h"
#include "notification-ex/ievent_info.h"
#ifndef EXPORT_API
@@ -31,8 +32,9 @@ namespace notification {
class EXPORT_API IEventObserver {
public:
virtual ~IEventObserver() = default;
- virtual void OnEvent(const IEventInfo& info, std::list<Bundle> serialized) = 0;
- virtual std::list<Bundle> OnRequest(const IEventInfo& info) = 0;
+ virtual void OnEvent(const IEventInfo& info,
+ std::list<tizen_base::Bundle> serialized) = 0;
+ virtual std::list<tizen_base::Bundle> OnRequest(const IEventInfo& info) = 0;
virtual int OnRequestNumber(const IEventInfo& info) = 0;
};
diff --git a/notification-ex/event_sender_interface.h b/notification-ex/event_sender_interface.h
index 8390983..2bdd2e3 100644
--- a/notification-ex/event_sender_interface.h
+++ b/notification-ex/event_sender_interface.h
@@ -17,9 +17,10 @@
#ifndef NOTIFICATION_EX_EVENT_SENDER_INTERFACE_H_
#define NOTIFICATION_EX_EVENT_SENDER_INTERFACE_H_
+#include <bundle_cpp.h>
+
#include <list>
-#include "notification-ex/ex_bundle.h"
#include "notification-ex/ievent_info.h"
#ifndef EXPORT_API
@@ -31,9 +32,10 @@ namespace notification {
class EXPORT_API IEventSender {
public:
virtual ~IEventSender() = default;
- virtual void Notify(const IEventInfo& info, std::list<Bundle> serialized,
+ virtual void Notify(const IEventInfo& info,
+ std::list<tizen_base::Bundle> serialized,
std::string dest_appid = "") = 0;
- virtual std::list<Bundle> Request(const IEventInfo &info) = 0;
+ virtual std::list<tizen_base::Bundle> Request(const IEventInfo &info) = 0;
virtual int RequestNumber(const IEventInfo &info) = 0;
};
diff --git a/notification-ex/ex_bundle.h b/notification-ex/ex_bundle.h
deleted file mode 100644
index 6587920..0000000
--- a/notification-ex/ex_bundle.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef NOTIFICATION_EX_BUNDLE_H_
-#define NOTIFICATION_EX_BUNDLE_H_
-
-#include <bundle.h>
-
-#include <string>
-#include <vector>
-#include <memory>
-#include <cstdio>
-
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "NOTIFICATION_EX"
-
-#ifndef EXPORT_API
-#define EXPORT_API __attribute__((visibility("default")))
-#endif
-
-namespace notification {
-class EXPORT_API Bundle final {
- public:
- using BundleRaw =
- std::pair<std::unique_ptr<bundle_raw, decltype(std::free)*>, int>;
-
- class KeyInfo final {
- public:
- KeyInfo(const bundle_keyval_t* handle, std::string name)
- : handle_(handle), name_(std::move(name)) {}
-
- bundle_type GetType() const {
- return static_cast<bundle_type>(
- bundle_keyval_get_type(const_cast<bundle_keyval_t*>(handle_)));
- }
-
- bool IsArray() const {
- return bundle_keyval_type_is_array(const_cast<bundle_keyval_t*>(handle_));
- }
-
- const std::string& GetName() const {
- return name_;
- }
-
- private:
- const bundle_keyval_t* handle_;
- std::string name_;
- };
-
- Bundle() {
- handle_ = bundle_create();
- }
-
- Bundle(BundleRaw raw) {
- handle_ = bundle_decode(raw.first.get(), raw.second);
- }
-
-
- Bundle(const std::string& raw) {
- handle_ = bundle_decode(reinterpret_cast<const bundle_raw*>(raw.c_str()),
- raw.length());
- }
-
- Bundle(bundle* b, bool copy = true, bool own = true)
- : own_(own), copy_(copy) {
- if (!copy_)
- handle_ = b;
- else
- handle_ = bundle_dup(b);
- }
-
- ~Bundle() {
- if (handle_ && (own_ || copy_))
- bundle_free(handle_);
- }
-
- Bundle(const Bundle& b) {
- handle_ = bundle_dup(b.handle_);
- }
-
- Bundle& operator = (const Bundle& b) {
- handle_ = bundle_dup(b.handle_);
- return *this;
- }
-
- Bundle(Bundle&& b) noexcept {
- handle_ = b.handle_;
- b.handle_ = nullptr;
- }
-
- Bundle& operator = (Bundle&& b) noexcept {
- handle_ = b.handle_;
- b.handle_ = nullptr;
- return *this;
- }
-
- std::vector<KeyInfo> GetKeys() {
- std::vector<KeyInfo> v;
-
- bundle_foreach(handle_, [](const char *key, const int type,
- const bundle_keyval_t *kv, void *user_data) {
- auto* v = static_cast<std::vector<KeyInfo>*>(user_data);
- v->emplace_back(kv, key);
- }, &v);
-
- return v;
- }
-
- int Add(const std::string& key, const std::string& val) {
- return bundle_add_str(handle_, key.c_str(), val.c_str());
- }
-
- int Add(const std::string& key, const std::vector<std::string>& val) {
- std::vector<const char*> v;
- for (auto& i : val) {
- v.push_back(i.c_str());
- }
-
- return bundle_add_str_array(handle_, key.c_str(), v.data(), v.size());
- }
-
- int Add(const std::string& key, const std::vector<unsigned char>& val) {
- return bundle_add_byte(handle_, key.c_str(), val.data(), val.size());
- }
-
- int Merge(Bundle& b) {
- std::vector<KeyInfo> keys = b.GetKeys();
- for (auto& k : keys) {
- int ret;
- if (k.IsArray())
- ret = Add(k.GetName(), b.GetStringArray(k.GetName()));
- else
- ret = Add(k.GetName(), b.GetString(k.GetName()));
- if (ret != 0)
- return ret;
- }
- return 0;
- }
-
- int Delete(const std::string& key) {
- return bundle_del(handle_, key.c_str());
- }
-
- std::string GetString(const std::string& key) const {
- char* str = nullptr;
- bundle_get_str(handle_, key.c_str(), &str);
-
- if (!str)
- return "";
-
- return std::string(str);
- }
-
- std::vector<std::string> GetStringArray(const std::string& key) const {
- std::vector<std::string> v;
-
- const char** str_array = nullptr;
- int len = 0;
-
- str_array = bundle_get_str_array(handle_, key.c_str(), &len);
-
- for (int i = 0; i < len; i++) {
- v.emplace_back(str_array[i]);
- }
-
- return v;
- }
-
- std::vector<unsigned char> GetByte(const std::string& key) const {
- size_t size;
- unsigned char* bytes = nullptr;
- bundle_get_byte(handle_, key.c_str(),
- reinterpret_cast<void**>(&bytes), &size);
- return std::vector<unsigned char>(bytes, bytes + size);
- }
-
- BundleRaw ToRaw() {
- bundle_raw* raw = nullptr;
- int len = 0;
- bundle_encode(handle_, &raw, &len);
-
- return BundleRaw(
- std::unique_ptr<bundle_raw, decltype(std::free)*>(raw, std::free), len);
- }
-
- int GetCount() const {
- return bundle_get_count(handle_);
- }
-
- bundle_type GetType(const std::string& key) const {
- return static_cast<bundle_type>(bundle_get_type(handle_, key.c_str()));
- }
-
- bundle* GetHandle() const {
- return handle_;
- }
-
- bundle* Detach() {
- auto* h = handle_;
- handle_ = nullptr;
- return h;
- }
-
- private:
- bundle* handle_;
- bool own_ = true;
- bool copy_ = true;
-};
-
-} // namespace notification
-
-#endif // NOTIFICATION_EX_BUNDLE_H_
diff --git a/notification-ex/group_item.cc b/notification-ex/group_item.cc
index dbe1b2f..51ce8c8 100644
--- a/notification-ex/group_item.cc
+++ b/notification-ex/group_item.cc
@@ -38,6 +38,7 @@
#define GROUP_APP_LABEL_KEY "__GROUP_APP_LABEL_KEY__"
using namespace std;
+using namespace tizen_base;
namespace notification {
namespace item {
diff --git a/notification-ex/group_item.h b/notification-ex/group_item.h
index 5b34979..f79bade 100644
--- a/notification-ex/group_item.h
+++ b/notification-ex/group_item.h
@@ -61,14 +61,14 @@ class EXPORT_API GroupItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/icon_text_item.cc b/notification-ex/icon_text_item.cc
index 9173c40..94e6297 100644
--- a/notification-ex/icon_text_item.cc
+++ b/notification-ex/icon_text_item.cc
@@ -29,6 +29,8 @@
#define ICONTEXT_PATH_KEY "__ICONTEXT_PATH_KEY__"
#define ICONTEXT_TITLE_KEY "__ICONTEXT_TITLE_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/icon_text_item.h b/notification-ex/icon_text_item.h
index afe6197..36ef4cb 100644
--- a/notification-ex/icon_text_item.h
+++ b/notification-ex/icon_text_item.h
@@ -58,14 +58,14 @@ class EXPORT_API IconTextItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/ievent_info.h b/notification-ex/ievent_info.h
index c4e13e6..b34eb50 100644
--- a/notification-ex/ievent_info.h
+++ b/notification-ex/ievent_info.h
@@ -17,7 +17,7 @@
#ifndef NOTIFICATION_EX_IEVENT_INFO_H_
#define NOTIFICATION_EX_IEVENT_INFO_H_
-#include "notification-ex/ex_bundle.h"
+#include <bundle_cpp.h>
namespace notification {
@@ -43,7 +43,7 @@ class EXPORT_API IEventInfo {
virtual std::string GetChannel() const = 0;
virtual std::string GetItemId() const = 0;
virtual int GetRequestId() const = 0;
- virtual Bundle Serialize() const = 0;
+ virtual tizen_base::Bundle Serialize() const = 0;
};
} // namespace notification
diff --git a/notification-ex/image_item.cc b/notification-ex/image_item.cc
index 21689f3..42d8a05 100644
--- a/notification-ex/image_item.cc
+++ b/notification-ex/image_item.cc
@@ -28,6 +28,8 @@
#define LOG_TAG "NOTIFICATION_EX"
#define IMAGE_PATH_KEY "__IMAGE_PATH_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/image_item.h b/notification-ex/image_item.h
index 3e7a9e8..5008650 100644
--- a/notification-ex/image_item.h
+++ b/notification-ex/image_item.h
@@ -70,14 +70,14 @@ class EXPORT_API ImageItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/input_selector_item.cc b/notification-ex/input_selector_item.cc
index 2aaa1f5..8bb7a10 100644
--- a/notification-ex/input_selector_item.cc
+++ b/notification-ex/input_selector_item.cc
@@ -32,6 +32,8 @@
#define INPUT_SELECTOR_CONTENTS_KEY "__INPUT_SELECTOR_CONTENTS_KEY__"
using namespace std;
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/input_selector_item.h b/notification-ex/input_selector_item.h
index 90c673c..6de51f5 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 Bundle Serialize() const override;
+ virtual 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(Bundle b) override;
+ virtual void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/item_inflator.cc b/notification-ex/item_inflator.cc
index a0a39d9..f1f2ec4 100644
--- a/notification-ex/item_inflator.cc
+++ b/notification-ex/item_inflator.cc
@@ -31,7 +31,7 @@ using namespace std;
namespace notification {
namespace item {
-unique_ptr<AbstractItem> ItemInflator::Create(Bundle b) {
+unique_ptr<AbstractItem> ItemInflator::Create(tizen_base::Bundle b) {
unique_ptr<AbstractItem> item =
FactoryManager::GetInst().CreateItem(AbstractItem::GetType(b));
item.get()->Deserialize(b);
diff --git a/notification-ex/item_inflator.h b/notification-ex/item_inflator.h
index 3d9d837..db59895 100644
--- a/notification-ex/item_inflator.h
+++ b/notification-ex/item_inflator.h
@@ -38,7 +38,7 @@ class EXPORT_API ItemInflator {
* @since_tizen 5.5
* @param[in] b Bundle type data
*/
- static std::unique_ptr<AbstractItem> Create(Bundle b);
+ static std::unique_ptr<AbstractItem> Create(tizen_base::Bundle b);
};
} // namespace item
diff --git a/notification-ex/manager.cc b/notification-ex/manager.cc
index 9bf5cac..cb43e87 100644
--- a/notification-ex/manager.cc
+++ b/notification-ex/manager.cc
@@ -38,6 +38,7 @@
#define NOTIFICATION_EX_MANAGER_OBJECT_PATH "/org/tizen/notification_ex_manager"
using namespace std;
+using namespace tizen_base;
using namespace notification::item;
namespace notification {
diff --git a/notification-ex/manager.h b/notification-ex/manager.h
index c009226..44cff3f 100644
--- a/notification-ex/manager.h
+++ b/notification-ex/manager.h
@@ -46,8 +46,9 @@ class EXPORT_API Manager : public IEventObserver {
int Hide(std::shared_ptr<item::AbstractItem> noti);
std::unique_ptr<item::AbstractItem> FindByRootID(std::string id);
int SendEvent(const IEventInfo& info, std::shared_ptr<item::AbstractItem> noti);
- void OnEvent(const IEventInfo& info, std::list<Bundle> serialized) override;
- std::list<Bundle> OnRequest(const IEventInfo& info) override;
+ void OnEvent(const IEventInfo& info,
+ std::list<tizen_base::Bundle> serialized) override;
+ std::list<tizen_base::Bundle> OnRequest(const IEventInfo& info) override;
int OnRequestNumber(const IEventInfo& info) override;
void SendError(const IEventInfo& info, NotificationError error);
int GetCount() const;
diff --git a/notification-ex/mock_sender.h b/notification-ex/mock_sender.h
index 509a525..588fc2e 100644
--- a/notification-ex/mock_sender.h
+++ b/notification-ex/mock_sender.h
@@ -30,7 +30,7 @@ class EXPORT_API MockSender : public IEventSender {
MockSender();
virtual ~MockSender();
- void Notify(Bundle serialized) override;
+ void Notify(tizen_base::Bundle serialized) override;
};
} // namespace notification
diff --git a/notification-ex/null_item.cc b/notification-ex/null_item.cc
index 0c3e867..f85cf15 100644
--- a/notification-ex/null_item.cc
+++ b/notification-ex/null_item.cc
@@ -27,6 +27,8 @@
#define LOG_TAG "NOTIFICATION_EX"
using namespace std;
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/null_item.h b/notification-ex/null_item.h
index 75b0421..4abf00e 100644
--- a/notification-ex/null_item.h
+++ b/notification-ex/null_item.h
@@ -67,14 +67,14 @@ class EXPORT_API NullItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(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.cc b/notification-ex/progress_item.cc
index c06d0ed..c27ccf7 100644
--- a/notification-ex/progress_item.cc
+++ b/notification-ex/progress_item.cc
@@ -35,6 +35,8 @@
#define PROGRESS_UNIT_KEY "__PROGRESS_UNIT_KEY__"
using namespace std;
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/progress_item.h b/notification-ex/progress_item.h
index a83e6d0..b339d72 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 Bundle Serialize() const override;
+ virtual 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(Bundle b) override;
+ virtual void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/reporter.cc b/notification-ex/reporter.cc
index c00dc77..f7041d7 100644
--- a/notification-ex/reporter.cc
+++ b/notification-ex/reporter.cc
@@ -37,6 +37,7 @@
#define NOTIFICATION_EX_REPORTER_OBJECT_PATH "/org/tizen/notification_ex_reporter"
using namespace std;
+using namespace tizen_base;
using namespace notification::item;
namespace notification {
diff --git a/notification-ex/reporter.h b/notification-ex/reporter.h
index ba6163e..45ab0b1 100644
--- a/notification-ex/reporter.h
+++ b/notification-ex/reporter.h
@@ -55,8 +55,9 @@ class EXPORT_API Reporter : public IEventObserver {
virtual std::list<std::shared_ptr<item::AbstractItem>> OnRequestEvent(
const IEventInfo& info);
virtual void OnError(NotificationError error, int requestId);
- void OnEvent(const IEventInfo& info, std::list<Bundle> serialized) override;
- std::list<Bundle> OnRequest(const IEventInfo& info) override;
+ void OnEvent(const IEventInfo& info,
+ std::list<tizen_base::Bundle> serialized) override;
+ std::list<tizen_base::Bundle> OnRequest(const IEventInfo& info) override;
int OnRequestNumber(const IEventInfo& info) override;
static std::string GetPath();
diff --git a/notification-ex/stub.cc b/notification-ex/stub.cc
index 7b3f0f7..8025955 100644
--- a/notification-ex/stub.cc
+++ b/notification-ex/stub.cc
@@ -48,7 +48,6 @@
#include "notification-ex/progress_item.h"
#include "notification-ex/time_item.h"
#include "notification-ex/visibility_action.h"
-#include "notification-ex/ex_bundle.h"
#include "notification-ex/event_info_internal.h"
#include "notification-ex/manager.h"
#include "notification-ex/dbus_sender.h"
@@ -66,6 +65,7 @@
#define EXPORT_API __attribute__((visibility("default")))
using namespace std;
+using namespace tizen_base;
using namespace notification::item;
using namespace notification;
diff --git a/notification-ex/text_item.cc b/notification-ex/text_item.cc
index 01fe1d2..b63708c 100644
--- a/notification-ex/text_item.cc
+++ b/notification-ex/text_item.cc
@@ -30,6 +30,8 @@
#define TEXT_CONTENTS_KEY "__TEXT_CONTENTS_KEY__"
#define TEXT_HYPERLINK_KEY "__TEXT_HYPERLINK_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
TextItem::TextItem(std::string id, std::string text, std::string hyperlink,
diff --git a/notification-ex/text_item.h b/notification-ex/text_item.h
index 8f1681e..32601c8 100644
--- a/notification-ex/text_item.h
+++ b/notification-ex/text_item.h
@@ -67,14 +67,14 @@ class EXPORT_API TextItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/time_item.cc b/notification-ex/time_item.cc
index e22d543..cb1d612 100644
--- a/notification-ex/time_item.cc
+++ b/notification-ex/time_item.cc
@@ -28,6 +28,8 @@
#define LOG_TAG "NOTIFICATION_EX"
#define TIME_KEY "__TIME_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/time_item.h b/notification-ex/time_item.h
index afbcc78..c363bd3 100644
--- a/notification-ex/time_item.h
+++ b/notification-ex/time_item.h
@@ -80,14 +80,14 @@ class EXPORT_API TimeItem : public AbstractItem {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Finds the AbstractItem using by notification item id.
diff --git a/notification-ex/visibility_action.cc b/notification-ex/visibility_action.cc
index f354d98..ed54ae2 100644
--- a/notification-ex/visibility_action.cc
+++ b/notification-ex/visibility_action.cc
@@ -30,6 +30,8 @@
#define VISIBILITY_ACTION_ENTITY_KEY "__VISIBILITY_ACTION_VISIBLE_KEY__"
#define VISIBILITY_ACTION_ENTITY_SIZE_KEY "__VISIBILITY_ACTION_ENTITY_SIZE_KEY__"
+using namespace tizen_base;
+
namespace notification {
namespace item {
diff --git a/notification-ex/visibility_action.h b/notification-ex/visibility_action.h
index 20c1757..8855226 100644
--- a/notification-ex/visibility_action.h
+++ b/notification-ex/visibility_action.h
@@ -60,14 +60,14 @@ class EXPORT_API VisibilityAction : public AbstractAction {
* @since_tizen 5.5
* @return Bundle type data
*/
- 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
*/
- void Deserialize(Bundle b) override;
+ void Deserialize(tizen_base::Bundle b) override;
/**
* @brief Gets whether local or not.
diff --git a/unittest/src/test_abstract_item.cc b/unittest/src/test_abstract_item.cc
index 3a205c3..0dd3a19 100644
--- a/unittest/src/test_abstract_item.cc
+++ b/unittest/src/test_abstract_item.cc
@@ -28,6 +28,7 @@
#define MY_ITEM_TYPE AbstractItem::Type::Custom + 1
using namespace notification;
+using namespace tizen_base;
using namespace notification::item;
namespace {
diff --git a/unittest/src/test_app_control_action.cc b/unittest/src/test_app_control_action.cc
index ff575c1..7b49c60 100644
--- a/unittest/src/test_app_control_action.cc
+++ b/unittest/src/test_app_control_action.cc
@@ -20,6 +20,7 @@
#include "notification-ex/app_control_action.h"
#include "notification-ex/action_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_bundle.cc b/unittest/src/test_bundle.cc
deleted file mode 100644
index a7e66cc..0000000
--- a/unittest/src/test_bundle.cc
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <string>
-
-#include <gtest/gtest.h>
-#include <gmock/gmock.h>
-
-#include "notification-ex/ex_bundle.h"
-
-using ::testing::AtLeast;
-using namespace notification;
-
-TEST(Bundle, CtorDtor) {
- Bundle bundle;
-}
-
-TEST(Bundle, CopyCtor) {
- Bundle bundle;
- bundle.Add("TestKey", "TestVal");
-
- Bundle b2(bundle);
- EXPECT_EQ(b2.GetString("TestKey"), "TestVal");
-}
-
-TEST(Bundle, MoveCtor) {
- Bundle bundle;
- bundle.Add("TestKey", "TestVal");
-
- Bundle b2(std::move(bundle));
- EXPECT_EQ(b2.GetString("TestKey"), "TestVal");
-}
-
-TEST(Bundle, AddStringGetString) {
- Bundle bundle;
- bundle.Add("TestKey", "TestVal");
-
- EXPECT_EQ(bundle.GetString("TestKey"), "TestVal");
-}
-
-TEST(Bundle, AddByteGetByte) {
- Bundle bundle;
- std::vector<unsigned char> v = { 0, 1, 2, 3};
- bundle.Add("TestKey", v);
- auto v2 = bundle.GetByte("TestKey");
-
- EXPECT_EQ(v2.size(), 4);
- EXPECT_EQ(v2[0], 0);
- EXPECT_EQ(v2[1], 1);
- EXPECT_EQ(v2[2], 2);
- EXPECT_EQ(v2[3], 3);
-}
-
-TEST(Bundle, AddStringArrayGetStringArray) {
- Bundle bundle;
- bundle.Add("TestKey", { "TestVal1", "TestVal2", "TestVal3" });
-
- auto v = bundle.GetStringArray("TestKey");
-
- EXPECT_EQ(v.size(), 3);
- EXPECT_EQ(v[0], "TestVal1");
- EXPECT_EQ(v[1], "TestVal2");
- EXPECT_EQ(v[2], "TestVal3");
-}
-
-TEST(Bundle, ToRaw) {
- Bundle bundle;
- bundle.Add("TestKey", "TestVal");
-
- auto r = bundle.ToRaw();
- Bundle b2(std::move(r));
- EXPECT_EQ(bundle.GetString("TestKey"), "TestVal");
-}
-
-TEST(Bundle, GetCount) {
- Bundle bundle;
- bundle.Add("TestKey1", "TestVal1");
- bundle.Add("TestKey2", "TestVal2");
-
- EXPECT_EQ(bundle.GetCount(), 2);
-}
-
-TEST(Bundle, Delete) {
- Bundle bundle;
- int r = bundle.Add("TestKey1", "TestVal1");
- EXPECT_EQ(r, 0);
-
- r = bundle.Delete("TestKey1");
- EXPECT_EQ(r, 0);
-
- EXPECT_EQ(bundle.GetString("TestKey1"), "");
-}
-
-TEST(Bundle, GetKeys) {
- Bundle bundle;
- bundle.Add("TestKey1", "TestVal1");
- bundle.Add("TestKey2", "TestVal2");
- bundle.Add("TestKey3", "TestVal3");
-
- auto v = bundle.GetKeys();
-
- EXPECT_EQ(bundle.GetCount(), 3);
-
- for (auto& i : v) {
- EXPECT_EQ(i.GetType(), BUNDLE_TYPE_STR);
- }
-}
diff --git a/unittest/src/test_button_item.cc b/unittest/src/test_button_item.cc
index ad4a996..2e9e581 100644
--- a/unittest/src/test_button_item.cc
+++ b/unittest/src/test_button_item.cc
@@ -7,6 +7,7 @@
#include "notification-ex/button_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
using namespace std;
diff --git a/unittest/src/test_chat_message_item.cc b/unittest/src/test_chat_message_item.cc
index c72e6fb..cde985a 100644
--- a/unittest/src/test_chat_message_item.cc
+++ b/unittest/src/test_chat_message_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/chat_message_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_checkbox_item.cc b/unittest/src/test_checkbox_item.cc
index bdcb246..eba55a7 100644
--- a/unittest/src/test_checkbox_item.cc
+++ b/unittest/src/test_checkbox_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/checkbox_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_entry_item.cc b/unittest/src/test_entry_item.cc
index b4e3e05..76b0006 100644
--- a/unittest/src/test_entry_item.cc
+++ b/unittest/src/test_entry_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/entry_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_event_info.cc b/unittest/src/test_event_info.cc
index 120cee5..655f12a 100644
--- a/unittest/src/test_event_info.cc
+++ b/unittest/src/test_event_info.cc
@@ -6,6 +6,7 @@
#include "notification-ex/event_info_internal.h"
+using namespace tizen_base;
using namespace notification;
using namespace std;
diff --git a/unittest/src/test_group_item.cc b/unittest/src/test_group_item.cc
index ee54af9..6034c37 100644
--- a/unittest/src/test_group_item.cc
+++ b/unittest/src/test_group_item.cc
@@ -10,6 +10,7 @@
#include "notification-ex/item_inflator.h"
#include "unittest/mock/app_common.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
using namespace std;
diff --git a/unittest/src/test_icon_item.cc b/unittest/src/test_icon_item.cc
index df7fb7f..98ff517 100644
--- a/unittest/src/test_icon_item.cc
+++ b/unittest/src/test_icon_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/icon_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_icon_text_item.cc b/unittest/src/test_icon_text_item.cc
index 91c7fc4..0a29622 100644
--- a/unittest/src/test_icon_text_item.cc
+++ b/unittest/src/test_icon_text_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/icon_text_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_image_item.cc b/unittest/src/test_image_item.cc
index 41db181..66c6786 100644
--- a/unittest/src/test_image_item.cc
+++ b/unittest/src/test_image_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/image_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_input_selector_item.cc b/unittest/src/test_input_selector_item.cc
index 245f66b..7bf3afc 100644
--- a/unittest/src/test_input_selector_item.cc
+++ b/unittest/src/test_input_selector_item.cc
@@ -7,6 +7,7 @@
#include "notification-ex/input_selector_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
using namespace std;
diff --git a/unittest/src/test_progress_item.cc b/unittest/src/test_progress_item.cc
index c4b115d..a8f0467 100644
--- a/unittest/src/test_progress_item.cc
+++ b/unittest/src/test_progress_item.cc
@@ -7,6 +7,7 @@
#include "notification-ex/progress_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
using namespace std;
diff --git a/unittest/src/test_text_item.cc b/unittest/src/test_text_item.cc
index 432a6a6..1921567 100644
--- a/unittest/src/test_text_item.cc
+++ b/unittest/src/test_text_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/text_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_time_item.cc b/unittest/src/test_time_item.cc
index fa149e5..96e8e74 100644
--- a/unittest/src/test_time_item.cc
+++ b/unittest/src/test_time_item.cc
@@ -20,6 +20,7 @@
#include "notification-ex/time_item.h"
#include "notification-ex/item_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;
diff --git a/unittest/src/test_visibility_action.cc b/unittest/src/test_visibility_action.cc
index 21c0c18..e231b36 100644
--- a/unittest/src/test_visibility_action.cc
+++ b/unittest/src/test_visibility_action.cc
@@ -22,6 +22,7 @@
#include "notification-ex/visibility_action.h"
#include "notification-ex/action_inflator.h"
+using namespace tizen_base;
using namespace notification;
using namespace notification::item;