From 8261563b23140f237f135712744633a400cedf91 Mon Sep 17 00:00:00 2001 From: "hb.min" Date: Mon, 18 Mar 2013 22:50:04 +0900 Subject: [PATCH] Remove temporary method of getting privilege name and add new privileges (appwidgetprovider.install and shortcut.install) Change-Id: I9dca6c6bfa9fc989f6d3364cd01f3cfa02396978 Signed-off-by: hb.min --- inc/FSecPrivilegeInfo.h | 30 +------------------------ src/security/FSecPrivilegeInfo.cpp | 35 ------------------------------ src/security/inc/FSec_AccessControlTypes.h | 16 +++++++------- 3 files changed, 9 insertions(+), 72 deletions(-) diff --git a/inc/FSecPrivilegeInfo.h b/inc/FSecPrivilegeInfo.h index a7816b2..1197c30 100755 --- a/inc/FSecPrivilegeInfo.h +++ b/inc/FSecPrivilegeInfo.h @@ -51,34 +51,6 @@ class _OSP_EXPORT_ PrivilegeInfo public: /** - * Gets the name of a privilege. - * - * @since 2.1 - * - * @return The name of a privilege, else an empty string is returned if there is no value. - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM An unexpected system error occurred. - * @exception E_INVALID_ARG The specified input privilege string is invalid. - * @exception E_DATA_NOT_FOUND The privilege information does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - */ - static Tizen::Base::String GetName(const Tizen::Base::String& privilege); - - /** - * Gets the description of a privilege. - * - * @since 2.1 - * - * @return The description of a privilege, else an empty string is returned if there is no value. - * @exception E_SUCCESS The method is successful. - * @exception E_SYSTEM An unexpected system error occurred. - * @exception E_INVALID_ARG The specified input privilege string is invalid. - * @exception E_DATA_NOT_FOUND The privilege information does not exist. - * @remarks The specific error code can be accessed using the GetLastResult() method. - */ - static Tizen::Base::String GetDescription(const Tizen::Base::String& privilege); - - /** * The object is not fully constructed after this constructor is called. @n * For full construction, the Construct() method must be called right after calling this constructor. * @@ -156,7 +128,7 @@ private: PrivilegeInfo& operator =(const PrivilegeInfo& rhs); private: - static class _PrivilegeInfoImpl* __pPrivilegeInfoImpl; + class _PrivilegeInfoImpl * __pImpl; friend class _PrivilegeInfoImpl; diff --git a/src/security/FSecPrivilegeInfo.cpp b/src/security/FSecPrivilegeInfo.cpp index c48b1fe..1890f5e 100755 --- a/src/security/FSecPrivilegeInfo.cpp +++ b/src/security/FSecPrivilegeInfo.cpp @@ -35,7 +35,6 @@ using namespace Tizen::Security; namespace Tizen { namespace Security { -_PrivilegeInfoImpl* PrivilegeInfo::__pPrivilegeInfoImpl = null; PrivilegeInfo::PrivilegeInfo(void) : __pImpl(null) @@ -97,38 +96,4 @@ PrivilegeInfo::GetDescription(void) const return __pImpl->GetDescription(); } - - -String -PrivilegeInfo::GetName(const String& privilege) -{ - String name; - - if (__pPrivilegeInfoImpl == null) - { - __pPrivilegeInfoImpl = _PrivilegeInfoImpl::GetInstance(); - } - SysTryReturn(NID_SEC, __pPrivilegeInfoImpl != null, name, E_SYSTEM, "An unexpected system error occurred."); - - name = __pPrivilegeInfoImpl->GetName(privilege); - - return name; -} - -String -PrivilegeInfo::GetDescription(const String& privilege) -{ - String description; - - if (__pPrivilegeInfoImpl == null) - { - __pPrivilegeInfoImpl = _PrivilegeInfoImpl::GetInstance(); - } - SysTryReturn(NID_SEC, __pPrivilegeInfoImpl != null, description, E_SYSTEM, "An unexpected system error occurred."); - - description = __pPrivilegeInfoImpl->GetDescription(privilege); - - return description; -} - }} // Tizen::Security diff --git a/src/security/inc/FSec_AccessControlTypes.h b/src/security/inc/FSec_AccessControlTypes.h index 878612d..fd33720 100644 --- a/src/security/inc/FSec_AccessControlTypes.h +++ b/src/security/inc/FSec_AccessControlTypes.h @@ -111,7 +111,7 @@ enum _Privilege _PRV_WIFI_WIFIDIRECT_ADMIN, _PRV_WIFI_WIFIDIRECT_READ, _PRV_WIFIMANAGER, - _PRV_APPWIDGET, + _PRV_APPWIDGETPROVIDER_INSTALL, _PRV_ACCOUNT_READ, _PRV_ACCOUNT_WRITE, _PRV_USERPROFILE_READ, @@ -125,7 +125,7 @@ enum _Privilege _PRV_GEOLOCATIONPERMISSION_READ, _PRV_GEOLOCATIONPERMISSION_WRITE, _PRV_LOCKMANAGER, - _PRV_SHORTCUT, + _PRV_SHORTCUT_INSTALL, _PRV_APPMANAGER_KILL, _PRV_PRIVILEGEMANAGER_READ, _PRV_PRIVACYMANAGER_READ, @@ -221,7 +221,7 @@ const static _PrivilegeStringList privilegeListTable[_MAX_PRIVILEGE_ENUM] = {L"wifi.wifidirect.admin", _PRV_WIFI_WIFIDIRECT_ADMIN}, {L"wifi.wifidirect.read", _PRV_WIFI_WIFIDIRECT_READ}, {L"wifimanager", _PRV_WIFIMANAGER}, - {L"appwidget", _PRV_APPWIDGET}, + {L"appwidgetprovider.install", _PRV_APPWIDGETPROVIDER_INSTALL}, {L"account.read", _PRV_ACCOUNT_READ}, {L"account.write", _PRV_ACCOUNT_WRITE}, {L"userprofile.read", _PRV_USERPROFILE_READ}, @@ -235,7 +235,7 @@ const static _PrivilegeStringList privilegeListTable[_MAX_PRIVILEGE_ENUM] = {L"geolocationpermission.read", _PRV_GEOLOCATIONPERMISSION_READ}, {L"geolocationpermission.write", _PRV_GEOLOCATIONPERMISSION_WRITE}, {L"lockmanager", _PRV_LOCKMANAGER}, - {L"shortcut", _PRV_SHORTCUT}, + {L"shortcut.install", _PRV_SHORTCUT_INSTALL}, {L"appmanager.kill", _PRV_APPMANAGER_KILL}, {L"privilegemanager.read", _PRV_PRIVILEGEMANAGER_READ}, {L"privacymanager.read", _PRV_PRIVACYMANAGER_READ}, @@ -329,7 +329,7 @@ const static Tizen::Base::_ApiVisibility visibilityLevelListTable[_MAX_PRIVILEGE { Tizen::Base::_API_VISIBILITY_PUBLIC }, // wifi.wifidirect.admin { Tizen::Base::_API_VISIBILITY_PUBLIC }, // wifi.wifidirect.read { Tizen::Base::_API_VISIBILITY_PARTNER_MANUFACTURER }, // wifimanager - { Tizen::Base::_API_VISIBILITY_PUBLIC }, // appwidget + { Tizen::Base::_API_VISIBILITY_PUBLIC }, // appwidgetprovider.install { Tizen::Base::_API_VISIBILITY_PUBLIC }, // account.read { Tizen::Base::_API_VISIBILITY_PUBLIC }, // account.write { Tizen::Base::_API_VISIBILITY_PUBLIC }, // userprofile.read @@ -343,7 +343,7 @@ const static Tizen::Base::_ApiVisibility visibilityLevelListTable[_MAX_PRIVILEGE { Tizen::Base::_API_VISIBILITY_PARTNER_MANUFACTURER }, // geolocationpermission.read { Tizen::Base::_API_VISIBILITY_PARTNER_MANUFACTURER }, // geolocationpermission.write { Tizen::Base::_API_VISIBILITY_PARTNER }, // lockmanager - { Tizen::Base::_API_VISIBILITY_PUBLIC }, // shortcut + { Tizen::Base::_API_VISIBILITY_PUBLIC }, // shortcut.install { Tizen::Base::_API_VISIBILITY_PARTNER }, // appmanager.kill { Tizen::Base::_API_VISIBILITY_PARTNER }, // privilegemanager.read { Tizen::Base::_API_VISIBILITY_PARTNER_MANUFACTURER }, // privacymanager.read @@ -437,7 +437,7 @@ const static _PrivilegeLevel privilegeLevelListTable[_MAX_PRIVILEGE_ENUM][_PRV_A { _PRV_LEVEL_USER }, // wifi.wifidirect.admin { _PRV_LEVEL_USER }, // wifi.wifidirect.read { _PRV_LEVEL_SYSTEM }, // wifimanager - { _PRV_LEVEL_USER }, // appwidget + { _PRV_LEVEL_USER }, // appwidgetprovider.install { _PRV_LEVEL_USER }, // account.read { _PRV_LEVEL_USER }, // account.write { _PRV_LEVEL_USER }, // userprofile.read @@ -451,7 +451,7 @@ const static _PrivilegeLevel privilegeLevelListTable[_MAX_PRIVILEGE_ENUM][_PRV_A { _PRV_LEVEL_SYSTEM }, // geolocationpermission.read { _PRV_LEVEL_SYSTEM }, // geolocationpermission.write { _PRV_LEVEL_USER }, // lockmanager - { _PRV_LEVEL_USER }, // shortcut + { _PRV_LEVEL_USER }, // shortcut.install { _PRV_LEVEL_SYSTEM }, // appmanager.kill { _PRV_LEVEL_SYSTEM }, // privilegemanager.read { _PRV_LEVEL_SYSTEM }, // privacymanager.read -- 2.7.4