2 * Navit, a modular navigation system.
3 * Copyright (C) 2005-2009 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.
20 #ifndef NAVIT_VEHICLE_H
21 #define NAVIT_VEHICLE_H
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);
44 struct vehicle *vehicle_new(struct attr *parent, struct attr **attrs);
45 void vehicle_destroy(struct vehicle *this_);
46 struct attr_iter *vehicle_attr_iter_new(void);
47 void vehicle_attr_iter_destroy(struct attr_iter *iter);
48 int vehicle_get_attr(struct vehicle *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
49 int vehicle_set_attr(struct vehicle *this_, struct attr *attr);
50 int vehicle_add_attr(struct vehicle *this_, struct attr *attr);
51 int vehicle_remove_attr(struct vehicle *this_, struct attr *attr);
52 void vehicle_set_cursor(struct vehicle *this_, struct cursor *cursor, int overwrite);
53 void vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int lazy, int angle, int speed);
54 int vehicle_get_cursor_data(struct vehicle *this_, struct point *pnt, int *angle, int *speed);
55 void vehicle_log_gpx_add_tag(char *tag, char **logstr);
56 struct vehicle * vehicle_ref(struct vehicle *this_);
57 void vehicle_unref(struct vehicle *this_);
58 /* end of prototypes */