From Harald Welte:
[obnox/wireshark/wip.git] / epan / dtd.h
1 /*
2  *  dtd.h
3  *
4  * XML dissector for Wireshark 
5  * DTD import declarations
6  *
7  * Copyright 2005, Luis E. Garcia Ontanon <luis@ontanon.org>
8  *
9  * $Id$
10  *
11  * Wireshark - Network traffic analyzer
12  * By Gerald Combs <gerald@wireshark.org>
13  * Copyright 1998 Gerald Combs
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  * 
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  * 
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28  */
29
30 #ifndef _DTD_H_
31 #define _DTD_H_
32
33 #include <glib.h>
34 #include <stdlib.h> /* exit() */
35
36 typedef struct _dtd_build_data_t {
37         gchar* proto_name;
38         gchar* media_type;
39         gchar* description;
40         gchar* proto_root;
41         gboolean recursion;
42
43         GPtrArray* elements;
44         GPtrArray* attributes;
45
46         GString* error;
47 } dtd_build_data_t;
48
49 typedef struct _dtd_token_data_t {
50         gchar* text;
51         gchar* location;
52 } dtd_token_data_t;
53
54 typedef struct _dtd_named_list_t {
55         gchar* name;
56         GPtrArray* list;
57 } dtd_named_list_t;
58
59 extern GString* dtd_preparse(const gchar* dname, const gchar* fname, GString* err);
60 extern dtd_build_data_t* dtd_parse(GString* s);
61
62 #endif