// Change the profile name
struct attr profilename_attr = {attr_profilename, {profilename}};
- if(!vehicle_set_attr(v, &profilename_attr, NULL)) {
+ if(!vehicle_set_attr(v, &profilename_attr)) {
dbg(0, "Unable to set the vehicle's profile name\n");
}
if (nv->vehicle == attr->u.vehicle) {
if (!this_->vehicle || this_->vehicle->vehicle != attr->u.vehicle) {
if (this_->vehicle)
- vehicle_set_attr(this_->vehicle->vehicle, &active, NULL);
+ vehicle_set_attr(this_->vehicle->vehicle, &active);
active.u.num=1;
- vehicle_set_attr(nv->vehicle, &active, NULL);
+ vehicle_set_attr(nv->vehicle, &active);
attr_updated=1;
}
navit_set_vehicle(this_, nv);
nv->callback.type=attr_callback;
nv->callback.u.callback=callback_new_attr_2(callback_cast(navit_vehicle_update), attr_position_coord_geo, this_, nv);
vehicle_add_attr(nv->vehicle, &nv->callback);
- vehicle_set_attr(nv->vehicle, &this_->self, NULL);
+ vehicle_set_attr(nv->vehicle, &this_->self);
return 1;
}
* @param attrs
*/
int
-vehicle_set_attr(struct vehicle *this_, struct attr *attr,
- struct attr **attrs)
+vehicle_set_attr(struct vehicle *this_, struct attr *attr)
{
int ret=1;
if (this_->meth.set_attr)
- ret=this_->meth.set_attr(this_->priv, attr, attrs);
+ ret=this_->meth.set_attr(this_->priv, attr);
if (ret == 1 && attr->type != attr_navit)
this_->attrs=attr_generic_set_attr(this_->attrs, attr);
return ret != 0;
struct vehicle_methods {
void (*destroy)(struct vehicle_priv *priv);
int (*position_attr_get)(struct vehicle_priv *priv, enum attr_type type, struct attr *attr);
- int (*set_attr)(struct vehicle_priv *priv, struct attr *attr, struct attr **attrs);
+ int (*set_attr)(struct vehicle_priv *priv, struct attr *attr);
};
/* prototypes */
void vehicle_attr_iter_destroy(struct attr_iter *iter);
int vehicle_get_attr(struct vehicle *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter);
-int vehicle_set_attr(struct vehicle *this_, struct attr *attr, struct attr **attrs);
+int vehicle_set_attr(struct vehicle *this_, struct attr *attr);
int vehicle_add_attr(struct vehicle *this_, struct attr *attr);
int vehicle_remove_attr(struct vehicle *this_, struct attr *attr);
}
static int
-vehicle_demo_set_attr(struct vehicle_priv *priv, struct attr *attr,
- struct attr **attrs)
+vehicle_demo_set_attr(struct vehicle_priv *priv, struct attr *attr)
{
if (attr->type == attr_navit)
priv->navit = attr->u.navit;
}
static int
-vehicle_iphone_set_attr(struct vehicle_priv *priv, struct attr *attr,
- struct attr **attrs)
+vehicle_iphone_set_attr(struct vehicle_priv *priv, struct attr *attr)
{
if (attr->type == attr_navit) {
priv->navit = attr->u.navit;
}
static int
-vehicle_null_set_attr(struct vehicle_priv *priv, struct attr *attr, struct attr **attrs)
+vehicle_null_set_attr(struct vehicle_priv *priv, struct attr *attr)
{
switch (attr->type) {
case attr_position_speed: