ReactOS 0.4.16-dev-258-g81860b4
xmlIO.h
Go to the documentation of this file.
1/*
2 * Summary: interface for the I/O interfaces used by the parser
3 * Description: interface for the I/O interfaces used by the parser
4 *
5 * Copy: See Copyright for the status of this software.
6 *
7 * Author: Daniel Veillard
8 */
9
10#ifndef __XML_IO_H__
11#define __XML_IO_H__
12
13#include <stdio.h>
14#include <libxml/xmlversion.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/*
21 * Those are the functions and datatypes for the parser input
22 * I/O structures.
23 */
24
34typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
43typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
54typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
64
65#ifdef LIBXML_OUTPUT_ENABLED
66/*
67 * Those are the functions and datatypes for the library output
68 * I/O structures.
69 */
70
80typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
89typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
100typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
101 int len);
110typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
111#endif /* LIBXML_OUTPUT_ENABLED */
112
113#ifdef __cplusplus
114}
115#endif
116
117#include <libxml/globals.h>
118#include <libxml/tree.h>
119#include <libxml/parser.h>
120#include <libxml/encoding.h>
121
122#ifdef __cplusplus
123extern "C" {
124#endif
126 void* context;
129
130 xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
131
132 xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
133 xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
134 int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
135 int error;
136 unsigned long rawconsumed;/* amount consumed from raw */
137};
138
139
140#ifdef LIBXML_OUTPUT_ENABLED
141struct _xmlOutputBuffer {
142 void* context;
143 xmlOutputWriteCallback writecallback;
144 xmlOutputCloseCallback closecallback;
145
146 xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
147
148 xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
149 xmlBufPtr conv; /* if encoder != NULL buffer for output */
150 int written; /* total number of byte written */
151 int error;
152};
153#endif /* LIBXML_OUTPUT_ENABLED */
154
155/*
156 * Interfaces for input
157 */
160
163
168
171 xmlCharEncoding enc);
174 xmlCharEncoding enc);
177 xmlCharEncoding enc);
180 xmlCharEncoding enc);
183 xmlCharEncoding enc);
186 xmlInputCloseCallback ioclose,
187 void *ioctx,
188 xmlCharEncoding enc);
191 int len);
194 int len);
197 int len,
198 const char *buf);
201XMLPUBFUN char * XMLCALL
203
206 xmlInputOpenCallback openFunc,
207 xmlInputReadCallback readFunc,
208 xmlInputCloseCallback closeFunc);
209
212 xmlCharEncoding enc);
213
214#ifdef LIBXML_OUTPUT_ENABLED
215/*
216 * Interfaces for output
217 */
219 xmlCleanupOutputCallbacks (void);
221 xmlPopOutputCallbacks (void);
223 xmlRegisterDefaultOutputCallbacks(void);
225 xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
226
228 xmlOutputBufferCreateFilename (const char *URI,
230 int compression);
231
233 xmlOutputBufferCreateFile (FILE *file,
235
237 xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
239
241 xmlOutputBufferCreateFd (int fd,
243
245 xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
246 xmlOutputCloseCallback ioclose,
247 void *ioctx,
249
250/* Couple of APIs to get the output without digging into the buffers */
252 xmlOutputBufferGetContent (xmlOutputBufferPtr out);
253XMLPUBFUN size_t XMLCALL
254 xmlOutputBufferGetSize (xmlOutputBufferPtr out);
255
257 xmlOutputBufferWrite (xmlOutputBufferPtr out,
258 int len,
259 const char *buf);
261 xmlOutputBufferWriteString (xmlOutputBufferPtr out,
262 const char *str);
264 xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
265 const xmlChar *str,
267
269 xmlOutputBufferFlush (xmlOutputBufferPtr out);
271 xmlOutputBufferClose (xmlOutputBufferPtr out);
272
274 xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
275 xmlOutputOpenCallback openFunc,
276 xmlOutputWriteCallback writeFunc,
277 xmlOutputCloseCallback closeFunc);
278
280 __xmlOutputBufferCreateFilename(const char *URI,
282 int compression);
283
284#ifdef LIBXML_HTTP_ENABLED
285/* This function only exists if HTTP support built into the library */
287 xmlRegisterHTTPPostCallbacks (void );
288#endif /* LIBXML_HTTP_ENABLED */
289
290#endif /* LIBXML_OUTPUT_ENABLED */
291
295
296/*
297 * A predefined entity loader disabling network accesses
298 */
301 const char *ID,
302 xmlParserCtxtPtr ctxt);
303
304/*
305 * xmlNormalizeWindowsPath is obsolete, don't use it.
306 * Check xmlCanonicPath in uri.h for a better alternative.
307 */
310
312 xmlCheckFilename (const char *path);
317 xmlFileMatch (const char *filename);
318XMLPUBFUN void * XMLCALL
319 xmlFileOpen (const char *filename);
322 char * buffer,
323 int len);
326
330#ifdef LIBXML_HTTP_ENABLED
332 xmlIOHTTPMatch (const char *filename);
333XMLPUBFUN void * XMLCALL
334 xmlIOHTTPOpen (const char *filename);
335#ifdef LIBXML_OUTPUT_ENABLED
336XMLPUBFUN void * XMLCALL
337 xmlIOHTTPOpenW (const char * post_uri,
338 int compression );
339#endif /* LIBXML_OUTPUT_ENABLED */
341 xmlIOHTTPRead (void * context,
342 char * buffer,
343 int len);
345 xmlIOHTTPClose (void * context);
346#endif /* LIBXML_HTTP_ENABLED */
347
351#ifdef LIBXML_FTP_ENABLED
353 xmlIOFTPMatch (const char *filename);
354XMLPUBFUN void * XMLCALL
355 xmlIOFTPOpen (const char *filename);
357 xmlIOFTPRead (void * context,
358 char * buffer,
359 int len);
361 xmlIOFTPClose (void * context);
362#endif /* LIBXML_FTP_ENABLED */
363
364#ifdef __cplusplus
365}
366#endif
367
368#endif /* __XML_IO_H__ */
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
Definition: btrfs_drv.h:1365
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
int(* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen)
Definition: encoding.h:121
xmlCharEncoding
Definition: encoding.h:56
#define XMLCALL
GLsizeiptr size
Definition: glext.h:5919
GLuint buffer
Definition: glext.h:5915
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint in
Definition: glext.h:9616
GLenum GLsizei len
Definition: glext.h:6722
const char * filename
Definition: ioapi.h:137
#define error(str)
Definition: mkdosfs.c:1605
static FILE * out
Definition: regtests2xml.c:44
const WCHAR * str
#define ID
Definition: ruserpass.c:36
xmlOutputBuffer * xmlOutputBufferPtr
Definition: tree.h:32
static int fd
Definition: io.c:51
Definition: buf.c:43
xmlBufPtr buffer
Definition: xmlIO.h:132
unsigned long rawconsumed
Definition: xmlIO.h:136
xmlInputCloseCallback closecallback
Definition: xmlIO.h:128
xmlInputReadCallback readcallback
Definition: xmlIO.h:127
xmlCharEncodingHandlerPtr encoder
Definition: xmlIO.h:130
xmlBufPtr raw
Definition: xmlIO.h:133
Definition: http.c:7252
Definition: fci.c:127
Definition: mem.c:349
int ret
XMLPUBFUN void *XMLCALL xmlFileOpen(const char *filename)
XMLPUBFUN int XMLCALL xmlRegisterInputCallbacks(xmlInputMatchCallback matchFunc, xmlInputOpenCallback openFunc, xmlInputReadCallback readFunc, xmlInputCloseCallback closeFunc)
XMLPUBFUN int XMLCALL xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len)
XMLPUBFUN char *XMLCALL xmlParserGetDirectory(const char *filename)
XMLPUBFUN void XMLCALL xmlFreeParserInputBuffer(xmlParserInputBufferPtr in)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlAllocParserInputBuffer(xmlCharEncoding enc)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFd(int fd, xmlCharEncoding enc)
XMLPUBFUN int XMLCALL xmlFileMatch(const char *filename)
int(XMLCALL * xmlInputMatchCallback)(char const *filename)
Definition: xmlIO.h:34
int(XMLCALL * xmlInputReadCallback)(void *context, char *buffer, int len)
Definition: xmlIO.h:54
XMLPUBFUN void XMLCALL xmlCleanupInputCallbacks(void)
xmlParserInputBufferPtr __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc)
void *(XMLCALL * xmlInputOpenCallback)(char const *filename)
Definition: xmlIO.h:43
XMLPUBFUN int XMLCALL xmlPopInputCallbacks(void)
XMLPUBFUN void XMLCALL xmlRegisterDefaultInputCallbacks(void)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateStatic(const char *mem, int size, xmlCharEncoding enc)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateIO(xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc)
XMLPUBFUN int XMLCALL xmlCheckFilename(const char *path)
XMLPUBFUN xmlParserInputPtr XMLCALL xmlCheckHTTPInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr ret)
XMLPUBFUN int XMLCALL xmlParserInputBufferRead(xmlParserInputBufferPtr in, int len)
int(XMLCALL * xmlInputCloseCallback)(void *context)
Definition: xmlIO.h:63
XMLPUBFUN xmlParserInputPtr XMLCALL xmlNoNetExternalEntityLoader(const char *URL, const char *ID, xmlParserCtxtPtr ctxt)
XMLPUBFUN int XMLCALL xmlParserInputBufferPush(xmlParserInputBufferPtr in, int len, const char *buf)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc)
XMLPUBFUN xmlChar *XMLCALL xmlNormalizeWindowsPath(const xmlChar *path)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFile(FILE *file, xmlCharEncoding enc)
XMLPUBFUN int XMLCALL xmlFileClose(void *context)
XMLPUBFUN int XMLCALL xmlFileRead(void *context, char *buffer, int len)
XMLPUBFUN xmlParserInputBufferPtr XMLCALL xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc)
#define XMLPUBFUN
Definition: xmlexports.h:61
unsigned char xmlChar
Definition: xmlstring.h:28