]> err.no Git - mapper/blob - src/route.h
Include settings.h so the banner macro hildon version works.
[mapper] / src / route.h
1 #include "config.h"
2
3 #ifndef _MAPPER_ROUTE_H
4 #define _MAPPER_ROUTE_H
5
6 #include <unistd.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <strings.h>
10 #include <stddef.h>
11 #include <locale.h>
12 #include <math.h>
13 #include <errno.h>
14 #include <sys/wait.h>
15 #include <glib/gstdio.h>
16 #include <gtk/gtk.h>
17 #include <dbus/dbus-glib.h>
18
19 #include "utils.h"
20 #include "mapper-types.h"
21
22 /** The current track and route. */
23 Path _track;
24 Path _route;
25
26 /** Data for tracking waypoints for the purpose of announcement. */
27
28 /* _near_point is the route point to which we are closest. */
29 Point *_near_point;
30 guint64 _near_point_dist_squared;
31
32 /* _next_way is what we currently interpret to be the next waypoint. */
33 WayPoint *_next_way;
34 guint64 _next_way_dist_squared;
35 gchar *_last_spoken_phrase;
36
37 /* _next_wpt is the route point immediately following _next_way. */
38 Point *_next_wpt;
39 guint64 _next_wpt_dist_squared;
40
41 /** The singleton auto-route-download data. */
42 AutoRouteDownloadData _autoroute_data;
43
44 void route_init(void);
45 void route_deinit(void);
46
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);
57
58 #endif