6b1bf3c581f21b133469a1a3c91891878e4ce55e
[platform/framework/native/appfw.git] / src / app / FApp_MapDataControlImpl.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16
17 /**
18  * @file        FApp_MapDataControlImpl.h
19  * @brief       This is the header file for the %_MapDataControlImpl class.
20  */
21
22 #ifndef _FAPP_INTERNAL_MAP_DATA_CONTROL_IMPL_H_
23 #define _FAPP_INTERNAL_MAP_DATA_CONTROL_IMPL_H_
24
25 #include <app_service.h>
26
27 #include <FOspConfig.h>
28 #include <FBaseDataType.h>
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31 #include <FBaseRtEvent.h>
32
33 #include "FApp_AppManagerImpl.h"
34
35 namespace Tizen { namespace Base
36 {
37 namespace Collection
38 {
39 class IList;
40 }
41 }}
42
43 namespace Tizen { namespace App {
44
45 class IMapDataControlResponseListener;
46 class _AppArg;
47
48 class _MapDataControlImpl
49         : public Tizen::Base::Object
50 {
51
52 public:
53         virtual ~_MapDataControlImpl(void);
54
55         static _MapDataControlImpl* GetInstance(MapDataControl& dc);
56
57         static const _MapDataControlImpl* GetInstance(const MapDataControl& dc);
58
59         result AddValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key,
60                         const Tizen::Base::String& value, RequestId& reqId);
61
62         result GetValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key,
63                         RequestId& reqId, int pageNo = 1, int countPerPage = 20);
64
65         result SetValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key,
66                         const Tizen::Base::String& oldValue, const Tizen::Base::String& newValue, RequestId& reqId);
67
68         result RemoveValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key,
69                         const Tizen::Base::String& value, RequestId& reqId);
70
71         result SetMapDataControlResponseListener(IMapDataControlResponseListener* pListener);
72
73         static result MapDataControlCallback(void* data, _AppArg* pArg, _AppArg* pResArg, service_result_e res, int prop, int option);
74
75 private:
76         _MapDataControlImpl(void);
77
78         static MapDataControl* CreateMapDataControl(const AppId& appId, const Tizen::Base::String& providerId,
79             const Tizen::Base::String& access);
80
81         result StartMapDataControl(int type, const Tizen::Base::Collection::IList* pDataList, int* pReq);
82
83         Tizen::Base::String __appId;
84         Tizen::Base::String __providerId;
85         int __access;
86         IMapDataControlResponseListener* __pPreviousListener;
87         Tizen::Base::Runtime::Event* __pMapDataControlEvent;
88
89         friend class MapDataControl;
90         friend class _AppManagerImpl;
91         friend class _AppArg;
92
93 }; // _MapDataControlImpl
94
95 }} // Tizen::App
96
97 #endif // _FAPP_INTERNAL_MAP_DATA_CONTROL_IMPL_H_
98