2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FAppMapDataControl.cpp
19 * @brief This is the implementation for the %MapDataControl class.
22 #include <FAppMapDataControl.h>
24 #include <FBaseSysLog.h>
25 #include <FBase_NativeError.h>
27 #include "FApp_MapDataControlImpl.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
31 using namespace Tizen::App;
33 namespace Tizen { namespace App {
35 MapDataControl::MapDataControl(void)
36 : __pMapDataControlImpl(null)
38 __pMapDataControlImpl = new _MapDataControlImpl;
41 MapDataControl::~MapDataControl(void)
43 delete __pMapDataControlImpl;
47 MapDataControl::GetValue(const String& dataId, const String& key,
48 RequestId& reqId, int pageNo, int countPerPage)
50 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
51 "This instance has not been properly constructed yet.");
53 return __pMapDataControlImpl->GetValue(dataId, key, reqId, pageNo, countPerPage);
57 MapDataControl::AddValue(const String& dataId, const String& key,
58 const String& value, RequestId& reqId)
60 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
61 "This instance has not been properly constructed yet.");
63 return __pMapDataControlImpl->AddValue(dataId, key, value, reqId);
67 MapDataControl::SetValue(const String& dataId, const String& key,
68 const String& oldValue, const String& newValue, RequestId& reqId)
70 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
71 "This instance has not been properly constructed yet.");
73 return __pMapDataControlImpl->SetValue(dataId, key, oldValue, newValue, reqId);
77 MapDataControl::RemoveValue(const String& dataId, const String& key,
78 const String& value, RequestId& reqId)
80 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
81 "This instance has not been properly constructed yet.");
83 return __pMapDataControlImpl->RemoveValue(dataId, key, value, reqId);
87 MapDataControl::SetMapDataControlResponseListener(IMapDataControlResponseListener* pListener)
89 SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
90 "This instance has not been properly constructed yet.");
92 return __pMapDataControlImpl->SetMapDataControlResponseListener(pListener);