3 #ifndef _MAPPER_ROUTE_H
4 #define _MAPPER_ROUTE_H
15 #include <glib/gstdio.h>
17 #include <dbus/dbus-glib.h>
20 #include "mapper-types.h"
22 /** The current track and route. */
26 /** Data for tracking waypoints for the purpose of announcement. */
28 /* _near_point is the route point to which we are closest. */
30 guint64 _near_point_dist_squared;
32 /* _next_way is what we currently interpret to be the next waypoint. */
34 guint64 _next_way_dist_squared;
35 gchar *_last_spoken_phrase;
37 /* _next_wpt is the route point immediately following _next_way. */
39 guint64 _next_wpt_dist_squared;
41 /** The singleton auto-route-download data. */
42 AutoRouteDownloadData _autoroute_data;
44 void route_init(void);
45 void route_deinit(void);
47 gboolean route_open_file(void);
48 gboolean route_save(void);
49 void route_clear(void);
50 gboolean auto_route_dl_idle();
51 gboolean route_download(gchar * to);
52 WayPoint *find_nearest_waypoint(guint unitx, guint unity);
53 gboolean route_update_nears(gboolean quick);
54 void route_show_distance_to_last();
55 void route_show_distance_to_next();
56 gboolean route_show_distance_to(Point * point);