debian/changelog update
[navit-package] / navit / vehicleprofile.h
1 /**
2  * Navit, a modular navigation system.
3  * Copyright (C) 2005-2008 Navit Team
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * version 2 as published by the Free Software Foundation.
8  *
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 General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * 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.
18  */
19
20 struct vehicleprofile {
21         int mode;                                               /**< 0 = Auto, 1 = On-Road, 2 = Off-Road */
22         int flags_forward_mask;                 /**< Flags mask for moving in positive direction */
23         int flags_reverse_mask;                 /**< Flags mask for moving in reverse direction */
24         int flags;                                              /**< Required flags to move through a segment */
25         int maxspeed_handling;                  /**< 0 = Always, 1 = Only if lower, 2 = Never */
26         int static_speed;                               /**< Maximum speed of vehicle to consider it stationary */
27         int static_distance;                    /**< Maximum distance of previous position of vehicle to consider it stationary */
28         char *name;                                             // the vehicle profile name
29         struct attr **attrs;
30         GHashTable *roadprofile_hash;
31 };
32
33 struct vehicleprofile * vehicleprofile_new(struct attr *parent, struct attr **attrs);
34 int vehicleprofile_get_attr(struct vehicleprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
35 int vehicleprofile_set_attr(struct vehicleprofile *this_, struct attr *attr);
36 int vehicleprofile_add_attr(struct vehicleprofile *this_, struct attr *attr);
37 int vehicleprofile_remove_attr(struct vehicleprofile *this_, struct attr *attr);
38 struct roadprofile * vehicleprofile_get_roadprofile(struct vehicleprofile *this_, enum item_type type);
39
40 //! Returns the vehicle profile's name.
41 char * vehicleprofile_get_name(struct vehicleprofile *this_);