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 FApp_DataControlProviderManagerImpl.h
19 * @brief This is the header file for the %_DataControlProviderManagerImpl class.
21 * This header file contains the declarations of the %_DataControlProviderManagerImpl class.
24 #ifndef _FAPP_INTERNAL_DATACONTROL_PROVIDERMANAGER_IMPL_H_
25 #define _FAPP_INTERNAL_DATACONTROL_PROVIDERMANAGER_IMPL_H_
27 #include <FOspConfig.h>
28 #include <FBaseObject.h>
29 #include <FBaseDataType.h>
30 #include <FBaseColIList.h>
31 #include <FBaseColLinkedList.h>
33 #include "FApp_AppArg.h"
35 namespace Tizen { namespace Base
40 namespace Tizen { namespace Io
42 class DataControlResultSet;
45 namespace Tizen { namespace App
48 class DataControlProviderManager;
51 * @class _DataControlProviderManagerImpl
52 * @brief This class manages all the data controls.
55 * The %_DataControlProviderManagerImpl class manages all the data controls.
57 class _DataControlProviderManagerImpl
58 : public Tizen::Base::Object
62 result SetSqlDataControlProviderEventListener(ISqlDataControlProviderEventListener* pListener);
64 result SetMapDataControlProviderEventListener(IMapDataControlProviderEventListener* pListener);
66 result SendSqlDataControlSelectResult(RequestId reqId, Tizen::Io::IDbEnumerator* pDbEnum);
68 result SendSqlDataControlInsertResult(RequestId reqId, long long insertRowId);
70 result SendSqlDataControlUpdateDeleteResult(RequestId reqId);
72 result SendMapDataControlResult(RequestId reqId, Tizen::Base::Collection::IList* pResultValueList);
74 result SendDataControlError(RequestId reqId, const Tizen::Base::String& errorMsg);
76 result AllowAccess(const AppId& appId);
79 * Retrieves the data control provider manager instance.
82 * @return A pointer to the DataControlProviderManager instance if it succeeded.
85 static DataControlProviderManager* GetInstance(void);
89 * This is the default constructor for this class.
93 _DataControlProviderManagerImpl(void);
96 * This is the destructor for this class.
100 virtual ~_DataControlProviderManagerImpl(void);
103 * This is the default copy constructor for this class.
105 _DataControlProviderManagerImpl(const _DataControlProviderManagerImpl& source);
108 * This is the assignment operator for this class.
110 _DataControlProviderManagerImpl& operator =(const _DataControlProviderManagerImpl& source);
112 void Cache(const AppId& appId);
114 bool IsCached(const AppId& appId);
116 static result SendDataControlResult(RequestId reqId, _DataControlRequestType apiType,
117 Tizen::Io::IDbEnumerator* pDbEnum, Tizen::Base::Collection::IList* pResultValueList, long long insertRowId,
118 bool providerResult, const Tizen::Base::String* pErrorMsg);
121 Tizen::Base::Collection::LinkedList* __pProviderList;
123 friend class DataControlProviderManager;
128 #endif // _FAPP_INTERNAL_DATACONTROL_PROVIDERMANAGER_IMPL_H_