#include "tac_installer.h"
#include <glib.h>
+#include <string>
#ifdef LOG_TAG
#undef LOG_TAG
extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char *pkgId, const char *appId, GList *list)
{
+ if (pkgId == NULL || appId == NULL) {
+ return 0;
+ }
return tacInstall(std::string(pkgId), TAC_STATE_INSTALL);
}
extern "C" int PKGMGR_MDPARSER_PLUGIN_UPGRADE(const char *pkgId, const char *appId, GList *list)
{
+ if (pkgId == NULL || appId == NULL) {
+ return 0;
+ }
return tacUpgrade(std::string(pkgId), TAC_STATE_UPGRADE);
}
extern "C" int PKGMGR_MDPARSER_PLUGIN_UNINSTALL(const char *pkgId, const char *appId, GList *list)
{
+ if (pkgId == NULL || appId == NULL) {
+ return 0;
+ }
return tacUninstall(std::string(pkgId), TAC_STATE_UNINSTALL);
}
extern "C" int PKGMGR_MDPARSER_PLUGIN_REMOVED(const char *pkgId, const char *appId, GList *list)
{
+ if (pkgId == NULL || appId == NULL) {
+ return 0;
+ }
return tacRemoved(std::string(pkgId));
}
extern "C" int PKGMGR_MDPARSER_PLUGIN_UNDO(const char *pkgId, const char *appId, GList *list)
{
+ if (pkgId == NULL || appId == NULL) {
+ return 0;
+ }
return tacUndo(std::string(pkgId));
}
extern "C" int PKGMGR_MDPARSER_PLUGIN_CLEAN(const char *pkgId, const char *appId, GList *list)
{
+ if (pkgId == NULL || appId == NULL) {
+ return 0;
+ }
return tacClean(std::string(pkgId));
}