Navit SVN

/work/compile/navit/src/navit/route.h

Go to the documentation of this file.
00001 
00028 #ifndef NAVIT_ROUTE_H
00029 #define NAVIT_ROUTE_H
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 enum route_status {
00035         route_status_no_destination=0,
00036         route_status_destination_set=1,
00037         route_status_not_found=1|2,
00038         route_status_building_path=1|4,
00039         route_status_building_graph=1|4|8,
00040         route_status_path_done_new=1|16,
00041         route_status_path_done_incremental=1|32,
00042 };
00043 
00044 struct route_crossing {
00045         long segid;
00046         int dir;
00047 };
00048 
00049 struct route_crossings {
00050         int count;
00051         struct route_crossing crossing[0];
00052 };
00053 
00059 struct street_data {
00060         struct item item;       
00061         int count;                      
00062         int flags;
00063         int maxspeed;           
00064         struct coord c[0];      
00066 };
00067 
00068 /* prototypes */
00069 enum attr_type;
00070 enum projection;
00071 struct attr;
00072 struct attr_iter;
00073 struct coord;
00074 struct item;
00075 struct map;
00076 struct map_selection;
00077 struct mapset;
00078 struct pcoord;
00079 struct route;
00080 struct route_info;
00081 struct street_data;
00082 struct tracking;
00083 struct vehicleprofile;
00084 struct route *route_new(struct attr *parent, struct attr **attrs);
00085 void route_set_mapset(struct route *this_, struct mapset *ms);
00086 void route_set_profile(struct route *this_, struct vehicleprofile *prof);
00087 struct mapset *route_get_mapset(struct route *this_);
00088 struct route_info *route_get_pos(struct route *this_);
00089 struct route_info *route_get_dst(struct route *this_);
00090 int route_get_path_set(struct route *this_);
00091 int route_contains(struct route *this_, struct item *item);
00092 int route_destination_reached(struct route *this_);
00093 void route_set_position(struct route *this_, struct pcoord *pos);
00094 void route_set_position_from_tracking(struct route *this_, struct tracking *tracking, enum projection pro);
00095 struct map_selection *route_rect(int order, struct coord *c1, struct coord *c2, int rel, int abs);
00096 void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async);
00097 int route_get_destinations(struct route *this_, struct pcoord *pc, int count);
00098 int route_get_destination_count(struct route *this_);
00099 void route_set_destination(struct route *this_, struct pcoord *dst, int async);
00100 void route_append_destination(struct route *this_, struct pcoord *dst, int async);
00101 void route_remove_nth_waypoint(struct route *this_, int n);
00102 void route_remove_waypoint(struct route *this_);
00103 char* route_get_destination_description(struct route *this_, int n);
00104 struct coord route_get_coord_dist(struct route *this_, int dist);
00105 struct street_data *street_get_data(struct item *item);
00106 struct street_data *street_data_dup(struct street_data *orig);
00107 void street_data_free(struct street_data *sd);
00108 void route_info_free(struct route_info *inf);
00109 struct street_data *route_info_street(struct route_info *rinf);
00110 struct map *route_get_map(struct route *this_);
00111 struct map *route_get_graph_map(struct route *this_);
00112 void route_set_projection(struct route *this_, enum projection pro);
00113 void route_set_destinations(struct route *this_, struct pcoord *dst, int count, int async);
00114 int route_set_attr(struct route *this_, struct attr *attr);
00115 int route_add_attr(struct route *this_, struct attr *attr);
00116 int route_remove_attr(struct route *this_, struct attr *attr);
00117 struct attr_iter * route_attr_iter_new(void);
00118 void route_attr_iter_destroy(struct attr_iter *iter);
00119 int route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
00120 void route_init(void);
00121 void route_destroy(struct route *this_);
00122 /* end of prototypes */
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif
00128