1/*
2 * Summary: old DocBook SGML parser
3 * Description: interface for a DocBook SGML non-verifying parser
4 * This code is DEPRECATED, and should not be used anymore.
5 *
6 * Copy: See Copyright for the status of this software.
7 *
8 * Author: Daniel Veillard
9 */
10
11#ifndef __DOCB_PARSER_H__
12#define __DOCB_PARSER_H__
13#include <libxml/xmlversion.h>
14
15#ifdef LIBXML_DOCB_ENABLED
16
17#include <libxml/parser.h>
18#include <libxml/parserInternals.h>
19
20#ifndef IN_LIBXML
21#ifdef __GNUC__
22#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
23#endif
24#endif
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/*
31 * Most of the back-end structures from XML and SGML are shared.
32 */
33typedef xmlParserCtxt docbParserCtxt;
34typedef xmlParserCtxtPtr docbParserCtxtPtr;
35typedef xmlSAXHandler docbSAXHandler;
36typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
37typedef xmlParserInput docbParserInput;
38typedef xmlParserInputPtr docbParserInputPtr;
39typedef xmlDocPtr docbDocPtr;
40
41/*
42 * There is only few public functions.
43 */
44XMLPUBFUN int XMLCALL
45		     docbEncodeEntities(unsigned char *out,
46                                        int *outlen,
47                                        const unsigned char *in,
48                                        int *inlen, int quoteChar);
49
50XMLPUBFUN docbDocPtr XMLCALL
51		     docbSAXParseDoc   (xmlChar *cur,
52                                        const char *encoding,
53                                        docbSAXHandlerPtr sax,
54                                        void *userData);
55XMLPUBFUN docbDocPtr XMLCALL
56		     docbParseDoc      (xmlChar *cur,
57                                        const char *encoding);
58XMLPUBFUN docbDocPtr XMLCALL
59		     docbSAXParseFile  (const char *filename,
60                                        const char *encoding,
61                                        docbSAXHandlerPtr sax,
62                                        void *userData);
63XMLPUBFUN docbDocPtr XMLCALL
64		     docbParseFile     (const char *filename,
65                                        const char *encoding);
66
67/**
68 * Interfaces for the Push mode.
69 */
70XMLPUBFUN void XMLCALL
71		     docbFreeParserCtxt      (docbParserCtxtPtr ctxt);
72XMLPUBFUN docbParserCtxtPtr XMLCALL
73		     docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
74                                              void *user_data,
75                                              const char *chunk,
76                                              int size,
77                                              const char *filename,
78                                              xmlCharEncoding enc);
79XMLPUBFUN int XMLCALL
80		     docbParseChunk          (docbParserCtxtPtr ctxt,
81                                              const char *chunk,
82                                              int size,
83                                              int terminate);
84XMLPUBFUN docbParserCtxtPtr XMLCALL
85		     docbCreateFileParserCtxt(const char *filename,
86                                              const char *encoding);
87XMLPUBFUN int XMLCALL
88		     docbParseDocument       (docbParserCtxtPtr ctxt);
89
90#ifdef __cplusplus
91}
92#endif
93
94#endif /* LIBXML_DOCB_ENABLED */
95
96#endif /* __DOCB_PARSER_H__ */
97