Release version 0.5.85
[platform/core/api/notification.git] / notification-ex / abstract_item_implementation.h
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef NOTIFICATION_EX_ABSTRACT_ITEM_IMPLEMENTATION_H_
18 #define NOTIFICATION_EX_ABSTRACT_ITEM_IMPLEMENTATION_H_
19
20 #include <string>
21 #include <memory>
22 #include <list>
23 #include <vector>
24
25 #include "notification-ex/abstract_item.h"
26
27 namespace notification {
28 namespace item {
29
30 class AbstractItem::Impl {
31  public:
32   class ItemInfo;
33   virtual ~Impl();
34
35  private:
36   Impl(AbstractItem* parent);
37   Impl(AbstractItem* parent,
38       std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
39   Impl(AbstractItem* parent, std::string id,
40       std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
41   bool IsValidMainType(AbstractItem& target, MainType type);
42
43  private:
44   friend class AbstractItem;
45   std::string GenerateItemId();
46   std::string channel_;
47   std::string id_;
48   std::shared_ptr<LEDInfo> led_ = nullptr;
49   int policy_ = None;
50   std::shared_ptr<Style> style_ = nullptr;
51   bool visible_ = true;
52   bool enable_ = true;
53   int version_ = 1;
54   int hide_time_ = 0;
55   int delete_time_ = 0;
56   std::list<std::string> receiver_group_list_;
57   std::string can_receive_;
58   std::shared_ptr<AbstractAction> action_;
59   std::shared_ptr<MultiLanguage> multi_lang_;
60   std::vector<std::shared_ptr<MultiLanguage>> multi_lang_arr_;
61   AbstractItem* parent_;
62   std::string sound_path_;
63   std::string priv_sound_path_;
64   std::string vibration_path_;
65   std::string priv_vibration_path_;
66   std::string sender_appid_;
67   std::shared_ptr<IItemInfo> info_;
68   std::list<std::string> hide_viewer_list_;
69   std::string tag_;
70   time_t time_ = 0;
71   uid_t uid_ = 0;
72   int request_id_ = 0;
73   int64_t private_id_ = 0;
74   std::string background_;
75   bool ongoing_ = false;
76   MainType main_type_ = MainNone;
77   tizen_base::Bundle extension_data_;
78 };
79
80 }  // namespace item
81 }  // namespace notification
82
83 #endif  // NOTIFICATION_EX_ABSTRACT_ITEM_IMPLEMENTATION_H_