4a85917ab62e7850f542c4c67beb10c8d765772f
[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_LBS "http://tizen.org/api/lbs"
24 #define FEATURE_POI_ALL "http://tizen.org/api/lbs.poi"
25 #define FEATURE_POI_READ "http://tizen.org/api/lbs.poi.read"
26 #define FEATURE_POI_WRITE "http://tizen.org/api/lbs.poi.write"
27 #define FEATURE_ROTUE "http://tizen.org/api/lbs.route"
28 #define FEATURE_MAP "http://tizen.org/api/lbs.map"
29 #define FEATURE_GEOCODER "http://tizen.org/api/lbs.geocoder"
30
31 using namespace WrtDeviceApis::Commons;
32
33 namespace TizenApis {
34 namespace Tizen1_0 {
35 namespace LBS {
36
37 static AceFunction __create_lbs_service_provider_function();
38
39 static AceFunction lbs_service_provider_function = __create_lbs_service_provider_function();
40
41 static AceFunction __create_lbs_service_provider_function(){
42         AceFeature lbs_feature_lbs(FEATURE_LBS);
43         AceFeature lbs_feature_poi_all(FEATURE_POI_ALL);
44         AceFeature lbs_feature_poi_read(FEATURE_POI_READ);
45         AceFeature lbs_feature_poi_write(FEATURE_POI_WRITE);
46         AceFeature lbs_feature_route(FEATURE_ROTUE);
47         AceFeature lbs_feature_map(FEATURE_MAP);
48         AceFeature lbs_feature_geocoder(FEATURE_GEOCODER);
49         AceDeviceCaps empty_device_caps;
50         AceFeatures executable_feature_list;
51         executable_feature_list.push_back(lbs_feature_lbs);
52         executable_feature_list.push_back(lbs_feature_poi_all);
53         executable_feature_list.push_back(lbs_feature_poi_read);
54         executable_feature_list.push_back(lbs_feature_poi_write);
55         executable_feature_list.push_back(lbs_feature_route);
56         executable_feature_list.push_back(lbs_feature_map);
57         executable_feature_list.push_back(lbs_feature_geocoder);        
58         
59         return {LBS_FUNCTION_CATEGORY_SERVICE_PROVIDER , executable_feature_list, empty_device_caps };
60 }
61
62 AceFunction getLBSFunctionData(const std::string & functionId){
63         if( functionId == LBS_FUNCTION_CATEGORY_SERVICE_PROVIDER ){
64                 return lbs_service_provider_function; 
65         }
66         return AceFunction();
67 }
68         
69 } //LBS
70 } // Tizen1_0
71 } //TizenApis
72