upload tizen1.0 source
[framework/web/wrt-plugins-tizen.git] / src / standards / Tizen / LBS / LBSAce.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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 #include <Commons/FunctionDefinition.h>
18 #include <Commons/FunctionDeclaration.h>
19 #include <iostream>
20 #include <vector>
21 #include "LBSAce.h"
22
23 #define FEATURE_POI_ALL "http://tizen.org/api/lbs.poi"
24 #define FEATURE_POI_READ "http://tizen.org/api/lbs.poi.read"
25 #define FEATURE_POI_WRITE "http://tizen.org/api/lbs.poi.write"
26 #define FEATURE_ROTUE "http://tizen.org/api/lbs.route"
27 #define FEATURE_MAP "http://tizen.org/api/lbs.map"
28 #define FEATURE_GEOCODER "http://tizen.org/api/lbs.geocoder"
29
30 using namespace WrtDeviceApis::Commons;
31
32 namespace TizenApis {
33 namespace Tizen1_0 {
34 namespace LBS {
35
36 static AceFunction __create_lbs_service_provider_function();
37
38 static AceFunction lbs_service_provider_function = __create_lbs_service_provider_function();
39
40 static AceFunction __create_lbs_service_provider_function(){
41         AceFeature lbs_feature_poi_all(FEATURE_POI_ALL);
42         AceFeature lbs_feature_poi_read(FEATURE_POI_READ);
43         AceFeature lbs_feature_poi_write(FEATURE_POI_WRITE);
44         AceFeature lbs_feature_route(FEATURE_ROTUE);
45         AceFeature lbs_feature_map(FEATURE_MAP);
46         AceFeature lbs_feature_geocoder(FEATURE_GEOCODER);
47         AceDeviceCaps empty_device_caps;
48         AceFeatures executable_feature_list;
49         executable_feature_list.push_back(lbs_feature_poi_all);
50         executable_feature_list.push_back(lbs_feature_poi_read);
51         executable_feature_list.push_back(lbs_feature_poi_write);
52         executable_feature_list.push_back(lbs_feature_route);
53         executable_feature_list.push_back(lbs_feature_map);
54         executable_feature_list.push_back(lbs_feature_geocoder);        
55         
56         return {LBS_FUNCTION_CATEGORY_SERVICE_PROVIDER , executable_feature_list, empty_device_caps };
57 }
58
59 AceFunction getLBSFunctionData(const std::string & functionId){
60         if( functionId == LBS_FUNCTION_CATEGORY_SERVICE_PROVIDER ){
61                 return lbs_service_provider_function; 
62         }
63         return AceFunction();
64 }
65         
66 } //LBS
67 } // Tizen1_0
68 } //TizenApis
69