Revert "Use tizen_base::Bundle"
[platform/core/api/notification.git] / notification-ex / action_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/action_inflator.h"
23
24 #ifdef LOG_TAG
25 #undef LOG_TAG
26 #endif
27
28 #define LOG_TAG "NOTIFICATION_EX"
29
30 namespace notification {
31 namespace item {
32
33 std::shared_ptr<AbstractAction> ActionInflator::Create(Bundle b) {
34   std::shared_ptr<AbstractAction> action =
35       FactoryManager::GetInst().CreateAction(AbstractAction::GetType(b));
36   action.get()->Deserialize(b);
37   return action;
38 }
39
40 }  // namespace item
41 }  // namespace notification
42