Fix:Core:Renamed src to navit for cleanup of includes
[navit-package] / navit / route.h
1 #ifndef NAVIT_ROUTE_H
2 #define NAVIT_ROUTE_H
3
4 struct route_crossing {
5         long segid;
6         int dir;
7 };
8
9 struct route_crossings {
10         int count;
11         struct route_crossing crossing[0];
12 };
13
14 struct street_data {
15         struct item item;
16         int count;
17         int flags;
18         struct coord c[0];
19 };
20
21 #define route_item_first type_street_0
22 #define route_item_last type_ferry
23
24 /* prototypes */
25 enum item_type;
26 struct coord;
27 struct displaylist;
28 struct item;
29 struct map_selection;
30 struct mapset;
31 struct route;
32 struct route_info;
33 struct route_info_handle;
34 struct route_path_coord_handle;
35 struct route_path_handle;
36 struct route_path_segment;
37 struct street_data;
38 struct tracking;
39 struct transformation;
40 struct route *route_new(struct attr **attrs);
41 void route_set_mapset(struct route *this, struct mapset *ms);
42 struct mapset *route_get_mapset(struct route *this);
43 struct route_info *route_get_pos(struct route *this);
44 struct route_info *route_get_dst(struct route *this);
45 int *route_get_speedlist(struct route *this);
46 int route_get_path_set(struct route *this);
47 int route_set_speed(struct route *this, enum item_type type, int value);
48 int route_contains(struct route *this, struct item *item);
49 void route_set_position(struct route *this, struct pcoord *pos);
50 void route_set_position_from_tracking(struct route *this, struct tracking *tracking);
51 struct map_selection *route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs);
52 void route_set_destination(struct route *this, struct pcoord *dst);
53 struct route_path_handle *route_path_open(struct route *this);
54 struct route_path_segment *route_path_get_segment(struct route_path_handle *h);
55 struct coord *route_path_segment_get_start(struct route_path_segment *s);
56 struct coord *route_path_segment_get_end(struct route_path_segment *s);
57 struct item *route_path_segment_get_item(struct route_path_segment *s);
58 int route_path_segment_get_length(struct route_path_segment *s);
59 int route_path_segment_get_time(struct route_path_segment *s);
60 void route_path_close(struct route_path_handle *h);
61 struct route_path_coord_handle *route_path_coord_open(struct route *this);
62 struct coord *route_path_coord_get(struct route_path_coord_handle *h);
63 void route_path_coord_close(struct route_path_coord_handle *h);
64 int route_time(int *speedlist, struct item *item, int len);
65 int route_info_length(struct route_info *pos, struct route_info *dst, int dir);
66 struct street_data *street_get_data(struct item *item);
67 struct street_data *street_data_dup(struct street_data *orig);
68 void street_data_free(struct street_data *sd);
69 void route_info_free(struct route_info *inf);
70 struct street_data *route_info_street(struct route_info *rinf);
71 struct coord *route_info_point(struct route_info *rinf, int point);
72 struct route_info_handle *route_info_open(struct route_info *start, struct route_info *end, int dir);
73 struct coord *route_info_get(struct route_info_handle *h);
74 void route_info_close(struct route_info_handle *h);
75 void route_draw(struct route *this, struct transformation *t, struct displaylist *dsp);
76 struct map *route_get_map(struct route *route);
77 struct map *route_get_graph_map(struct route *route);
78 void route_toggle_routegraph_display(struct route *route);
79 void route_set_projection(struct route *this_, enum projection pro);
80 void route_init(void);
81 /* end of prototypes */
82
83 #endif
84