Merge "move redundant logic to server" into devel_3.0_main
[platform/framework/native/appfw.git] / src / system / FSysSettingInfo.cpp
index 67bcdb7..751b562 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -99,36 +98,24 @@ SettingInfo::GetValue(const String& key, UuId& value)
 result
 SettingInfo::SetWallpaper(const String& filePath)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTING);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetWallpaper(filePath);
 }
 
 result
 SettingInfo::SetRingtone(const String& filePath)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTING);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetRingtone(filePath);
 }
 
 result
 SettingInfo::SetVolume(const String& soundCategory, int level)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTING);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetVolume(soundCategory, level);
 }
 
 result 
 SettingInfo::GetValueForPrivilegedKey(const String& key, bool& value)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTINGMANAGER_READ);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::GetValueForPrivilegedKey(key, value);
 }
 
@@ -140,71 +127,49 @@ SettingInfo::HasKey(const String& key)
 
 result 
 SettingInfo::SetValue(const String& key, bool value)
-{
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTING);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));       
+{      
        return _SettingInfoImpl::SetValue(key, value);
 }
 
 result 
 SettingInfo::SetValue(const String& key, int value)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTING);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetValue(key, value);
 }
 
 result 
 SettingInfo::SetValue(const String& key, String value)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTING);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetValue(key, value);
 }
 
 result 
 SettingInfo::SetValueForPrivilegedKey(const String& key, bool value)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTINGMANAGER_WRITE);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetValueForPrivilegedKey(key, value);
 }
 
 result 
 SettingInfo::SetValueForPrivilegedKey(const String& key, String value)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTINGMANAGER_WRITE);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetValueForPrivilegedKey(key, value);
 }
 
 result 
 SettingInfo::ResetToFactoryDefault(void)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTINGMANAGER_WRITE);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::ResetToFactoryDefault();
 }
 
 result 
 SettingInfo::SetValueAsync(const String& key, bool value, ISettingInfoSetValueAsyncResultListener* listener)
 {
-       result r = E_SUCCESS;
-       r = _AccessController::CheckUserPrivilege(_PRV_SETTING);
-       SysTryReturn(NID_SYS, r == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED, ("[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method."));
        return _SettingInfoImpl::SetValueAsync(key, value, listener);
 }
 
 result 
 SettingInfo::SetValueAsyncForPrivilegedKey(const String& key, bool value, ISettingInfoSetValueAsyncResultListener* listener)
 {
-       result r = E_SUCCESS;
        return _SettingInfoImpl::SetValueAsyncForPrivilegedKey(key, value, listener);
 }