Revert "Revert "Use tizen_base::Bundle"" 38/204538/3
authorMyungKi Lee <mk5004.lee@samsung.com>
Wed, 24 Apr 2019 07:28:00 +0000 (07:28 +0000)
committerMyungKi Lee <mk5004.lee@samsung.com>
Mon, 8 Jul 2019 09:49:12 +0000 (09:49 +0000)
This reverts commit 3166055125c36292b44b323ad5897eeb120e2397.

Change-Id: Icaede3decb1dd3896ad077a6a20a5e65f3d4bf80
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
73 files changed:
notification-ex/abstract_action.cc
notification-ex/abstract_action.h
notification-ex/abstract_item.cc
notification-ex/abstract_item.h
notification-ex/action_inflator.cc
notification-ex/action_inflator.h
notification-ex/app_control_action.cc
notification-ex/app_control_action.h
notification-ex/button_item.cc
notification-ex/button_item.h
notification-ex/chat_message_item.cc
notification-ex/chat_message_item.h
notification-ex/checkbox_item.cc
notification-ex/checkbox_item.h
notification-ex/db_manager.cc
notification-ex/dbus_connection_manager.h
notification-ex/dbus_event_listener.cc
notification-ex/dbus_event_listener.h
notification-ex/dbus_sender.cc
notification-ex/dbus_sender.h
notification-ex/dbus_sender_implementation.h
notification-ex/entry_item.cc
notification-ex/entry_item.h
notification-ex/event_info.cc
notification-ex/event_info_internal.h
notification-ex/event_listener_interface.h
notification-ex/event_observer_interface.h
notification-ex/event_sender_interface.h
notification-ex/ex_bundle.h [deleted file]
notification-ex/group_item.cc
notification-ex/group_item.h
notification-ex/icon_text_item.cc
notification-ex/icon_text_item.h
notification-ex/ievent_info.h
notification-ex/image_item.cc
notification-ex/image_item.h
notification-ex/input_selector_item.cc
notification-ex/input_selector_item.h
notification-ex/item_inflator.cc
notification-ex/item_inflator.h
notification-ex/manager.cc
notification-ex/manager.h
notification-ex/mock_sender.h
notification-ex/null_item.cc
notification-ex/null_item.h
notification-ex/progress_item.cc
notification-ex/progress_item.h
notification-ex/reporter.cc
notification-ex/reporter.h
notification-ex/stub.cc
notification-ex/text_item.cc
notification-ex/text_item.h
notification-ex/time_item.cc
notification-ex/time_item.h
notification-ex/visibility_action.cc
notification-ex/visibility_action.h
unittest/src/test_abstract_item.cc
unittest/src/test_app_control_action.cc
unittest/src/test_bundle.cc [deleted file]
unittest/src/test_button_item.cc
unittest/src/test_chat_message_item.cc
unittest/src/test_checkbox_item.cc
unittest/src/test_entry_item.cc
unittest/src/test_event_info.cc
unittest/src/test_group_item.cc
unittest/src/test_icon_item.cc
unittest/src/test_icon_text_item.cc
unittest/src/test_image_item.cc
unittest/src/test_input_selector_item.cc
unittest/src/test_progress_item.cc
unittest/src/test_text_item.cc
unittest/src/test_time_item.cc
unittest/src/test_visibility_action.cc

index 82b388b623a616939e4ed254b0c739209e90a6be..0e8f279a3e3f9c37d221b71349210004d419a31f 100644 (file)
@@ -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)
index 71d9f1a60416fdf269a25feaac4ed509722957b1..f8ace1bcbd6af342f2451f84e91d0d9fa12eedec 100644 (file)
@@ -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.
index c24cd1723a893fa4996379e1b890e13b36144b7c..9010e7627992eb5d2e269418f57cbdba4c689fdc 100644 (file)
@@ -81,6 +81,7 @@
 #define ABSTRACT_ITEM_TRUE "TRUE"
 
 using namespace std;
+using namespace tizen_base;
 namespace notification {
 namespace item {
 
index 4a9f3b7e2d6880a58d07c5df054c89acc1fce232..3da84f322c3915049dc6fdec68de1144023e4a00 100644 (file)
 #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.
index c757e46a1955951d8957b6e43fce5acbad694cc6..23eaa22ed883d4a516db63a23340cec018de242b 100644 (file)
@@ -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);
index 243db279b46bb3bc59e1bc61d56adf02846470df..eff5e6dd9b37e1f8d32237e9667c56d8ac80c2ba 100644 (file)
@@ -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
index 2aa94b6d5e3b2769e07f0c32ade657d37f4223af..aef6ee40151e512a79411713fb6384217fd069df 100644 (file)
@@ -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();
index 564b4bedbabab410fa99d800673f0982869a8489..efb8d70cc8b77c1eb747e14db241df54db2de8b8 100644 (file)
@@ -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.
index 1535914b874e972efe7de912cdcde3ec2d873cc0..1263cb3630b4b0668246c21e1d268879ee2433f1 100644 (file)
@@ -30,6 +30,8 @@
 #define BUTTON_TITLE_KEY "__BUTTON_TITLE_KEY__"
 
 using namespace std;
+using namespace tizen_base;
+
 namespace notification {
 namespace item {
 
index d489208fdc2d4f5b9f05d45e23aa88d381d7800e..431fb25fb51465b696f48b97a8041c3fe7715070 100644 (file)
@@ -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.
index bad7938f0c2fc9c798f869d117e9ce449b9ba3b3..616ae95fa25592075d41845617b5f46be09e1cde 100644 (file)
@@ -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 {
 
index 95f4c9cdc407caff352a5efb5b4fe716a06ee01a..303bb17e27f641a15ecefc497bb6ab31e450a620 100644 (file)
@@ -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.
index a67dce09ad87a62b1e1b33e767c677d9d57a75dd..b668e013d70b3894afe622d5d53f3ab6d81d8c22 100644 (file)
@@ -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 {
 
index b59fa044675871fa0eb21e8889518d5136be40d7..2cdf211c1c29c2d14100433a52942445974f5655 100644 (file)
@@ -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.
index 3710d36ad09b5a9392f246f30cb1a8f5d4e3f04f..e36c38734682cb920ffa9721db2de1aff2e82a69 100644 (file)
@@ -64,6 +64,7 @@
 #define NOTI_LIMIT 100
 
 using namespace std;
+using namespace tizen_base;
 using namespace notification::item;
 
 namespace notification {
index 9b37f09c5ee3abdc9c9ec774967f818fbfe75ca7..995d0453176233fd390145e717596c43ff354b49 100644 (file)
@@ -21,7 +21,9 @@
 
 #include <string>
 
-#include "notification-ex/ex_bundle.h"
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__((visibility("default")))
+#endif
 
 namespace notification {
 
index 318521f81771e9dfa4d2d6cb690a4743fb0bf472..13de3e46f7dd53385177329aad8926884661ebed 100644 (file)
@@ -36,6 +36,8 @@
 #define MAX_PACKAGE_STR_SIZE 512
 
 using namespace std;
+using namespace tizen_base;
+
 namespace notification {
 
 DBusEventListener::DBusEventListener(string path)
index 54900d4c448a01ce64af443b6c015cef2ffec1fb..9e8b3a5833d63621405a5c6fa6c5a0133905ef84 100644 (file)
@@ -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:
index df91ac64d7964bdf9c471aa6cdfaf12afe79d07c..3628c7fa79cea4beb86b15bb7371adf01fbdac3b 100644 (file)
@@ -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)) {
index 046afb66b20f5c4b62b16b7510df9f031d3670d6..4626e26900c48e3926d44a97a5369778814a6da4 100644 (file)
@@ -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:
index 1ce5e5f7087a544e61bb1a2d07da88eb1722e7ce..cef9c707f73c63bd81c7af333aafbfb288e6b5c5 100644 (file)
@@ -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_;
 };
index de242cbf50442d85187a63eb22e92108a1cad52a..56b1aab90f4e51506c0ccc2af45eca1ce2903d8e 100644 (file)
@@ -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 {
 
index 23bb4002efe1590ccca8b076619139995e0cfdc4..35f5c99099a5a29c111825bf7b2bd2b671799118 100644 (file)
@@ -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.
index fda2de5c2396f58001aecd1c4c7b234cffd2b208..18e57284d9928e731b2b222e0b6003201843220c 100644 (file)
@@ -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,
index ada713a5a60ac88c05c18c9c80f0c8cb3b6bac21..b2b175dc042c85ff70297f17756000d276de1371 100644 (file)
 #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:
index 824677c9c60d23a98e36d95d0d92a0e7f114619c..9813a71488994155e9736fbb2ec9e3ccec443a2e 100644 (file)
@@ -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;
 };
 
index ce6872fc5ba86b929b0b333770a81912bbaa7c22..66276526cf040ca1ba215f8b1bcc7f771e413bd2 100644 (file)
 #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;
 };
 
index 83909834d48f7c34098e171b2058534914374534..2bdd2e3c7aa6eba8502b50d439909123f463a2be 100644 (file)
 #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 (file)
index 6587920..0000000
+++ /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_
index dbe1b2fa4235148a152b85495f4f802c9365f84e..51ce8c871fc00bafb46c3747bd6b12574a309dc8 100644 (file)
@@ -38,6 +38,7 @@
 #define GROUP_APP_LABEL_KEY "__GROUP_APP_LABEL_KEY__"
 
 using namespace std;
+using namespace tizen_base;
 namespace notification {
 namespace item {
 
index 5b3497905f985c4de6b6555c8905d4c3612df38b..f79bade018362d0b6bacf4b9b14c475838ba1460 100644 (file)
@@ -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.
index 9173c407fc8c9c498e464ede577fcf0a4af5b18a..94e6297c07be07ad5c48d491f429ac5a352ca368 100644 (file)
@@ -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 {
 
index afe61974bb0a4637bb66ce5e59be81272697dadb..36ef4cbc84fb407201f11782aa8e9c7fe0297adc 100644 (file)
@@ -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.
index c4e13e69f2444c68472bdbaa92b15523f1df63a1..b34eb5078bf4bb74ef020a44589f3d0b30681f22 100644 (file)
@@ -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
index 21689f3cdbcd25d2f58422a88709113c448ff98c..42d8a0576cf1a7da097ef0d3c153ba196e8e0b30 100644 (file)
@@ -28,6 +28,8 @@
 #define LOG_TAG "NOTIFICATION_EX"
 #define IMAGE_PATH_KEY "__IMAGE_PATH_KEY__"
 
+using namespace tizen_base;
+
 namespace notification {
 namespace item {
 
index 3e7a9e82a6916045fe7cf3f9380a4457a6e8c091..5008650d6c71d3e0539672ed8f49742d9b641ed7 100644 (file)
@@ -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.
index 2aaa1f52d217ac5a01d2d1a54cf8eef75515f148..8bb7a10d71a2cf8c0090ed56d07540f1a604041e 100644 (file)
@@ -32,6 +32,8 @@
 #define INPUT_SELECTOR_CONTENTS_KEY "__INPUT_SELECTOR_CONTENTS_KEY__"
 
 using namespace std;
+using namespace tizen_base;
+
 namespace notification {
 namespace item {
 
index 90c673c7229f71954d72a2fa24f144504b4d08bc..6de51f5e9755f11fc72a0ae57ccf8a39e1ffb936 100644 (file)
@@ -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.
index a0a39d9c8c59d1a9c31cbd4e34d4b6122e72d6f5..f1f2ec4a4efc95a748303abc217f0547115164c2 100644 (file)
@@ -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);
index 3d9d837b5858c49ae56c241f338434e0b42bde88..db59895c488a8b4853ddeac2e42d2d5673e6e7f0 100644 (file)
@@ -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
index 9bf5cac163418d3ab80795ad0d9f69428af62aab..cb43e87583f4ac04b4e3de0fb47d6c43257b7b80 100644 (file)
@@ -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 {
 
index c00922646321c6705194d39e865956fc0487108c..44cff3fa7d5eba2a7d7d0597715c27ecb0d5cacd 100644 (file)
@@ -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;
index 509a5258ef5b7b0474735745cd357e8696026413..588fc2eabfd5f7697f2b984722cd62e17b9fcadc 100644 (file)
@@ -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
index 0c3e867c251ec1f544b20c508195b550b0f92214..f85cf15077ef85caaa6ee705b720c87c8f3cfc19 100644 (file)
@@ -27,6 +27,8 @@
 #define LOG_TAG "NOTIFICATION_EX"
 
 using namespace std;
+using namespace tizen_base;
+
 namespace notification {
 namespace item {
 
index 75b0421edd1684f8dfa6806086754f7cfbb6ed4d..4abf00ee7bb8993176b50cb3f3ab477762f1bb58 100644 (file)
@@ -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.
index c06d0ed299fe831b8ece3eaf099f08979a859d40..c27ccf747c64074c15ac7aff7eeda5e6b7330d4e 100644 (file)
@@ -35,6 +35,8 @@
 #define PROGRESS_UNIT_KEY "__PROGRESS_UNIT_KEY__"
 
 using namespace std;
+using namespace tizen_base;
+
 namespace notification {
 namespace item {
 
index a83e6d04239b40fbbe7b726de4498fb1c584f333..b339d72f53d230c841eef840dbc46f07b42bec10 100644 (file)
@@ -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.
index c00dc779d328cd34b2b01b71a79107fad0c6ff7a..f7041d7612bbd4b9bcf364f29b5dc3cf698ce4cd 100644 (file)
@@ -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 {
 
index ba6163e1b4d770db52e746e5f01733e2b7c49a08..45ab0b1ae70504cd23bda005408369bf2a300806 100644 (file)
@@ -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();
 
index 7b3f0f7c2223d279f60dcd38b4bfa9becf330b19..8025955552f5774b08f9c0ff5d93f2e2583af782 100644 (file)
@@ -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;
 
index 01fe1d2726e574649e8abd431497690a997ce93c..b63708c2fc9ae4bacee75d7d520ceeb56d07fa77 100644 (file)
@@ -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,
index 8f1681e427397fada7d156302eb772e50ef2325b..32601c86d590b892552e562aca67bed0101ec11b 100644 (file)
@@ -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.
index e22d543b0b9784374b93e717e2d4dd89d22ad34b..cb1d612d3dbcb2f3e3bdffb343413cc5eb28d660 100644 (file)
@@ -28,6 +28,8 @@
 #define LOG_TAG "NOTIFICATION_EX"
 #define TIME_KEY "__TIME_KEY__"
 
+using namespace tizen_base;
+
 namespace notification {
 namespace item {
 
index afbcc781525eaffd1c9060f8869ed1ae39751e99..c363bd3d82a7390afd6fb3ee78451e8ef9fe49ba 100644 (file)
@@ -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.
index f354d98d6b807caaad95faf7984fe16905b4d065..ed54ae2529e78facc98af001b195d938743734fb 100644 (file)
@@ -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 {
 
index 20c17578da77d4b6b38cf5ad69cffb1053dddafc..8855226c06a83d1b94f2049b8579627fc91be6cc 100644 (file)
@@ -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.
index 3a205c347776d2f5bc9ef025c5f2996e9dccd524..0dd3a19a522baf5c6e35e5c1ac36bd7ec6af5d8c 100644 (file)
@@ -28,6 +28,7 @@
 #define MY_ITEM_TYPE AbstractItem::Type::Custom + 1
 
 using namespace notification;
+using namespace tizen_base;
 using namespace notification::item;
 
 namespace {
index ff575c1b1bc714099bfc3cd4b3cf896b7dea2468..7b49c6082a522b255bdd6ce6fe51fc4da7ac3f21 100644 (file)
@@ -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 (file)
index a7e66cc..0000000
+++ /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);
-  }
-}
index ad4a996ae8ce64b30d447114c0859563995442b3..2e9e581e7d8a2ae8947d8f568aa5e7529b7f5075 100644 (file)
@@ -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;
index c72e6fbec7ce394d69abc1621b603473fd1c4aa2..cde985a6d5569d92f13d9bd1936367c79e9a6a78 100644 (file)
@@ -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;
 
index bdcb24661520570168c6683957facf67d903c72e..eba55a732797b01c9377ad2ea6ffe19a97275d35 100644 (file)
@@ -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;
 
index b4e3e059e834c0e918592b08481b603398177bab..76b0006a224d949192433cf5dcaa528a2910b014 100644 (file)
@@ -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;
 
index 120cee5d7837da452f9738405da3dfb00b72ba4d..655f12adf7efb3898c968c075765eb48b4955c9f 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "notification-ex/event_info_internal.h"
 
+using namespace tizen_base;
 using namespace notification;
 using namespace std;
 
index ee54af97caf22d65236b307ce405e839cd4d98f9..6034c37e68b6eed23cfd1067333e205082903947 100644 (file)
@@ -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;
index df7fb7f315e335e23199e80cfa6a81235581aaf1..98ff517ad4c70b290aeb4ee2ec114771f15d1a5f 100644 (file)
@@ -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;
 
index 91c7fc49d26ee5ad03687863fec37620fb8b3ce6..0a29622930908326822cae47c75b7b5402f12529 100644 (file)
@@ -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;
 
index 41db181407406b7b327c443c935e7702fe9f4caa..66c6786092f5c7448e6f7d2a31a4ce07fcccce89 100644 (file)
@@ -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;
 
index 245f66b3240e50cb9b961f53623b2d41c6f9c964..7bf3afce6a014ae5102d69df41d73b94b7fe8f07 100644 (file)
@@ -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;
index c4b115d60df03e7d28ceacc0dc3624e450cdef72..a8f0467dfccdab9698845961e0f10da399c69190 100644 (file)
@@ -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;
index 432a6a6cc35007ced5aaac9e5dcfeaa5ae120573..192156701858a511e60d835956a31ae807248fba 100644 (file)
@@ -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;
 
index fa149e5e502b78c2ed1364d4d5b9dc95829427f0..96e8e745fe11bca86c8b2ef7478cb2d8b55354a1 100644 (file)
@@ -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;
 
index 21c0c1884895e5afd7d9a65e392d187fd9473489..e231b365a7efb1f612c96bdee0907a07f6a47cb6 100644 (file)
@@ -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;