fix for using maps_view_handle in maps_plugin
[platform/core/location/maps-plugin-here.git] / inc / here_api.h
1 /*
2  * Copyright (c) 2014 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 #ifndef _LOCATION_HERE_API_H_
17 #define _LOCATION_HERE_API_H_
18
19 #include <maps_plugin.h>
20 #include <maps_view.h>
21
22 int HerePluginInit(maps_plugin_h *hPlugin, const char *module = NULL);
23
24 int HerePluginShutdown(maps_plugin_h hPlugin);
25
26 int HerePluginSetProviderKey(const char* szKey);
27
28 int HerePluginGetProviderKey(char** szKey);
29
30 int HerePluginSetPreference(maps_preference_h hPref);
31
32 int HerePluginGetPreference(maps_preference_h *hPref);
33
34 int HerePluginGeocode(const char* szAddr,
35         maps_item_hashtable_h hPref, maps_service_geocode_cb pCbFunc,
36         void *pUserData, int *nReqId);
37
38 int HerePluginGeocodeByStructuredAddress(const maps_address_h hAddr,
39         maps_item_hashtable_h hPref, maps_service_geocode_cb pCbFunc,
40         void *pUserData, int *nReqId);
41
42 int HerePluginGeocodeInsideArea(const char* szAddr, maps_area_h hArea,
43         maps_item_hashtable_h hPref, maps_service_geocode_cb pCbFunc,
44         void *pUserData, int *nReqId);
45
46 int HerePluginReverseGeocode(double dLatitude, double dLongitude,
47         maps_item_hashtable_h hPref, maps_service_reverse_geocode_cb pCbFunc,
48         void *pUserData, int *nReqId);
49
50 int HerePluginMultiReverseGeocode(const maps_coordinates_list_h hGeocodeList,
51         maps_item_hashtable_h hPref, maps_service_multi_reverse_geocode_cb pCbFunc,
52         void *pUserData, int *nReqId);
53
54 int HerePluginSearchPlace(maps_coordinates_h hPos, int nDistance,
55         maps_item_hashtable_h hPref, maps_place_filter_h hFilter, maps_service_search_place_cb pCbFunc,
56         void * pUserData, int *nReqId);
57
58 int HerePluginSearchPlaceByArea(maps_area_h hArea,
59         maps_item_hashtable_h hPref, maps_place_filter_h hFilter, maps_service_search_place_cb pCbFunc,
60         void * pUserData, int *nReqId);
61
62 int HerePluginSearchPlaceByAddress(const char* szAddr, maps_area_h hArea,
63         maps_item_hashtable_h hPref, maps_place_filter_h hFilter, maps_service_search_place_cb pCbFunc,
64         void * pUserData, int *nReqId);
65
66 int HerePluginSearchPlaceList(maps_area_h hArea, maps_item_hashtable_h hPref,
67         maps_place_filter_h hFilter, maps_service_search_place_list_cb pCbFunc, void * pUserData, int *nReqId);
68
69 int HerePluginSearchPlaceDetails(const char* szUrl,
70         maps_service_get_place_details_cb pCbFunc, void * pUserData, int *nReqId);
71
72 int HerePluginSearchRoute(maps_coordinates_h hOrigin, maps_coordinates_h hDestination,
73         maps_item_hashtable_h hPref, maps_service_search_route_cb pCbFunc,
74         void *pUserData, int *nReqId);
75
76 int HerePluginSearchRouteWaypoints(const maps_coordinates_h* hWaypointList, int nWaypointNum,
77         maps_item_hashtable_h hPref, maps_service_search_route_cb pCbFunc,
78         void* pUserData, int *nReqId);
79
80 int HerePluginCancelRequest(int nReqId);
81
82 /* Mapping API */
83
84 int HerePluginCreateMapView(maps_view_h hView, maps_plugin_map_view_ready_cb pCbFunc);
85
86 int HerePluginDestroyMapView(maps_view_h hView);
87
88 int HerePluginRenderMap(maps_view_h hView, const maps_coordinates_h mapsCoord, const double dZoom, const double dAngle,
89         maps_plugin_render_map_cb pCbFunc, void* pUserData, int* nReqId);
90
91 int HerePluginRenderMapArea(maps_view_h hView, const maps_area_h hArea, const double dZoom, const double dAngle,
92         maps_plugin_render_map_cb pCbFunc, void* pUserData, int* nReqId);
93
94 int HerePluginMoveCenter(maps_view_h hView, const int delta_x, const int delta_y,
95         maps_plugin_render_map_cb pCbFunc, void* pUserData, int* nReqId);
96
97 int HerePluginSetScalebar(maps_view_h hView, bool enable);
98
99 int HerePluginGetScalebar(maps_view_h hView, bool *enabled);
100
101 int HerePluginDrawMap(Evas* pCanvas, const int x, const int y,
102         const int nWidth, const int nHeight);
103
104 int HerePluginGetCenter(maps_view_h hView, maps_coordinates_h *center);
105
106 int HerePluginScreenToGeography(maps_view_h hView, const int x, const int y, maps_coordinates_h *mapsCoord);
107
108 int HerePluginGeographyToScreen(maps_view_h hView, const maps_coordinates_h mapsCoord, int *x, int *y);
109
110 int HerePluginGetMinZoomLevel(maps_view_h hView, int *nMinZoomLevel);
111
112 int HerePluginGetMaxZoomLevel(maps_view_h hView, int *nMaxZoomLevel);
113
114 int HerePluginOnViewObject(maps_view_h hView, const maps_view_object_h object, const maps_view_object_operation_e operation);
115
116 #endif //_LOCATION_HERE_API_H_