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 FAppDataControlProviderManager.cpp
19 * @brief This is the implementation for the %DataControlProviderManager class.
24 #include <FBaseDataType.h>
25 #include <FBaseString.h>
26 #include <FBaseColIList.h>
27 #include <FBaseColIMap.h>
28 #include <FAppDataControlProviderManager.h>
29 #include <FIoDbEnumerator.h>
31 #include <FBaseSysLog.h>
33 #include "FApp_DataControlProviderManagerImpl.h"
35 using namespace Tizen::Base;
36 using namespace Tizen::Base::Collection;
37 using namespace Tizen::Io;
39 namespace Tizen { namespace App
43 DataControlProviderManager::SetSqlDataControlProviderEventListener(ISqlDataControlProviderEventListener* pListener)
45 SysTryReturnResult(NID_APP, __pDataControlProviderManagerImpl, E_INVALID_STATE, "This instance has not been properly constructed.");
46 return __pDataControlProviderManagerImpl->SetSqlDataControlProviderEventListener(pListener);
50 DataControlProviderManager::SetMapDataControlProviderEventListener(IMapDataControlProviderEventListener* pListener)
52 SysTryReturnResult(NID_APP, __pDataControlProviderManagerImpl, E_INVALID_STATE, "This instance has not been properly constructed.");
53 return __pDataControlProviderManagerImpl->SetMapDataControlProviderEventListener(pListener);
57 DataControlProviderManager::SendSqlDataControlSelectResult(RequestId reqId, IDbEnumerator* pDbEnum)
59 SysTryReturnResult(NID_APP, __pDataControlProviderManagerImpl, E_INVALID_STATE,
60 "This instance has not been properly constructed.");
61 return __pDataControlProviderManagerImpl->SendSqlDataControlSelectResult(reqId, pDbEnum);
65 DataControlProviderManager::SendSqlDataControlInsertResult(RequestId reqId, long long insertRowId)
67 SysTryReturnResult(NID_APP, __pDataControlProviderManagerImpl, E_INVALID_STATE,
68 "This instance has not been properly constructed.");
69 return __pDataControlProviderManagerImpl->SendSqlDataControlInsertResult(reqId, insertRowId);
73 DataControlProviderManager::SendSqlDataControlUpdateDeleteResult(RequestId reqId)
75 SysTryReturnResult(NID_APP, __pDataControlProviderManagerImpl, E_INVALID_STATE,
76 "This instance has not been properly constructed.");
77 return __pDataControlProviderManagerImpl->SendSqlDataControlUpdateDeleteResult(reqId);
81 DataControlProviderManager::SendMapDataControlResult(RequestId reqId, IList* pResultValueList)
83 SysTryReturnResult(NID_APP, __pDataControlProviderManagerImpl, E_INVALID_STATE,
84 "This instance has not been properly constructed.");
85 return __pDataControlProviderManagerImpl->SendMapDataControlResult(reqId, pResultValueList);
89 DataControlProviderManager::SendDataControlError(RequestId reqId, const String& errorMsg)
91 SysTryReturnResult(NID_APP, __pDataControlProviderManagerImpl, E_INVALID_STATE,
92 "This instance has not been properly constructed.");
93 return __pDataControlProviderManagerImpl->SendDataControlError(reqId, errorMsg);
96 DataControlProviderManager*
97 DataControlProviderManager::GetInstance(void)
99 return _DataControlProviderManagerImpl::GetInstance();
103 DataControlProviderManager::DataControlProviderManager(void)
104 : __pDataControlProviderManagerImpl(null)
106 __pDataControlProviderManagerImpl = new (std::nothrow) _DataControlProviderManagerImpl;
107 SysTryReturnVoidResult(NID_APP, __pDataControlProviderManagerImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory was insufficient.");
110 DataControlProviderManager::~DataControlProviderManager(void)
112 delete __pDataControlProviderManagerImpl;