Fix:maptool:Another name for faroe islands
[navit-package] / navit / vehicle.h
1 /**
2  * Navit, a modular navigation system.
3  * Copyright (C) 2005-2009 Navit Team
4  *
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.
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 Library General Public License for more details.
13  *
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.
18  */
19
20 #ifndef NAVIT_VEHICLE_H
21 #define NAVIT_VEHICLE_H
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 struct point;
28 struct vehicle_priv;
29
30 struct vehicle_methods {
31         void (*destroy)(struct vehicle_priv *priv);
32         int (*position_attr_get)(struct vehicle_priv *priv, enum attr_type type, struct attr *attr);
33         int (*set_attr)(struct vehicle_priv *priv, struct attr *attr);
34 };
35
36 /* prototypes */
37 void vehicle_log_gpx_add_tag(char *tag, char **logstr);
38 struct vehicle *vehicle_new(struct attr *parent, struct attr **attrs);
39 void vehicle_destroy(struct vehicle *this_);
40 struct attr_iter *vehicle_attr_iter_new(void); 
41 void vehicle_attr_iter_destroy(struct attr_iter *iter); 
42
43 int vehicle_get_attr(struct vehicle *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
44 int vehicle_set_attr(struct vehicle *this_, struct attr *attr);
45 int vehicle_add_attr(struct vehicle *this_, struct attr *attr);
46 int vehicle_remove_attr(struct vehicle *this_, struct attr *attr);
47
48 void vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor);
49 void vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int lazy, int angle, int speed);
50 /* end of prototypes */
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56 #endif
57