#include "utils.h"
#include "multi_target_resolver.h"
#include "ni_common.h"
+#include "profile_common.h"
+#include "privilege_common.h"
#include "launcher_env.h"
-#include <vector>
-#include <app-runtime.h>
-
#ifdef LOG_TAG
#undef LOG_TAG
#endif
typedef struct _xmlDoc xmlDoc;
typedef xmlDoc* xmlDocPtr;
-bool pluginInstalled = false;
-static const char* INTERNET_PRIVILEGE = "http://tizen.org/privilege/internet";
-static int UID_OWNER = 5001;
-
-static void checkPrivilegeAndDisableIPv6(const char* pkgId, const std::string& rootPath)
-{
- int res = 0;
- if (security_manager_app_has_privilege(pkgId, INTERNET_PRIVILEGE, UID_OWNER, &res) == SECURITY_MANAGER_SUCCESS) {
- if (res != 1) {
- std::string filePath = rootPath + "/bin/" + DISABLE_IPV6_FILE;
- std::ofstream output(filePath);
- if (exist(filePath)) {
- _INFO("File to disable IPv6 is created successfully");
- } else {
- _ERR("Failed to create file to disable IPv6 [%s]", pkgId);
- }
- output.close();
- }
- }
-}
+static bool pluginInstalled = false;
extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
{
return 0;
}
- if (removeAppProfileData(pkgId) != NI_ERROR_NONE) {
+ if (removeAppProfileData(pkgId) != PROFILE_ERROR_NONE) {
_ERR("Failed to remove [%s] profile data", pkgId);
}
_ERR("Failed to resolve platform specific resources of nuget");
}
- checkPrivilegeAndDisableIPv6(pkgId, rootPath);
+ checkInternetPrivilegeAndDisableIPv6(pkgId, rootPath);
return 0;
}