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