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