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.
19 #include "notification-ex/icon_item.h"
20 #include "notification-ex/icon_item_implementation.h"
21 #include "notification-ex/abstract_item.h"
27 #define LOG_TAG "NOTIFICATION_EX"
29 namespace notification {
32 IconItem::IconItem(std::string icon_path, std::shared_ptr<AbstractAction> action)
33 : ImageItem(icon_path, action) , impl_(new Impl(this, icon_path)) {
36 IconItem::IconItem(std::string id, std::string icon_path,
37 std::shared_ptr<AbstractAction> action)
38 : ImageItem(id, icon_path, action), impl_(new Impl(this, icon_path)) {
41 IconItem::Impl::Impl(IconItem* parent, std::string icon_path)
42 : parent_(parent), icon_path_(icon_path) {
43 LOGI("IconItem impl created");
46 IconItem::~IconItem() = default;
47 IconItem::Impl::~Impl() = default;
49 int IconItem::GetType() const {
50 return AbstractItem::Icon;
54 } // namespace notification