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_NULL_ITEM_H_
18 #define NOTIFICATION_EX_NULL_ITEM_H_
24 #include "notification-ex/abstract_item.h"
26 namespace notification {
30 * @brief The class for IconTextItem type notification.
31 * @details The NullItem is used to notify the item is null object.
34 class EXPORT_API NullItem : public AbstractItem {
39 * @param[in] action The action for ImageItem
41 NullItem(std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
46 * @param[in] id The NullItem id
47 * @param[in] action The action for ImageItem
49 NullItem(std::string id,
50 std::shared_ptr<AbstractAction> action = std::shared_ptr<AbstractAction>({}));
59 * @brief Gets the type of NullItem.
61 * @return AbstractItem::Type::NullObject
63 int GetType() const override;
66 * @brief Serialize the data of NullItem.
68 * @return Bundle type data
70 tizen_base::Bundle Serialize() const override;
73 * @brief Deserialize the serialized data.
75 * @param[in] b The serialized Bundle data
77 void Deserialize(tizen_base::Bundle b) override;
80 * @brief Checks the item type exist in this notification.
82 * @param[in] type notification item type
83 * @return true if the item type exists
85 bool IsItemTypeExist(int type) override;
88 * @brief Finds the AbstractItem using by notification item id.
90 * @param[in] id notification item id
91 * @return AbstractItem object
93 AbstractItem& FindByID(std::string id) override;
97 } // namespace notification
99 #endif // NOTIFICATION_EX_NULL_ITEM_H_