Annotation of XML/xmlIO.h, revision 1.9
1.1 daniel 1: /*
2: * xmlIO.h : interface for the I/O interfaces used by the parser
3: *
4: * See Copyright for the status of this software.
5: *
6: * Daniel.Veillard@w3.org
7: */
8:
9: #ifndef __XML_IO_H__
10: #define __XML_IO_H__
11:
12: #include <stdio.h>
13: #include "tree.h"
1.5 daniel 14: #include "parser.h"
1.2 daniel 15: #include "encoding.h"
1.1 daniel 16:
17: #ifdef __cplusplus
18: extern "C" {
19: #endif
20:
21: typedef struct xmlParserInputBuffer {
22: /* Inputs */
23: FILE *file; /* Input on file handler */
1.2 daniel 24: void* gzfile; /* Input on a compressed stream */
1.1 daniel 25: int fd; /* Input on a file descriptor */
1.6 daniel 26: void *netIO; /* Input from a network stream */
1.1 daniel 27:
1.2 daniel 28: xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
1.1 daniel 29:
30: xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
31:
32: } xmlParserInputBuffer;
33:
34: typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
1.2 daniel 35:
36: /*
37: * Interfaces
38: */
39:
1.5 daniel 40: xmlParserInputBufferPtr
1.9 ! daniel 41: xmlAllocParserInputBuffer (xmlCharEncoding enc);
! 42:
! 43: xmlParserInputBufferPtr
1.5 daniel 44: xmlParserInputBufferCreateFilename (const char *filename,
45: xmlCharEncoding enc);
46: xmlParserInputBufferPtr
47: xmlParserInputBufferCreateFile (FILE *file,
48: xmlCharEncoding enc);
49: xmlParserInputBufferPtr
50: xmlParserInputBufferCreateFd (int fd,
51: xmlCharEncoding enc);
52: int xmlParserInputBufferRead (xmlParserInputBufferPtr in,
53: int len);
54: int xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
55: int len);
1.7 daniel 56: int xmlParserInputBufferPush (xmlParserInputBufferPtr in,
57: int len,
1.8 daniel 58: const char *buf);
1.5 daniel 59: void xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
60: char * xmlParserGetDirectory (const char *filename);
1.1 daniel 61:
62: #ifdef __cplusplus
63: }
64: #endif
65:
66: #endif /* __XML_IO_H__ */
Webmaster