From f129eaa47d68cdf96c3488579ecdd5bce5f513f0 Mon Sep 17 00:00:00 2001 From: Duyoung Jang Date: Sun, 30 Jun 2013 14:31:07 +0900 Subject: [PATCH] Remove smack configuration Change-Id: Ideb30ea25862196c6959a96da363661c2fde0e99 Signed-off-by: Duyoung Jang --- inc/InstallerDefs.h | 2 +- src/Manager/SmackManager.cpp | 75 -------------------------------------------- src/Manager/SmackManager.h | 3 -- 3 files changed, 1 insertion(+), 79 deletions(-) diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h index 3d8dad8..bf113cb 100755 --- a/inc/InstallerDefs.h +++ b/inc/InstallerDefs.h @@ -23,7 +23,7 @@ #include "InstallerUtil.h" -#define OSP_INSTALLER_VERSION "version=[20130629.1]" +#define OSP_INSTALLER_VERSION "version=[20130630.1]" #define DIR_BIN L"/bin" #define DIR_INFO L"/info" diff --git a/src/Manager/SmackManager.cpp b/src/Manager/SmackManager.cpp index 6b53753..6468190 100755 --- a/src/Manager/SmackManager.cpp +++ b/src/Manager/SmackManager.cpp @@ -45,12 +45,7 @@ using namespace Tizen::Io; SmackManager::SmackManager(void) :__pContext(null) -,__isSmackEnable(false) { - if (IsSmackEnable() == true) - { - __isSmackEnable = true; - } } SmackManager::~SmackManager(void) @@ -68,11 +63,6 @@ SmackManager::Construct(InstallationContext* pContext) bool SmackManager::Install(const PackageId& packageId) { - if (__isSmackEnable == false) - { - return true; - } - TryReturn(__pContext, false, "__pContext is null"); int res = 0; @@ -93,11 +83,6 @@ SmackManager::Install(const PackageId& packageId) bool SmackManager::Uninstall(const PackageId& packageId) { - if (__isSmackEnable == false) - { - return true; - } - int res = 0; std::unique_ptr pPackageId(_StringConverter::CopyToCharArrayN(packageId)); @@ -111,11 +96,6 @@ SmackManager::Uninstall(const PackageId& packageId) bool SmackManager::AddLabelDir(const String& label, const String& dirPath, bool rootDirectory) { - if (__isSmackEnable == false) - { - return true; - } - int res = 0; String realPath; @@ -161,11 +141,6 @@ SmackManager::AddLabelDir(const String& label, const String& dirPath, bool rootD bool SmackManager::AddLabelSymlink(const String& label, const String& symlink) { - if (__isSmackEnable == false) - { - return true; - } - int res = 0; std::unique_ptr pPath(_StringConverter::CopyToCharArrayN(symlink)); @@ -187,11 +162,6 @@ SmackManager::AddLabelSymlink(const String& label, const String& symlink) bool SmackManager::AddLabelSharedDir(const PackageId& packageId, const String& dirPath) { - if (__isSmackEnable == false) - { - return true; - } - TryReturn(__pContext, false, "__pContext is null"); // if (__pContext->__isVerificationMode == false) @@ -274,11 +244,6 @@ SmackManager::AddLabelSharedDir(const PackageId& packageId, const String& dirPat bool SmackManager::AddSharedDirReaders(const String& label) { - if (__isSmackEnable == false) - { - return true; - } - TryReturn(__pContext, false, "__pContext is null"); int error = 0; @@ -369,11 +334,6 @@ CATCH: bool SmackManager::AddFriend(const Tizen::App::PackageId& packageId1, const Tizen::App::PackageId& packageId2) { - if (__isSmackEnable == false) - { - return true; - } - //int AddFriend(const char* pPackageId1, const char* pPackageId2); return true; @@ -382,11 +342,6 @@ SmackManager::AddFriend(const Tizen::App::PackageId& packageId1, const Tizen::Ap bool SmackManager::EnablePermissions(const PackageId& packageId) { - if (__isSmackEnable == false) - { - return true; - } - TryReturn(__pContext, false, "__pContext is null"); int res = 0; @@ -437,11 +392,6 @@ SmackManager::EnablePermissions(const PackageId& packageId) bool SmackManager::RevokePermissions(const PackageId& packageId) { - if (__isSmackEnable == false) - { - return true; - } - int res = 0; std::unique_ptr pPackageId(_StringConverter::CopyToCharArrayN(packageId)); @@ -452,31 +402,6 @@ SmackManager::RevokePermissions(const PackageId& packageId) return true; } -bool -SmackManager::IsSmackEnable() -{ - result r; - Registry reg; - String section(L"feature"); - String entry(L"smack"); - String value; - - r = reg.Construct(CONFIG_PATH, "r"); - TryReturn(!IsFailed(r), false, "CONFIG file is not found."); - - r = reg.GetValue(section, entry, value); - TryReturn(!IsFailed(r), false, "GetValue is failed. entry = [%ls]", entry.GetPointer()); - - AppLog("[%ls is %ls.]", entry.GetPointer(), value.GetPointer()); - - if (value == L"on") - { - return true; - } - - return false; -} - int SmackManager::Install(const char* pPackageId) { diff --git a/src/Manager/SmackManager.h b/src/Manager/SmackManager.h index 561c66a..2e6e071 100755 --- a/src/Manager/SmackManager.h +++ b/src/Manager/SmackManager.h @@ -47,8 +47,6 @@ public: bool RevokePermissions(const Tizen::App::PackageId& packageId); private: - bool IsSmackEnable(); - int Install(const char* pPackageId); int Uninstall(const char* pPackageId); @@ -66,7 +64,6 @@ private: private: InstallationContext* __pContext; - bool __isSmackEnable; }; // SmackManager -- 2.7.4