Merge branch 'tizen' into tizen_5.5
[platform/core/api/notification.git] / notification-ex / item_inflator.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/factory_manager.h"
22 #include "notification-ex/item_inflator.h"
23
24 #ifdef LOG_TAG
25 #undef LOG_TAG
26 #endif
27
28 #define LOG_TAG "NOTIFICATION_EX"
29
30 using namespace std;
31 namespace notification {
32 namespace item {
33
34 unique_ptr<AbstractItem> ItemInflator::Create(tizen_base::Bundle b) {
35   unique_ptr<AbstractItem> item =
36       FactoryManager::GetInst().CreateItem(AbstractItem::GetType(b));
37   item.get()->Deserialize(b);
38   return item;
39 }
40
41 }  // namespace item
42 }  // namespace notification