]> err.no Git - mapper/blobdiff - src/route.h
Remove old map sources
[mapper] / src / route.h
index ee4eae4257515e6eade33fb8d066e235800e1108..b45031c05854dd730ab91fcea2c099f55a903eb7 100644 (file)
 
 #include "utils.h"
 #include "mapper-types.h"
+#include "path.h"
+#include "position.h"
 
-/** The current track and route. */
-Path _track;
-Path _route;
+/** The current route. */
+Path *_route;
 
-/** Data for tracking waypoints for the purpose of announcement. */
+/** The singleton auto-route-download data. */
+AutoRouteDownloadData _autoroute_data;
 
-/* _near_point is the route point to which we are closest. */
-Point *_near_point;
-guint64 _near_point_dist_squared;
+gboolean route_open_file(Path *route);
+gboolean route_save(Path *route);
+gboolean route_download(Path *route, gchar *to);
+gboolean route_clear(Path *route);
 
-/* _next_way is what we currently interpret to be the next waypoint. */
-WayPoint *_next_way;
-guint64 _next_way_dist_squared;
-gchar *_last_spoken_phrase;
+void route_check_waypoint_announce(Path *route, GpsData *gps);
+void route_autoroute_check(Path *route);
 
-/* _next_wpt is the route point immediately following _next_way. */
-Point *_next_wpt;
-guint64 _next_wpt_dist_squared;
+gboolean route_auto_route_dl_idle_cb();
+void route_cancel_autoroute(Path *route, gboolean temporary);
 
-/** The singleton auto-route-download data. */
-AutoRouteDownloadData _autoroute_data;
+void route_find_nearest_point(Path *route);
+WayPoint *route_find_nearest_waypoint(Path *route, guint unitx, guint unity);
+
+gboolean route_update_nears(Path *route, gboolean quick);
+
+gboolean route_set_destination_from_last(Path *route, Position *pos);
 
-void route_init(void);
-void route_deinit(void);
-
-gboolean route_open_file(void);
-gboolean route_save(void);
-void route_clear(void);
-gboolean auto_route_dl_idle();
-gboolean route_download(gchar * to);
-WayPoint *find_nearest_waypoint(guint unitx, guint unity);
-gboolean route_update_nears(gboolean quick);
-void route_show_distance_to_last();
-void route_show_distance_to_next();
-gboolean route_show_distance_to(Point * point);
+gboolean route_show_distance_to(Path *route, Point *point);
+void route_show_distance_to_last(Path *route);
+void route_show_distance_to_next(Path *route);
 
 #endif