Alexa Auto SDK  2.3.0
Navigation.h
1 /*
2  * Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef AACE_NAVIGATION_NAVIGATION_H
17 #define AACE_NAVIGATION_NAVIGATION_H
18 
19 #include <string>
20 #include <vector>
21 #include "AACE/Core/PlatformInterface.h"
22 #include "NavigationEngineInterfaces.h"
23 
26 namespace aace {
27 namespace navigation {
28 
33 protected:
34  Navigation() = default;
35 
36 public:
37  using EventName = aace::navigation::NavigationEngineInterface::EventName;
38 
39  using ErrorType = aace::navigation::NavigationEngineInterface::ErrorType;
40 
41  using ErrorCode = aace::navigation::NavigationEngineInterface::ErrorCode;
42 
43  using AlternateRouteType = aace::navigation::NavigationEngineInterface::AlternateRouteType;
44 
45  virtual ~Navigation();
46 
47  enum class ControlDisplay {
48 
49  SHOW_ROUTE_OVERVIEW,
50 
51  SHOW_DIRECTIONS_LIST,
52 
53  ZOOM_IN,
54 
55  ZOOM_OUT,
56 
57  CENTER_MAP_ON_CURRENT_LOCATION,
58 
59  ORIENT_NORTH,
60 
61  SCROLL_NORTH,
62 
63  SCROLL_UP,
64 
65  SCROLL_EAST,
66 
67  SCROLL_RIGHT,
68 
69  SCROLL_SOUTH,
70 
71  SCROLL_DOWN,
72 
73  SCROLL_WEST,
74 
75  SCROLL_LEFT,
76 
77  MUTE_ROUTE_GUIDANCE, // navigation sounds off
78 
79  UNMUTE_ROUTE_GUIDANCE, // navigation sounds on
80  };
81 
82  // user requested road regulation type
83  enum class RoadRegulation { SPEED_LIMIT, CARPOOL_RULES };
84 
85  /*
86  * Notifies the platform implementation to display list of previous waypoints
87  */
88  virtual void showPreviousWaypoints() = 0;
89 
90  /*
91  * Notifies the platform implementation to start navigation to the previous waypoint
92  */
93  virtual void navigateToPreviousWaypoint() = 0;
94 
95  /*
96  * Notifies the platform implementation to show alternative routes
97  *
98  * @param [in] alternateRouteType The type of alternate route requested
99  */
100  virtual void showAlternativeRoutes(AlternateRouteType alternateRouteType) = 0;
101 
102  /*
103  * Notifies the platform implementation to perform user interaction with the onscreen map application
104  * @param [in] controlDisplay the user requested map control
105  */
106  virtual void controlDisplay(ControlDisplay controlDisplay) = 0;
107 
114  virtual bool cancelNavigation() = 0;
115 
198  virtual std::string getNavigationState() = 0;
199 
288  virtual void startNavigation(const std::string& payload) = 0;
289 
326  virtual void announceManeuver(const std::string& payload) = 0;
327 
333  virtual void announceRoadRegulation(RoadRegulation roadRegulation) = 0;
334 
350  void navigationEvent(EventName event);
351 
369  void navigationError(ErrorType type, ErrorCode code, const std::string& description);
370 
397  void showAlternativeRoutesSucceeded(const std::string& payload);
398 
399  void setEngineInterface(std::shared_ptr<NavigationEngineInterface> navigationEngineInterface);
400 
401 private:
402  std::shared_ptr<NavigationEngineInterface> m_navigationEngineInterface;
403 };
404 
405 } // namespace navigation
406 } // namespace aace
407 
408 #endif // AACE_NAVIGATION_NAVIGATION_H
Definition: Navigation.h:32
void navigationEvent(EventName event)
Definition: Navigation.cpp:23
Definition: PlatformInterface.h:29
virtual void announceRoadRegulation(RoadRegulation roadRegulation)=0
virtual void announceManeuver(const std::string &payload)=0
virtual bool cancelNavigation()=0
Definition: AddressBook.h:26
virtual std::string getNavigationState()=0
void showAlternativeRoutesSucceeded(const std::string &payload)
Definition: Navigation.cpp:35
virtual void startNavigation(const std::string &payload)=0
void navigationError(ErrorType type, ErrorCode code, const std::string &description)
Definition: Navigation.cpp:29

Alexa Auto SDK 2.3.0 - Copyright 2017-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0