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 FApp_SqlDataControlImpl.h
20 * @brief This is the header file for the %_SqlDataControlImpl class.
23 #ifndef _FAPP_INTERNAL_SQL_DATA_CONTROL_IMPL_H_
24 #define _FAPP_INTERNAL_SQL_DATA_CONTROL_IMPL_H_
26 #include <app_service.h>
28 #include <FBaseDataType.h>
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31 #include <FBaseRtEvent.h>
33 #include "FApp_AppManagerImpl.h"
35 namespace Tizen { namespace Base
44 namespace Tizen { namespace App
47 class ISqlDataControlResponseListener;
50 class _SqlDataControlImpl
51 : public Tizen::Base::Object
55 virtual ~_SqlDataControlImpl(void);
57 static _SqlDataControlImpl* GetInstance(SqlDataControl& dc);
59 static const _SqlDataControlImpl* GetInstance(const SqlDataControl& dc);
61 result Select(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IList* pColumnList,
62 const Tizen::Base::String* pWhere, const Tizen::Base::String *pOrder, RequestId& reqId,
63 int pageNo = 1, int countPerPage = 20);
65 result Insert(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& insertMap, RequestId& reqId);
67 result Update(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& updateMap,
68 const Tizen::Base::String* pWhere, RequestId& reqId);
70 result Delete(const Tizen::Base::String& dataId, const Tizen::Base::String* pWhere, RequestId& reqId);
72 result SetSqlDataControlResponseListener(ISqlDataControlResponseListener* pListener);
74 static result SqlDataControlCallback(void* data, _AppArg* pArg, _AppArg* pResArg, service_result_e res, int prop);
77 _SqlDataControlImpl(void);
79 static SqlDataControl* CreateSqlDataControl(const Tizen::Base::String& appId, const Tizen::Base::String& providerId,
80 const Tizen::Base::String& access);
82 result StartSqlDataControl(int type, const Tizen::Base::Collection::IList* pDataList, int* pReq);
85 Tizen::Base::String __appId;
86 Tizen::Base::String __providerId;
88 ISqlDataControlResponseListener* __pPreviousListener;
89 Tizen::Base::Runtime::Event* __pSqlDataControlEvent;
91 friend class SqlDataControl;
92 friend class _AppManagerImpl;
95 }; // _SqlDataControlImpl
99 #endif // _FAPP_INTERNAL_SQL_DATA_CONTROL_IMPL_H_