Release version 0.5.85
[platform/core/api/notification.git] / notification-ex / null_item.cc
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #include <dlog.h>
18
19 #include <memory>
20
21 #include "notification-ex/null_item.h"
22
23 #ifdef LOG_TAG
24 #undef LOG_TAG
25 #endif
26
27 #define LOG_TAG "NOTIFICATION_EX"
28
29 using namespace std;
30 using namespace tizen_base;
31
32 namespace notification {
33 namespace item {
34
35 NullItem::NullItem(shared_ptr<AbstractAction> action)
36     : AbstractItem(action) {
37 }
38
39 NullItem::NullItem(string id,
40       shared_ptr<AbstractAction> action)
41     : AbstractItem(id, action) {
42 }
43 NullItem::~NullItem() = default;
44
45 int NullItem::GetType() const {
46   return AbstractItem::NullObject;
47 }
48
49 Bundle NullItem::Serialize() const {
50   Bundle b;
51   b = AbstractItem::Serialize();
52   return b;
53 }
54
55 void NullItem::Deserialize(Bundle b) {
56   AbstractItem::Deserialize(b);
57 }
58
59 AbstractItem& NullItem::FindByID(std::string id) {
60   return *this;
61 }
62
63 bool NullItem::IsItemTypeExist(int type) {
64   if (GetType() == type)
65     return true;
66   return false;
67 }
68
69 }  // namespace item
70 }  // namespace notification