summaryrefslogtreecommitdiff
path: root/navit/xmlconfig.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-05-26 08:44:02 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-05-26 08:44:02 +0000
commit1298062f2e9484e1ee20e1ec9717e562409120b2 (patch)
treee9b601f8ca687d5d592e15a9a8ae3d02da47c080 /navit/xmlconfig.c
parent4acd82ad52253a31987d5e1342b521f44b96b1ac (diff)
downloadnavit-1298062f2e9484e1ee20e1ec9717e562409120b2.tar.gz
Fix:Core:Coding standard and converted speech to new scheme
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5507 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/xmlconfig.c')
-rw-r--r--navit/xmlconfig.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/navit/xmlconfig.c b/navit/xmlconfig.c
index f8a01e507..a4fd2e5bf 100644
--- a/navit/xmlconfig.c
+++ b/navit/xmlconfig.c
@@ -273,7 +273,6 @@ static struct object_func object_funcs[] = {
{ attr_polygon, NEW(polygon_new), NULL, NULL, NULL, NULL, ADD(element_add_attr)},
{ attr_polyline, NEW(polyline_new), NULL, NULL, NULL, NULL, ADD(element_add_attr)},
{ attr_route, NEW(route_new), GET(route_get_attr), NULL, NULL, SET(route_set_attr), ADD(route_add_attr), REMOVE(route_remove_attr)},
- { attr_speech, NEW(speech_new), GET(speech_get_attr), NULL, NULL, SET(speech_set_attr)},
{ attr_text, NEW(text_new)},
};
@@ -308,6 +307,8 @@ object_func_lookup(enum attr_type type)
return &osd_func;
case attr_trackingo:
return &tracking_func;
+ case attr_speech:
+ return &speech_func;
case attr_vehicle:
return &vehicle_func;
case attr_vehicleprofile:
@@ -1280,6 +1281,16 @@ navit_object_set_methods(void *in, int in_size, void *out, int out_size)
}
struct navit_object *
+navit_object_new(struct attr **attrs, struct object_func *func, int size)
+{
+ struct navit_object *ret=g_malloc0(size);
+ ret->func=func;
+ ret->attrs=attr_list_dup(attrs);
+ navit_object_ref(ret);
+ return ret;
+}
+
+struct navit_object *
navit_object_ref(struct navit_object *obj)
{
obj->refcount++;