2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2008 Navit Team
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
22 * @brief Contains exported code for route.c
24 * This file contains code that works together with route.c and that is exported to
31 struct route_crossing {
36 struct route_crossings {
38 struct route_crossing crossing[0];
42 * @brief Information about a street
44 * This contains information about a certain street
47 struct item item; /**< The map item for this street */
48 int count; /**< Number of coordinates this street has */
50 struct coord c[0]; /**< Pointer to the coordinates of this street */
53 #define route_item_first type_street_0
54 #define route_item_last type_ferry
65 struct route_info_handle;
66 struct route_path_coord_handle;
67 struct route_path_handle;
68 struct route_path_segment;
71 struct transformation;
72 struct route *route_new(struct attr **attrs);
73 void route_set_mapset(struct route *this, struct mapset *ms);
74 struct mapset *route_get_mapset(struct route *this);
75 struct route_info *route_get_pos(struct route *this);
76 struct route_info *route_get_dst(struct route *this);
77 int *route_get_speedlist(struct route *this);
78 int route_get_path_set(struct route *this);
79 int route_set_speed(struct route *this, enum item_type type, int value);
80 int route_contains(struct route *this, struct item *item);
81 void route_set_position(struct route *this, struct pcoord *pos);
82 void route_set_position_from_tracking(struct route *this, struct tracking *tracking);
83 struct map_selection *route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs);
84 void route_set_destination(struct route *this, struct pcoord *dst);
85 struct route_path_handle *route_path_open(struct route *this);
86 struct route_path_segment *route_path_get_segment(struct route_path_handle *h);
87 struct coord *route_path_segment_get_start(struct route_path_segment *s);
88 struct coord *route_path_segment_get_end(struct route_path_segment *s);
89 struct item *route_path_segment_get_item(struct route_path_segment *s);
90 int route_path_segment_get_length(struct route_path_segment *s);
91 int route_path_segment_get_time(struct route_path_segment *s);
92 void route_path_close(struct route_path_handle *h);
93 struct route_path_coord_handle *route_path_coord_open(struct route *this);
94 struct coord *route_path_coord_get(struct route_path_coord_handle *h);
95 void route_path_coord_close(struct route_path_coord_handle *h);
96 int route_time(int *speedlist, struct item *item, int len);
97 int route_info_length(struct route_info *pos, struct route_info *dst, int dir);
98 struct street_data *street_get_data(struct item *item);
99 struct street_data *street_data_dup(struct street_data *orig);
100 void street_data_free(struct street_data *sd);
101 void route_info_free(struct route_info *inf);
102 struct street_data *route_info_street(struct route_info *rinf);
103 struct coord *route_info_point(struct route_info *rinf, int point);
104 struct route_info_handle *route_info_open(struct route_info *start, struct route_info *end, int dir);
105 struct coord *route_info_get(struct route_info_handle *h);
106 void route_info_close(struct route_info_handle *h);
107 void route_draw(struct route *this, struct transformation *t, struct displaylist *dsp);
108 struct map *route_get_map(struct route *route);
109 struct map *route_get_graph_map(struct route *route);
110 void route_toggle_routegraph_display(struct route *route);
111 void route_set_projection(struct route *this_, enum projection pro);
112 void route_init(void);
113 /* end of prototypes */