2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FAppMapDataControl.cpp
20 * @brief This is the implementation for the %MapDataControl class.
23 #include <FAppMapDataControl.h>
25 #include <FBaseSysLog.h>
26 #include <FBase_NativeError.h>
28 #include "FApp_MapDataControlImpl.h"
30 using namespace Tizen::Base;
31 using namespace Tizen::Base::Collection;
32 using namespace Tizen::App;
34 namespace Tizen { namespace App {
36 MapDataControl::MapDataControl(void)
37 : __pMapDataControlImpl(null)
39 __pMapDataControlImpl = new _MapDataControlImpl;
42 MapDataControl::~MapDataControl(void)
44 delete __pMapDataControlImpl;
48 MapDataControl::GetValue(const String& dataId, const String& key,
49 RequestId& reqId, int pageNo, int countPerPage)
51 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
52 "This instance has not been properly constructed yet.");
54 return __pMapDataControlImpl->GetValue(dataId, key, reqId, pageNo, countPerPage);
58 MapDataControl::AddValue(const String& dataId, const String& key,
59 const String& value, RequestId& reqId)
61 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
62 "This instance has not been properly constructed yet.");
64 return __pMapDataControlImpl->AddValue(dataId, key, value, reqId);
68 MapDataControl::SetValue(const String& dataId, const String& key,
69 const String& oldValue, const String& newValue, RequestId& reqId)
71 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
72 "This instance has not been properly constructed yet.");
74 return __pMapDataControlImpl->SetValue(dataId, key, oldValue, newValue, reqId);
78 MapDataControl::RemoveValue(const String& dataId, const String& key,
79 const String& value, RequestId& reqId)
81 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
82 "This instance has not been properly constructed yet.");
84 return __pMapDataControlImpl->RemoveValue(dataId, key, value, reqId);
88 MapDataControl::SetMapDataControlResponseListener(IMapDataControlResponseListener* pListener)
90 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
91 "This instance has not been properly constructed yet.");
93 return __pMapDataControlImpl->SetMapDataControlResponseListener(pListener);