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_SqlDataControlImpl.h
19 * @brief This is the header file for the %_SqlDataControlImpl class.
22 #ifndef _FAPP_INTERNAL_SQL_DATA_CONTROL_IMPL_H_
23 #define _FAPP_INTERNAL_SQL_DATA_CONTROL_IMPL_H_
25 #include <app_service.h>
27 #include <FBaseDataType.h>
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FBaseRtEvent.h>
32 #include "FApp_AppManagerImpl.h"
34 namespace Tizen { namespace Base
43 namespace Tizen { namespace App
46 class ISqlDataControlResponseListener;
49 class _SqlDataControlImpl
50 : public Tizen::Base::Object
54 virtual ~_SqlDataControlImpl(void);
56 static _SqlDataControlImpl* GetInstance(SqlDataControl& dc);
58 static const _SqlDataControlImpl* GetInstance(const SqlDataControl& dc);
60 result Select(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IList* pColumnList,
61 const Tizen::Base::String* pWhere, const Tizen::Base::String *pOrder, RequestId& reqId,
62 int pageNo = 1, int countPerPage = 20);
64 result Insert(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& insertMap, RequestId& reqId);
66 result Update(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& updateMap,
67 const Tizen::Base::String* pWhere, RequestId& reqId);
69 result Delete(const Tizen::Base::String& dataId, const Tizen::Base::String* pWhere, RequestId& reqId);
71 result SetSqlDataControlResponseListener(ISqlDataControlResponseListener* pListener);
73 static result SqlDataControlCallback(void* data, _AppArg* pArg, _AppArg* pResArg, service_result_e res, int prop, int option);
76 _SqlDataControlImpl(void);
78 static SqlDataControl* CreateSqlDataControl(const Tizen::Base::String& appId, const Tizen::Base::String& providerId,
79 const Tizen::Base::String& access);
81 result StartSqlDataControl(int type, const Tizen::Base::Collection::IList* pDataList, int* pReq);
84 Tizen::Base::String __appId;
85 Tizen::Base::String __providerId;
87 ISqlDataControlResponseListener* __pPreviousListener;
88 Tizen::Base::Runtime::Event* __pSqlDataControlEvent;
90 friend class SqlDataControl;
91 friend class _AppManagerImpl;
94 }; // _SqlDataControlImpl
98 #endif // _FAPP_INTERNAL_SQL_DATA_CONTROL_IMPL_H_