ATTR(coord)
ATTR(private_data)
ATTR(callback_list)
+ATTR(displaylist)
+ATTR(transformation)
ATTR2(0x0008ffff,type_object_end)
ATTR2(0x00090000,type_coord_begin)
ATTR2(0x0009ffff,type_coord_end)
return 0;
attr->u.pcoord=&this_->destination;
break;
+ case attr_displaylist:
+ attr->u.displaylist=this_->displaylist;
+ return (attr->u.displaylist != NULL);
case attr_former_destination_map:
attr->u.map=this_->former_destination;
break;
+ case attr_graphics:
+ attr->u.graphics=this_->gra;
+ return (attr->u.graphics != NULL);
case attr_gui:
attr->u.gui=this_->gui;
break;
return 0;
}
break;
+ case attr_mapset:
+ attr->u.mapset=this_->mapsets->data;
+ return (attr->u.mapset != NULL);
case attr_navigation:
attr->u.navigation=this_->navigation;
break;
case attr_tracking:
attr->u.num=this_->tracking_flag;
break;
+ case attr_transformation:
+ attr->u.transformation=this_->trans;
+ break;
case attr_vehicle:
if(iter) {
if(iter->u.list) {
{
int ret=1;
switch (attr->type) {
+ case attr_callback:
+ navit_add_callback(this_, attr->u.callback);
+ break;
case attr_log:
ret=navit_add_log(this_, attr->u.log);
break;
this_->layouts = g_list_append(this_->layouts, attr->u.layout);
if(!this_->layout_current)
this_->layout_current=attr->u.layout;
- ret=1;
break;
case attr_route:
this_->route=attr->u.route;
int
navit_remove_attr(struct navit *this_, struct attr *attr)
{
- return 0;
+ int ret=1;
+ switch (attr->type) {
+ case attr_callback:
+ navit_remove_callback(this_, attr->u.callback);
+ break;
+ default:
+ return 0;
+ }
+ return ret;
}
struct attr_iter *
callback_list_remove(this_->cbl, cb);
}
-
+int
+route_get_attr(struct route *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
+{
+ switch (type) {
+ case attr_map:
+ attr->u.map=route_get_map(this_);
+ return attr->u.map != NULL;
+ default:
+ return 0;
+ }
+}
void
route_init(void)
{
plugin_register_map_type("route", route_map_new);
plugin_register_map_type("route_graph", route_graph_map_new);
}
+