1 |
zoff99 |
2 |
/**
|
2 |
zoff99 |
31 |
* ZANavi, Zoff Android Navigation system.
|
3 |
|
|
* Copyright (C) 2011-2012 Zoff <zoff@zoff.cc>
|
4 |
|
|
*
|
5 |
|
|
* This program is free software; you can redistribute it and/or
|
6 |
|
|
* modify it under the terms of the GNU 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 General Public License for more details.
|
13 |
|
|
*
|
14 |
|
|
* You should have received a copy of the GNU General Public License
|
15 |
|
|
* 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 |
|
|
/**
|
21 |
zoff99 |
2 |
* Navit, a modular navigation system.
|
22 |
|
|
* Copyright (C) 2005-2008 Navit Team
|
23 |
|
|
*
|
24 |
|
|
* This program is free software; you can redistribute it and/or
|
25 |
|
|
* modify it under the terms of the GNU Library General Public License
|
26 |
|
|
* version 2 as published by the Free Software Foundation.
|
27 |
|
|
*
|
28 |
|
|
* This program is distributed in the hope that it will be useful,
|
29 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
30 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
31 |
|
|
* GNU Library General Public License for more details.
|
32 |
|
|
*
|
33 |
|
|
* You should have received a copy of the GNU Library General Public
|
34 |
|
|
* License along with this program; if not, write to the
|
35 |
|
|
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
36 |
|
|
* Boston, MA 02110-1301, USA.
|
37 |
|
|
*/
|
38 |
|
|
|
39 |
|
|
#ifndef NAVIT_XMLCONFIG_H
|
40 |
|
|
#define NAVIT_XMLCONFIG_H
|
41 |
|
|
|
42 |
|
|
#ifdef __cplusplus
|
43 |
zoff99 |
31 |
extern "C"
|
44 |
|
|
{
|
45 |
zoff99 |
2 |
#endif
|
46 |
|
|
|
47 |
zoff99 |
31 |
struct object_func
|
48 |
|
|
{
|
49 |
zoff99 |
2 |
enum attr_type type;
|
50 |
|
|
void *(*create)(struct attr *parent, struct attr **attrs);
|
51 |
|
|
int (*get_attr)(void *, enum attr_type type, struct attr *attr, struct attr_iter *iter);
|
52 |
|
|
struct attr_iter *(*iter_new)(void *);
|
53 |
|
|
void (*iter_destroy)(struct attr_iter *);
|
54 |
|
|
int (*set_attr)(void *, struct attr *attr);
|
55 |
|
|
int (*add_attr)(void *, struct attr *attr);
|
56 |
|
|
int (*remove_attr)(void *, struct attr *attr);
|
57 |
|
|
int (*init)(void *);
|
58 |
|
|
void (*destroy)(void *);
|
59 |
|
|
};
|
60 |
|
|
|
61 |
|
|
typedef GError xmlerror;
|
62 |
|
|
|
63 |
|
|
extern const int xml_attr_distance;
|
64 |
|
|
|
65 |
|
|
/* prototypes */
|
66 |
|
|
enum attr_type;
|
67 |
|
|
struct object_func *object_func_lookup(enum attr_type type);
|
68 |
zoff99 |
31 |
void xml_parse_text(const char *document, void *data, void(*start)(void *, const char *, const char **, const char **, void *, void *), void(*end)(void *, const char *, void *, void *), void(*text)(void *, const char *, int, void *, void *));
|
69 |
zoff99 |
2 |
gboolean config_load(const char *filename, xmlerror **error);
|
70 |
|
|
//static void xinclude(GMarkupParseContext *context, const gchar **attribute_names, const gchar **attribute_values, struct xmldocument *doc_old, xmlerror **error);
|
71 |
|
|
|
72 |
|
|
/* end of prototypes */
|
73 |
|
|
|
74 |
|
|
#ifdef __cplusplus
|
75 |
|
|
}
|
76 |
|
|
#endif
|
77 |
|
|
|
78 |
|
|
#endif
|