tizen 2.4 release
[framework/location/maps-plugin-here.git] / src / here / here_route.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
17 #ifndef _LOCATION_HERE_ROUTE_H_
18 #define _LOCATION_HERE_ROUTE_H_
19
20 //plug-in header
21 #include "here_manager.h"
22
23 //maps-service header
24 #include <maps_route_plugin.h>
25 #include <maps_route_segment_plugin.h>
26 #include <maps_route_maneuver_plugin.h>
27
28 //map engine header
29 #include <routes/GeoRouteQuery.h>
30 #include <routes/GeoRouteQueryListener.h>
31 #include <routes/GeoRouteReply.h>
32
33 HERE_PLUGIN_BEGIN_NAMESPACE
34
35 using namespace HERE_MAPS_NAMESPACE_PREFIX;
36
37 class HereRoute
38 : public HereBase
39 , public GeoRouteQueryListener
40 {
41 public:
42         /**
43          *This is the default constructor for Route.
44          */
45
46         HereRoute(void *pCbFunc, void *pUserData, int nReqId);
47
48         /**
49          *This is the default destructor for Route.
50          */
51
52         ~HereRoute();
53
54         here_error_e PrepareQuery();
55         here_error_e PrepareWaypoint(maps_coordinates_h hOrigin, maps_coordinates_h hDestination);
56         here_error_e PrepareWaypoint(const maps_coordinates_h* hWaypointList, int nWaypointNum);
57         here_error_e PreparePreference(maps_preference_h hPref);
58
59         here_error_e StartRoute(void);
60
61         virtual void OnRouteReply(const GeoRouteReply& Reply);
62
63 private:
64         maps_error_e ProcessSegments(maps_route_h mapsRoute, const RouteSegmentList& hereSegmList);
65         maps_error_e ProcessManeuver(maps_route_segment_h mapsSegm, const ManeuverList& hereManeList);
66
67         GeoRouteQuery* m_pQuery;
68 };
69
70 HERE_PLUGIN_END_NAMESPACE
71
72 #endif //_LOCATION_HERE_ROUTE_H_