2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef NOTIFICATION_EX_VISIBILITY_ACTION_H_
18 #define NOTIFICATION_EX_VISIBILITY_ACTION_H_
22 #include "notification-ex/abstract_action.h"
24 namespace notification {
28 * @brief The class for VisibilityAction type action.
29 * @details The action for visibility of notification.
32 class EXPORT_API VisibilityAction : public AbstractAction {
45 VisibilityAction(std::string extra);
51 virtual ~VisibilityAction();
54 * @brief Gets the type of action
56 * @return The type of action
58 int GetType() const override;
61 * @brief Serialize the data of AbstractAction.
63 * @return Bundle type data
65 tizen_base::Bundle Serialize() const override;
68 * @brief Deserialize the serialized data.
70 * @param[in] b The serialized Bundle data
72 void Deserialize(tizen_base::Bundle b) override;
75 * @brief Gets whether local or not.
77 * @return true if local, or false
79 bool IsLocal() const override;
82 * @brief Execute the action
84 * @param[in] item The AbstractItem
86 void Execute(std::shared_ptr<AbstractItem> item) override;
89 * @brief Gets the extra data
91 * @return The extra data
93 std::string GetExtra() const override;
96 * @brief Sets the visibility
100 void SetVisibility(std::string id, bool visible);
104 std::unique_ptr<Impl> impl_;
108 } // namespace notification
110 #endif // NOTIFICATION_EX_VISIBILITY_ACTION_H_