Update description for chat_message item
[platform/core/api/notification.git] / notification-ex / visibility_action.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_VISIBILITY_ACTION_H_
18 #define NOTIFICATION_EX_VISIBILITY_ACTION_H_
19
20 #include <string>
21
22 #include "notification-ex/abstract_action.h"
23
24 namespace notification {
25 namespace item {
26
27 /**
28  * @brief The class for VisibilityAction type action.
29  * @details The action for visibility of notification.
30  * @since_tizen 5.5
31  */
32 class EXPORT_API VisibilityAction  : public AbstractAction {
33  public:
34   /**
35    * @brief Constructor
36    * @since_tizen 5.5
37    */
38   VisibilityAction();
39
40   /**
41    * @brief Constructor
42    * @since_tizen 5.5
43    * @param[in] extra
44    */
45   VisibilityAction(std::string extra);
46
47   /**
48    * @brief Destructor
49    * @since_tizen 5.5
50    */
51   virtual ~VisibilityAction();
52
53   /**
54    * @brief Gets the type of action
55    * @since_tizen 5.5
56    * @return The type of action
57    */
58   int GetType() const override;
59
60   /**
61    * @brief Serialize the data of AbstractAction.
62    * @since_tizen 5.5
63    * @return Bundle type data
64    */
65   tizen_base::Bundle Serialize() const override;
66
67   /**
68    * @brief Deserialize the serialized data.
69    * @since_tizen 5.5
70    * @param[in] b The serialized Bundle data
71    */
72   void Deserialize(tizen_base::Bundle b) override;
73
74   /**
75    * @brief Gets whether local or not.
76    * @since_tizen 5.5
77    * @return true if local, or false
78    */
79   bool IsLocal() const override;
80
81   /**
82    * @brief Execute the action
83    * @since_tizen 5.5
84    * @param[in] item The AbstractItem
85    */
86   void Execute(std::shared_ptr<AbstractItem> item) override;
87
88   /**
89    * @brief Gets the extra data
90    * @since_tizen 5.5
91    * @return The extra data
92    */
93   std::string GetExtra() const override;
94
95   /**
96    * @brief Sets the visibility
97    * @since_tizen 5.5
98    * @param[in] id
99    */
100   void SetVisibility(std::string id, bool visible);
101
102  private:
103   class Impl;
104   std::unique_ptr<Impl> impl_;
105 };
106
107 }  // namespace item
108 }  // namespace notification
109
110 #endif  // NOTIFICATION_EX_VISIBILITY_ACTION_H_