Add event for update application
[platform/framework/native/appfw.git] / src / app / FAppMapDataControl.cpp
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        FAppMapDataControl.cpp
19  * @brief       This is the implementation for the %MapDataControl class.
20  */
21
22 #include <FAppMapDataControl.h>
23
24 #include <FBaseSysLog.h>
25 #include <FBase_NativeError.h>
26
27 #include "FApp_MapDataControlImpl.h"
28
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Collection;
31 using namespace Tizen::App;
32
33 namespace Tizen { namespace App {
34
35 MapDataControl::MapDataControl(void)
36         : __pMapDataControlImpl(null)
37 {
38         __pMapDataControlImpl = new _MapDataControlImpl;
39 }
40
41 MapDataControl::~MapDataControl(void)
42 {
43         delete __pMapDataControlImpl;
44 }
45
46 result
47 MapDataControl::GetValue(const String& dataId, const String& key,
48                 RequestId& reqId, int pageNo, int countPerPage)
49 {
50         SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
51                         "This instance has not been properly constructed yet.");
52
53         return __pMapDataControlImpl->GetValue(dataId, key, reqId, pageNo, countPerPage);
54 }
55
56 result
57 MapDataControl::AddValue(const String& dataId, const String& key,
58                 const String& value, RequestId& reqId)
59 {
60         SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
61                         "This instance has not been properly constructed yet.");
62
63         return __pMapDataControlImpl->AddValue(dataId, key, value, reqId);
64 }
65
66 result
67 MapDataControl::SetValue(const String& dataId, const String& key,
68                 const String& oldValue, const String& newValue, RequestId& reqId)
69 {
70         SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
71                         "This instance has not been properly constructed yet.");
72
73         return __pMapDataControlImpl->SetValue(dataId, key, oldValue, newValue, reqId);
74 }
75
76 result
77 MapDataControl::RemoveValue(const String& dataId, const String& key,
78                 const String& value, RequestId& reqId)
79 {
80         SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
81                         "This instance has not been properly constructed yet.");
82
83         return __pMapDataControlImpl->RemoveValue(dataId, key, value, reqId);
84 }
85
86 result
87 MapDataControl::SetMapDataControlResponseListener(IMapDataControlResponseListener* pListener)
88 {
89         SysTryReturnResult(NID_APP, __pMapDataControlImpl, E_INVALID_STATE,
90                         "This instance has not been properly constructed yet.");
91
92         return __pMapDataControlImpl->SetMapDataControlResponseListener(pListener);
93 }
94
95 }} // Tizen::App
96