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_APP_CONTROL_ACTION_H_
18 #define NOTIFICATION_EX_APP_CONTROL_ACTION_H_
20 #include <app_control.h>
24 #include "notification-ex/abstract_action.h"
26 namespace notification {
30 * @brief The class for AppControlAction type action.
31 * @details The action with app control.
34 class EXPORT_API AppControlAction : public AbstractAction {
39 * @param[in] app_control The app control handle
41 AppControlAction(app_control_h app_control);
46 * @param[in] app_control The app control handle
49 AppControlAction(app_control_h app_control, std::string extra);
55 virtual ~AppControlAction();
58 * @brief Gets the type of action
60 * @return The type of action
62 int GetType() const override;
65 * @brief Serialize the data of AbstractAction.
67 * @return Bundle type data
69 tizen_base::Bundle Serialize() const override;
72 * @brief Deserialize the serialized data.
74 * @param[in] b The serialized Bundle data
76 void Deserialize(tizen_base::Bundle b) override;
79 * @brief Gets whether local or not.
81 * @return true if local, or false
83 bool IsLocal() const override;
86 * @brief Execute the action
88 * @param[in] item The AbstractItem
90 void Execute(std::shared_ptr<AbstractItem> item) override;
93 * @brief Gets the extra data
95 * @return The extra data
97 std::string GetExtra() const override;
100 * @brief Gets the extra data
102 * @return The extra data
104 void SetAppControl(app_control_h app_control);
107 * @brief Gets the app control handle
109 * @return the app control handle
111 app_control_h GetAppControl() const;
115 std::unique_ptr<Impl> impl_;
119 } // namespace notification
121 #endif // NOTIFICATION_EX_APP_CONTROL_ACTION_H_