Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 1 | /* |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 2 | * Summary: interface for the I/O interfaces used by the parser |
| 3 | * Description: interface for the I/O interfaces used by the parser |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 4 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 5 | * Copy: See Copyright for the status of this software. |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 6 | * |
Daniel Veillard | be58697 | 2003-11-18 20:56:51 +0000 | [diff] [blame] | 7 | * Author: Daniel Veillard |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __XML_IO_H__ |
| 11 | #define __XML_IO_H__ |
| 12 | |
| 13 | #include <stdio.h> |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 14 | #include <libxml/xmlversion.h> |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 15 | |
| 16 | #ifdef __cplusplus |
| 17 | extern "C" { |
| 18 | #endif |
| 19 | |
| 20 | /* |
| 21 | * Those are the functions and datatypes for the parser input |
| 22 | * I/O structures. |
| 23 | */ |
| 24 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 25 | /** |
| 26 | * xmlInputMatchCallback: |
| 27 | * @filename: the filename or URI |
| 28 | * |
| 29 | * Callback used in the I/O Input API to detect if the current handler |
| 30 | * can provide input fonctionnalities for this resource. |
| 31 | * |
| 32 | * Returns 1 if yes and 0 if another Input module should be used |
| 33 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 34 | typedef int (*xmlInputMatchCallback) (char const *filename); |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 35 | /** |
| 36 | * xmlInputOpenCallback: |
| 37 | * @filename: the filename or URI |
| 38 | * |
| 39 | * Callback used in the I/O Input API to open the resource |
| 40 | * |
| 41 | * Returns an Input context or NULL in case or error |
| 42 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 43 | typedef void * (*xmlInputOpenCallback) (char const *filename); |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 44 | /** |
| 45 | * xmlInputReadCallback: |
| 46 | * @context: an Input context |
| 47 | * @buffer: the buffer to store data read |
| 48 | * @len: the length of the buffer in bytes |
| 49 | * |
| 50 | * Callback used in the I/O Input API to read the resource |
| 51 | * |
| 52 | * Returns the number of bytes read or -1 in case of error |
| 53 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 54 | typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len); |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 55 | /** |
| 56 | * xmlInputCloseCallback: |
| 57 | * @context: an Input context |
| 58 | * |
| 59 | * Callback used in the I/O Input API to close the resource |
| 60 | * |
| 61 | * Returns 0 or -1 in case of error |
| 62 | */ |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 63 | typedef int (*xmlInputCloseCallback) (void * context); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 64 | |
Daniel Veillard | 1b243b4 | 2004-06-08 10:16:42 +0000 | [diff] [blame^] | 65 | typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc); |
| 66 | typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression); |
| 67 | |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 68 | #ifdef LIBXML_OUTPUT_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 69 | /* |
| 70 | * Those are the functions and datatypes for the library output |
| 71 | * I/O structures. |
| 72 | */ |
| 73 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 74 | /** |
| 75 | * xmlOutputMatchCallback: |
| 76 | * @filename: the filename or URI |
| 77 | * |
| 78 | * Callback used in the I/O Output API to detect if the current handler |
| 79 | * can provide output fonctionnalities for this resource. |
| 80 | * |
| 81 | * Returns 1 if yes and 0 if another Output module should be used |
| 82 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 83 | typedef int (*xmlOutputMatchCallback) (char const *filename); |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 84 | /** |
| 85 | * xmlOutputOpenCallback: |
| 86 | * @filename: the filename or URI |
| 87 | * |
| 88 | * Callback used in the I/O Output API to open the resource |
| 89 | * |
| 90 | * Returns an Output context or NULL in case or error |
| 91 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 92 | typedef void * (*xmlOutputOpenCallback) (char const *filename); |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 93 | /** |
| 94 | * xmlOutputWriteCallback: |
| 95 | * @context: an Output context |
| 96 | * @buffer: the buffer of data to write |
| 97 | * @len: the length of the buffer in bytes |
| 98 | * |
| 99 | * Callback used in the I/O Output API to write to the resource |
| 100 | * |
| 101 | * Returns the number of bytes written or -1 in case of error |
| 102 | */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 103 | typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer, |
| 104 | int len); |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 105 | /** |
| 106 | * xmlOutputCloseCallback: |
| 107 | * @context: an Output context |
| 108 | * |
| 109 | * Callback used in the I/O Output API to close the resource |
| 110 | * |
| 111 | * Returns 0 or -1 in case of error |
| 112 | */ |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 113 | typedef int (*xmlOutputCloseCallback) (void * context); |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 114 | #endif /* LIBXML_OUTPUT_ENABLED */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 115 | |
Daniel Veillard | a8a89fe | 2002-04-12 21:03:34 +0000 | [diff] [blame] | 116 | #ifdef __cplusplus |
| 117 | } |
| 118 | #endif |
| 119 | |
| 120 | #include <libxml/globals.h> |
| 121 | #include <libxml/tree.h> |
| 122 | #include <libxml/parser.h> |
| 123 | #include <libxml/encoding.h> |
| 124 | |
| 125 | #ifdef __cplusplus |
| 126 | extern "C" { |
| 127 | #endif |
| 128 | struct _xmlParserInputBuffer { |
| 129 | void* context; |
| 130 | xmlInputReadCallback readcallback; |
| 131 | xmlInputCloseCallback closecallback; |
| 132 | |
| 133 | xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ |
| 134 | |
| 135 | xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */ |
| 136 | xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */ |
William M. Brack | c07329e | 2003-09-08 01:57:30 +0000 | [diff] [blame] | 137 | int compressed; /* -1=unknown, 0=not compressed, 1=compressed */ |
Daniel Veillard | 97bf4d0 | 2003-10-08 18:58:28 +0000 | [diff] [blame] | 138 | int error; |
Daniel Veillard | 3671190 | 2004-02-11 13:25:26 +0000 | [diff] [blame] | 139 | unsigned long rawconsumed;/* amount consumed from raw */ |
Daniel Veillard | a8a89fe | 2002-04-12 21:03:34 +0000 | [diff] [blame] | 140 | }; |
| 141 | |
| 142 | |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 143 | #ifdef LIBXML_OUTPUT_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 144 | struct _xmlOutputBuffer { |
| 145 | void* context; |
| 146 | xmlOutputWriteCallback writecallback; |
| 147 | xmlOutputCloseCallback closecallback; |
| 148 | |
| 149 | xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */ |
| 150 | |
| 151 | xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */ |
| 152 | xmlBufferPtr conv; /* if encoder != NULL buffer for output */ |
| 153 | int written; /* total number of byte written */ |
Daniel Veillard | 97bf4d0 | 2003-10-08 18:58:28 +0000 | [diff] [blame] | 154 | int error; |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 155 | }; |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 156 | #endif /* LIBXML_OUTPUT_ENABLED */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 157 | |
| 158 | /* |
| 159 | * Interfaces for input |
| 160 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 161 | XMLPUBFUN void XMLCALL |
| 162 | xmlCleanupInputCallbacks (void); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 163 | |
Daniel Veillard | aecc0dc | 2004-05-08 02:32:07 +0000 | [diff] [blame] | 164 | XMLPUBFUN int XMLCALL |
| 165 | xmlPopInputCallbacks (void); |
| 166 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 167 | XMLPUBFUN void XMLCALL |
| 168 | xmlRegisterDefaultInputCallbacks (void); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 169 | XMLPUBFUN xmlParserInputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 170 | xmlAllocParserInputBuffer (xmlCharEncoding enc); |
| 171 | |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 172 | XMLPUBFUN xmlParserInputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 173 | xmlParserInputBufferCreateFilename (const char *URI, |
| 174 | xmlCharEncoding enc); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 175 | XMLPUBFUN xmlParserInputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 176 | xmlParserInputBufferCreateFile (FILE *file, |
| 177 | xmlCharEncoding enc); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 178 | XMLPUBFUN xmlParserInputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 179 | xmlParserInputBufferCreateFd (int fd, |
| 180 | xmlCharEncoding enc); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 181 | XMLPUBFUN xmlParserInputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 182 | xmlParserInputBufferCreateMem (const char *mem, int size, |
| 183 | xmlCharEncoding enc); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 184 | XMLPUBFUN xmlParserInputBufferPtr XMLCALL |
Daniel Veillard | 5335055 | 2003-09-18 13:35:51 +0000 | [diff] [blame] | 185 | xmlParserInputBufferCreateStatic (const char *mem, int size, |
| 186 | xmlCharEncoding enc); |
| 187 | XMLPUBFUN xmlParserInputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 188 | xmlParserInputBufferCreateIO (xmlInputReadCallback ioread, |
| 189 | xmlInputCloseCallback ioclose, |
| 190 | void *ioctx, |
| 191 | xmlCharEncoding enc); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 192 | XMLPUBFUN int XMLCALL |
| 193 | xmlParserInputBufferRead (xmlParserInputBufferPtr in, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 194 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 195 | XMLPUBFUN int XMLCALL |
| 196 | xmlParserInputBufferGrow (xmlParserInputBufferPtr in, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 197 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 198 | XMLPUBFUN int XMLCALL |
| 199 | xmlParserInputBufferPush (xmlParserInputBufferPtr in, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 200 | int len, |
| 201 | const char *buf); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 202 | XMLPUBFUN void XMLCALL |
| 203 | xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); |
| 204 | XMLPUBFUN char * XMLCALL |
| 205 | xmlParserGetDirectory (const char *filename); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 206 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 207 | XMLPUBFUN int XMLCALL |
| 208 | xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc, |
Daniel Veillard | 56a4cb8 | 2001-03-24 17:00:36 +0000 | [diff] [blame] | 209 | xmlInputOpenCallback openFunc, |
| 210 | xmlInputReadCallback readFunc, |
| 211 | xmlInputCloseCallback closeFunc); |
Daniel Veillard | 1b243b4 | 2004-06-08 10:16:42 +0000 | [diff] [blame^] | 212 | |
| 213 | XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL |
| 214 | xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); |
| 215 | XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL |
| 216 | xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); |
| 217 | |
| 218 | xmlParserInputBufferPtr |
| 219 | __xmlParserInputBufferCreateFilename(const char *URI, |
| 220 | xmlCharEncoding enc); |
| 221 | |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 222 | #ifdef LIBXML_OUTPUT_ENABLED |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 223 | /* |
| 224 | * Interfaces for output |
| 225 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 226 | XMLPUBFUN void XMLCALL |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 227 | xmlCleanupOutputCallbacks (void); |
| 228 | XMLPUBFUN void XMLCALL |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 229 | xmlRegisterDefaultOutputCallbacks(void); |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 230 | XMLPUBFUN xmlOutputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 231 | xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); |
| 232 | |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 233 | XMLPUBFUN xmlOutputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 234 | xmlOutputBufferCreateFilename (const char *URI, |
| 235 | xmlCharEncodingHandlerPtr encoder, |
| 236 | int compression); |
| 237 | |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 238 | XMLPUBFUN xmlOutputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 239 | xmlOutputBufferCreateFile (FILE *file, |
| 240 | xmlCharEncodingHandlerPtr encoder); |
| 241 | |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 242 | XMLPUBFUN xmlOutputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 243 | xmlOutputBufferCreateFd (int fd, |
| 244 | xmlCharEncodingHandlerPtr encoder); |
| 245 | |
Igor Zlatkovic | 76874e4 | 2003-08-25 09:05:12 +0000 | [diff] [blame] | 246 | XMLPUBFUN xmlOutputBufferPtr XMLCALL |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 247 | xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, |
| 248 | xmlOutputCloseCallback ioclose, |
| 249 | void *ioctx, |
| 250 | xmlCharEncodingHandlerPtr encoder); |
| 251 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 252 | XMLPUBFUN int XMLCALL |
| 253 | xmlOutputBufferWrite (xmlOutputBufferPtr out, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 254 | int len, |
| 255 | const char *buf); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 256 | XMLPUBFUN int XMLCALL |
| 257 | xmlOutputBufferWriteString (xmlOutputBufferPtr out, |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 258 | const char *str); |
Daniel Veillard | 5d1a4d8 | 2004-05-13 14:31:25 +0000 | [diff] [blame] | 259 | XMLPUBFUN int XMLCALL |
| 260 | xmlOutputBufferWriteEscape (xmlOutputBufferPtr out, |
Daniel Veillard | ee8960b | 2004-05-14 03:25:14 +0000 | [diff] [blame] | 261 | const xmlChar *str, |
| 262 | xmlCharEncodingOutputFunc escaping); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 263 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 264 | XMLPUBFUN int XMLCALL |
| 265 | xmlOutputBufferFlush (xmlOutputBufferPtr out); |
| 266 | XMLPUBFUN int XMLCALL |
| 267 | xmlOutputBufferClose (xmlOutputBufferPtr out); |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 268 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 269 | XMLPUBFUN int XMLCALL |
| 270 | xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc, |
Daniel Veillard | 56a4cb8 | 2001-03-24 17:00:36 +0000 | [diff] [blame] | 271 | xmlOutputOpenCallback openFunc, |
| 272 | xmlOutputWriteCallback writeFunc, |
| 273 | xmlOutputCloseCallback closeFunc); |
Daniel Veillard | 1b243b4 | 2004-06-08 10:16:42 +0000 | [diff] [blame^] | 274 | |
| 275 | xmlOutputBufferPtr |
| 276 | __xmlOutputBufferCreateFilename(const char *URI, |
| 277 | xmlCharEncodingHandlerPtr encoder, |
| 278 | int compression); |
Daniel Veillard | a9cce9c | 2003-09-29 13:20:24 +0000 | [diff] [blame] | 279 | #endif /* LIBXML_OUTPUT_ENABLED */ |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 280 | |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 281 | /* This function only exists if HTTP support built into the library */ |
| 282 | #ifdef LIBXML_HTTP_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 283 | XMLPUBFUN void * XMLCALL |
| 284 | xmlIOHTTPOpenW (const char * post_uri, |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 285 | int compression ); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 286 | XMLPUBFUN void XMLCALL |
| 287 | xmlRegisterHTTPPostCallbacks (void ); |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 288 | #endif |
Daniel Veillard | a840b69 | 2003-10-19 13:35:37 +0000 | [diff] [blame] | 289 | XMLPUBFUN xmlParserInputPtr XMLCALL |
| 290 | xmlCheckHTTPInput (xmlParserCtxtPtr ctxt, |
| 291 | xmlParserInputPtr ret); |
Daniel Veillard | f012a64 | 2001-07-23 19:10:52 +0000 | [diff] [blame] | 292 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 293 | /* |
Daniel Veillard | 8bdb91d | 2001-10-31 17:52:43 +0000 | [diff] [blame] | 294 | * A predefined entity loader disabling network accesses |
| 295 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 296 | XMLPUBFUN xmlParserInputPtr XMLCALL |
| 297 | xmlNoNetExternalEntityLoader (const char *URL, |
Daniel Veillard | 8bdb91d | 2001-10-31 17:52:43 +0000 | [diff] [blame] | 298 | const char *ID, |
| 299 | xmlParserCtxtPtr ctxt); |
| 300 | |
Igor Zlatkovic | 5f9fada | 2003-02-19 14:51:00 +0000 | [diff] [blame] | 301 | /* |
| 302 | * xmlNormalizeWindowsPath is obsolete, don't use it. |
| 303 | * Check xmlCanonicPath in uri.h for a better alternative. |
| 304 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 305 | XMLPUBFUN xmlChar * XMLCALL |
| 306 | xmlNormalizeWindowsPath (const xmlChar *path); |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 307 | |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 308 | XMLPUBFUN int XMLCALL |
| 309 | xmlCheckFilename (const char *path); |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 310 | /** |
| 311 | * Default 'file://' protocol callbacks |
| 312 | */ |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 313 | XMLPUBFUN int XMLCALL |
| 314 | xmlFileMatch (const char *filename); |
| 315 | XMLPUBFUN void * XMLCALL |
| 316 | xmlFileOpen (const char *filename); |
| 317 | XMLPUBFUN int XMLCALL |
| 318 | xmlFileRead (void * context, |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 319 | char * buffer, |
| 320 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 321 | XMLPUBFUN int XMLCALL |
| 322 | xmlFileClose (void * context); |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 323 | |
| 324 | /** |
| 325 | * Default 'http://' protocol callbacks |
| 326 | */ |
| 327 | #ifdef LIBXML_HTTP_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 328 | XMLPUBFUN int XMLCALL |
| 329 | xmlIOHTTPMatch (const char *filename); |
| 330 | XMLPUBFUN void * XMLCALL |
| 331 | xmlIOHTTPOpen (const char *filename); |
| 332 | XMLPUBFUN int XMLCALL |
| 333 | xmlIOHTTPRead (void * context, |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 334 | char * buffer, |
| 335 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 336 | XMLPUBFUN int XMLCALL |
| 337 | xmlIOHTTPClose (void * context); |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 338 | #endif /* LIBXML_HTTP_ENABLED */ |
| 339 | |
| 340 | /** |
| 341 | * Default 'ftp://' protocol callbacks |
| 342 | */ |
| 343 | #ifdef LIBXML_FTP_ENABLED |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 344 | XMLPUBFUN int XMLCALL |
| 345 | xmlIOFTPMatch (const char *filename); |
| 346 | XMLPUBFUN void * XMLCALL |
| 347 | xmlIOFTPOpen (const char *filename); |
| 348 | XMLPUBFUN int XMLCALL |
| 349 | xmlIOFTPRead (void * context, |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 350 | char * buffer, |
| 351 | int len); |
Igor Zlatkovic | aa3cfbd | 2003-08-27 08:59:58 +0000 | [diff] [blame] | 352 | XMLPUBFUN int XMLCALL |
| 353 | xmlIOFTPClose (void * context); |
Aleksey Sanin | 5aac8b8 | 2002-05-01 18:32:28 +0000 | [diff] [blame] | 354 | #endif /* LIBXML_FTP_ENABLED */ |
| 355 | |
Owen Taylor | 3473f88 | 2001-02-23 17:55:21 +0000 | [diff] [blame] | 356 | #ifdef __cplusplus |
| 357 | } |
| 358 | #endif |
| 359 | |
| 360 | #endif /* __XML_IO_H__ */ |