1 /* External header for the Gedcom parser library.
2 Copyright (C) 2001 The Genes Development Team
3 This file is part of the Gedcom parser library.
4 Contributed by Peter Verthez <Peter.Verthez@advalvas.be>, 2001.
6 The Gedcom parser library is free software; you can redistribute it
7 and/or modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The Gedcom parser library is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the Gedcom parser library; if not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
42 NR_OF_RECS /* Just a final value to be used in array boundaries */
51 ELT_HEAD_SOUR_DATA_DATE,
52 ELT_HEAD_SOUR_DATA_COPR,
70 NR_OF_ELTS /* Just a final value to be used in array boundaries */
85 typedef void* Gedcom_ctxt;
86 typedef void* Gedcom_val;
90 (Gedcom_msg_type type, char *msg);
93 (*Gedcom_rec_start_cb)
94 (int level, char *xref, char *tag);
100 (*Gedcom_elt_start_cb)
102 int level, char *tag, char *raw_value, Gedcom_val parsed_value);
105 (Gedcom_ctxt parent, Gedcom_ctxt self, Gedcom_val parsed_value);
109 (Gedcom_ctxt parent, int level, char *tag, char *raw_value);
111 int gedcom_parse_file(char* file_name);
112 void gedcom_set_debug_level(int level, FILE* trace_output);
113 void gedcom_set_error_handling(Gedcom_err_mech mechanism);
114 void gedcom_set_compat_handling(int enable_compat);
115 void gedcom_set_message_handler(Gedcom_msg_handler func);
116 void gedcom_set_default_callback(Gedcom_def_cb func);
118 void gedcom_subscribe_to_record(Gedcom_rec rec,
119 Gedcom_rec_start_cb cb_start,
120 Gedcom_rec_end_cb cb_end);
121 void gedcom_subscribe_to_element(Gedcom_elt elt,
122 Gedcom_elt_start_cb cb_start,
123 Gedcom_elt_end_cb cb_end);
127 #endif /* __GEDCOM_H */