]> err.no Git - mapper/blob - src/route.h
Combine extra functions from old track.* and route.*
[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 #include "path.h"
22 #include "position.h"
23
24 /** The current route. */
25 Path *_route;
26
27 /** The singleton auto-route-download data. */
28 AutoRouteDownloadData _autoroute_data;
29
30 gboolean route_open_file(Path *route);
31 gboolean route_save(Path *route);
32 gboolean route_download(Path *route, gchar *to);
33 gboolean route_clear(Path *route);
34
35 void route_check_waypoint_announce(Path *route, GpsData *gps);
36
37 gboolean route_auto_route_dl_idle_cb();
38 void route_cancel_autoroute(Path *route, gboolean temporary);
39
40 void route_find_nearest_point(Path *route);
41 WayPoint *route_find_nearest_waypoint(Path *route, guint unitx, guint unity);
42
43 gboolean route_update_nears(Path *route, gboolean quick);
44
45 gboolean route_set_destination_from_last(Path *route, Position *pos);
46
47 gboolean route_show_distance_to(Path *route, Point *point);
48 void route_show_distance_to_last(Path *route);
49 void route_show_distance_to_next(Path *route);
50
51 #endif