1999-06-23 01:49:07 +04:00
/*
* xmlIO . h : interface for the I / O interfaces used by the parser
*
* See Copyright for the status of this software .
*
* Daniel . Veillard @ w3 . org
*/
# ifndef __XML_IO_H__
# define __XML_IO_H__
# include <stdio.h>
# include "tree.h"
1999-08-30 01:02:19 +04:00
# include "parser.h"
1999-07-27 23:52:06 +04:00
# include "encoding.h"
1999-06-23 01:49:07 +04:00
# ifdef __cplusplus
extern " C " {
# endif
typedef struct xmlParserInputBuffer {
/* Inputs */
FILE * file ; /* Input on file handler */
1999-07-27 23:52:06 +04:00
void * gzfile ; /* Input on a compressed stream */
1999-06-23 01:49:07 +04:00
int fd ; /* Input on a file descriptor */
1999-09-22 13:46:25 +04:00
void * netIO ; /* Input from a network stream */
1999-06-23 01:49:07 +04:00
1999-07-27 23:52:06 +04:00
xmlCharEncodingHandlerPtr encoder ; /* I18N conversions to UTF-8 */
1999-06-23 01:49:07 +04:00
xmlBufferPtr buffer ; /* Local buffer encoded in UTF-8 */
} xmlParserInputBuffer ;
typedef xmlParserInputBuffer * xmlParserInputBufferPtr ;
1999-07-27 23:52:06 +04:00
/*
* Interfaces
*/
1999-08-30 01:02:19 +04:00
xmlParserInputBufferPtr
xmlParserInputBufferCreateFilename ( const char * filename ,
xmlCharEncoding enc ) ;
xmlParserInputBufferPtr
xmlParserInputBufferCreateFile ( FILE * file ,
xmlCharEncoding enc ) ;
xmlParserInputBufferPtr
xmlParserInputBufferCreateFd ( int fd ,
xmlCharEncoding enc ) ;
int xmlParserInputBufferRead ( xmlParserInputBufferPtr in ,
int len ) ;
int xmlParserInputBufferGrow ( xmlParserInputBufferPtr in ,
int len ) ;
void xmlFreeParserInputBuffer ( xmlParserInputBufferPtr in ) ;
char * xmlParserGetDirectory ( const char * filename ) ;
1999-07-27 23:52:06 +04:00
1999-06-23 01:49:07 +04:00
# ifdef __cplusplus
}
# endif
# endif /* __XML_IO_H__ */