Update change log and spec for wrt-plugins-tizen_0.4.66
[framework/web/wrt-plugins-tizen.git] / src / DataControl / DataControlCallback.h
1 //
2 // Tizen Web Device API
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 #ifndef TIZENAPIS_TIZEN_DATACONTROL_CALLBACK_H_
20 #define TIZENAPIS_TIZEN_DATACONTROL_CALLBACK_H_
21
22 #include <map>
23 #include <vector>
24 #include <string>
25 #include <app.h>
26 #include <appsvc/appsvc.h>
27
28 namespace DeviceAPI {
29 namespace DataControl {
30
31 // utils for common usage
32 std::vector<std::string> getDataArrayFromBundle(bundle *b, std::string key);
33 std::string getProviderApplicationId(const std::string type, const std::string& provId);
34 std::string getCurrentApplicationId();
35 std::string getProviderPkgId(const std::string& appId);
36 void SendAppControlLaunchToProvider(void* event, unsigned short& currentJob);
37 void handleRemainingPendingEvent();
38 std::string convertIntToString(unsigned int data);
39 void addArrayToBundle(bundle* passData, std::vector<std::string>& array);
40 std::string generateFileName(unsigned int reqId, const std::string currentAppId);
41
42 void dataControlCommonCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
43
44 // callbacks for sqldatacontrol
45 void sqldataControlSelectCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
46 void sqldataControlInsertCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
47 void sqldataControlDeleteCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
48 void sqldataControlUpdateCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
49 // callbacks for mapped datacontrol
50 void MappedDataControlGetValueCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
51 void MappedDataControlAddValueCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
52 void MappedDataControlRemoveValueCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
53 void MappedDataControlUpdateValueCallback(bundle* b, int request_code, appsvc_result_val res, void* data);
54
55
56
57 }
58 }
59
60 #endif
61