Change type for policy 85/202385/1
authorJunghoon Park <jh9216.park@samsung.com>
Thu, 28 Mar 2019 02:13:51 +0000 (11:13 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Thu, 28 Mar 2019 02:13:51 +0000 (11:13 +0900)
Change-Id: Ice4b5eb6cbbb315cfc6bf33d2efc0158c3f6b005
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
notification-ex/abstract_item.cc
notification-ex/abstract_item.h
notification-ex/abstract_item_implementation.h

index a676553..72c634d 100644 (file)
@@ -393,11 +393,11 @@ bool AbstractItem::CanReceive(std::string id) const {
   return true;
 }
 
-void AbstractItem::SetPolicy(AbstractItem::Policy policy) {
+void AbstractItem::SetPolicy(int policy) {
   impl_->policy_ = policy;
 }
 
-AbstractItem::Policy AbstractItem::GetPolicy() const {
+int AbstractItem::GetPolicy() const {
   return impl_->policy_;
 }
 
index cb136a8..aeeabb8 100644 (file)
@@ -210,9 +210,9 @@ class EXPORT_API AbstractItem {
   };
 
   enum Policy {
-    None,
-    OnBootClear,
-    SimMode,
+    None = 0,
+    OnBootClear = 1 << 0,
+    SimMode = 1 << 1,
   };
 
  public:
@@ -241,8 +241,8 @@ class EXPORT_API AbstractItem {
   void RemoveReceiver(std::string receiver_group);
   std::list<std::string> GetReceiverList();
   bool CanReceive(std::string id) const;
-  void SetPolicy(Policy policy);
-  Policy GetPolicy() const;
+  void SetPolicy(int policy);
+  int GetPolicy() const;
   std::string GetChannel() const;
   void SetChannel(std::string channel);
   void SetLEDInfo(std::shared_ptr<LEDInfo> led);
index eaada76..af62938 100644 (file)
@@ -44,7 +44,7 @@ class AbstractItem::Impl {
   std::string channel_;
   std::string id_;
   std::shared_ptr<LEDInfo> led_ = nullptr;
-  Policy policy_ = None;
+  int policy_ = None;
   std::shared_ptr<Style> style_ = nullptr;
   bool visible_ = true;
   bool enable_ = true;