#include <FBase_NativeError.h>
#include "FApp_MapDataControlImpl.h"
+#include <FSec_AccessController.h>
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::App;
+using namespace Tizen::Security;
namespace Tizen { namespace App {
MapDataControl::GetValue(const String& dataId, const String& key,
RequestId& reqId, int pageNo, int countPerPage)
{
+ result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER);
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
"This instance has not been properly constructed yet.");
MapDataControl::AddValue(const String& dataId, const String& key,
const String& value, RequestId& reqId)
{
+ result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER);
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
"This instance has not been properly constructed yet.");
MapDataControl::SetValue(const String& dataId, const String& key,
const String& oldValue, const String& newValue, RequestId& reqId)
{
+ result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER);
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
"This instance has not been properly constructed yet.");
MapDataControl::RemoveValue(const String& dataId, const String& key,
const String& value, RequestId& reqId)
{
+ result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER);
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
"This instance has not been properly constructed yet.");