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_IMAGE_ITEM_H_
18 #define NOTIFICATION_EX_IMAGE_ITEM_H_
25 #include "notification-ex/abstract_item.h"
27 namespace notification {
31 * @brief The class for ImageItem type notification.
32 * @details The class to make the notification with image.
35 class EXPORT_API ImageItem : public AbstractItem {
40 * @param[in] image_path The image path of ImageItem
41 * @param[in] action The action for ImageItem
43 ImageItem(std::string image_path,
44 std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
49 * @param[in] id The ImageItem id
50 * @param[in] image_path The image path of ImageItem
51 * @param[in] action The action for ImageItem
53 ImageItem(std::string id, std::string image_path,
54 std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
63 * @brief Gets the type of ImageItem.
65 * @return AbstractItem::Type::Image
67 int GetType() const override;
70 * @brief Serialize the data of ImageItem.
72 * @return Bundle type data
74 tizen_base::Bundle Serialize() const override;
77 * @brief Deserialize the serialized data.
79 * @param[in] b The serialized Bundle data
81 void Deserialize(tizen_base::Bundle b) override;
84 * @brief Checks the item type exist in this notification.
86 * @param[in] type notification item type
87 * @return true if the item type exists
89 bool IsItemTypeExist(int type) override;
92 * @brief Gets the path of image.
94 * @return The path of image
96 std::string GetImagePath() const;
99 * @brief Gets the path of shared file location.
101 * @return The list of shared path.
103 std::list<std::string> GetSharedPath() const override;
106 * @brief Sets the shared file path to original file path.
109 void SetSharedPath() override;
111 std::list<std::map<std::string, std::string>> GetPathMapList(void) const override;
115 std::unique_ptr<Impl> impl_;
116 void UpdatePrivatePath();
120 } // namespace notification
121 #endif // NOTIFICATION_EX_IMAGE_ITEM_H_