Update api about private_id
[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 #include <bundle_cpp.h>
19
20 #include <memory>
21
22 #include "notification-ex/factory_manager.h"
23 #include "notification-ex/action_inflator.h"
24
25 #ifdef LOG_TAG
26 #undef LOG_TAG
27 #endif
28
29 #define LOG_TAG "NOTIFICATION_EX"
30
31 namespace notification {
32 namespace item {
33
34 std::shared_ptr<AbstractAction> ActionInflator::Create(tizen_base::Bundle b) {
35   std::shared_ptr<AbstractAction> action =
36       FactoryManager::GetInst().CreateAction(AbstractAction::GetType(b));
37   action.get()->Deserialize(b);
38   return action;
39 }
40
41 }  // namespace item
42 }  // namespace notification
43