2 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
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 "common/log_private.hh"
20 #include "alias-appid/plugin_manager.hh"
23 #define API __attribute__ ((visibility("default")))
25 using namespace plugin;
27 extern "C" API int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char* pkgid,
28 const char* appid, GList* list)
30 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
31 PluginManager::GetInst().AddAppEventArgs(pkgid, appid,
32 EventType::Install, list);
36 extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNINSTALL(const char* pkgid,
37 const char* appid, GList* list)
39 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
40 PluginManager::GetInst().AddAppEventArgs(pkgid, appid,
41 EventType::Uninstall, list);
45 extern "C" API int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char* pkgid,
46 const char* appid, GList* list)
48 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
49 PluginManager::GetInst().AddAppEventArgs(pkgid, appid,
50 EventType::Upgrade, list);
54 extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERINSTALL(const char* pkgid,
55 const char* appid, GList* list)
57 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
58 PluginManager::GetInst().AddAppEventArgs(pkgid, appid,
59 EventType::Uninstall, list);
63 extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUNINSTALL(const char* pkgid,
64 const char* appid, GList* list)
66 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
67 PluginManager::GetInst().AddAppEventArgs(pkgid, appid,
68 EventType::Uninstall, list);
72 extern "C" API int PKGMGR_MDPARSER_PLUGIN_RECOVERUPGRADE(const char* pkgid,
73 const char* appid, GList* list)
75 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
76 PluginManager::GetInst().AddAppEventArgs(pkgid, appid,
77 EventType::Upgrade, list);
81 extern "C" API int PKGMGR_MDPARSER_PLUGIN_CLEAN(const char* pkgid,
82 const char* appid, GList* list)
84 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
85 PluginManager::GetInst().Clean();
89 extern "C" API int PKGMGR_MDPARSER_PLUGIN_UNDO(const char* pkgid,
90 const char* appid, GList* list)
92 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);
93 PluginManager::GetInst().Undo();
97 extern "C" API int PKGMGR_MDPARSER_PLUGIN_REMOVED(const char* pkgid,
98 const char* appid, GList* list)
100 _W("[__ALIAS_APPID__] pkgid(%s), appid(%s)", pkgid, appid);