1 * Summary: interface for the I/O interfaces used by the parser
2 * Description: interface for the I/O interfaces used by the parser
4 * Copy: See Copyright for the status of this software.
6 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
8 /if not defined(XML_IO_H__)
11 /include "libxmlrpg/xmlversion"
13 * Those are the functions and datatypes for the parser input
16 * xmlInputMatchCallback:
17 * @filename: the filename or URI
19 * Callback used in the I/O Input API to detect if the current handler
20 * can provide input fonctionnalities for this resource.
22 * Returns 1 if yes and 0 if another Input module should be used
24 d xmlInputMatchCallback...
25 d s * based(######typedef######)
28 * xmlInputOpenCallback:
29 * @filename: the filename or URI
31 * Callback used in the I/O Input API to open the resource
33 * Returns an Input context or NULL in case or error
35 d xmlInputOpenCallback...
36 d s * based(######typedef######)
39 * xmlInputReadCallback:
40 * @context: an Input context
41 * @buffer: the buffer to store data read
42 * @len: the length of the buffer in bytes
44 * Callback used in the I/O Input API to read the resource
46 * Returns the number of bytes read or -1 in case of error
48 d xmlInputReadCallback...
49 d s * based(######typedef######)
52 * xmlInputCloseCallback:
53 * @context: an Input context
55 * Callback used in the I/O Input API to close the resource
57 * Returns 0 or -1 in case of error
59 d xmlInputCloseCallback...
60 d s * based(######typedef######)
63 /if defined(LIBXML_OUTPUT_ENABLED)
65 * Those are the functions and datatypes for the library output
68 * xmlOutputMatchCallback:
69 * @filename: the filename or URI
71 * Callback used in the I/O Output API to detect if the current handler
72 * can provide output fonctionnalities for this resource.
74 * Returns 1 if yes and 0 if another Output module should be used
76 d xmlOutputMatchCallback...
77 d s * based(######typedef######)
80 * xmlOutputOpenCallback:
81 * @filename: the filename or URI
83 * Callback used in the I/O Output API to open the resource
85 * Returns an Output context or NULL in case or error
87 d xmlOutputOpenCallback...
88 d s * based(######typedef######)
91 * xmlOutputWriteCallback:
92 * @context: an Output context
93 * @buffer: the buffer of data to write
94 * @len: the length of the buffer in bytes
96 * Callback used in the I/O Output API to write to the resource
98 * Returns the number of bytes written or -1 in case of error
100 d xmlOutputWriteCallback...
101 d s * based(######typedef######)
104 * xmlOutputCloseCallback:
105 * @context: an Output context
107 * Callback used in the I/O Output API to close the resource
109 * Returns 0 or -1 in case of error
111 d xmlOutputCloseCallback...
112 d s * based(######typedef######)
114 /endif LIBXML_OUTPUT_ENABLD
116 /include "libxmlrpg/globals"
117 /include "libxmlrpg/tree"
118 /include "libxmlrpg/parser"
119 /include "libxmlrpg/encoding"
121 d xmlParserInputBuffer...
122 d ds based(xmlParserInputBufferPtr)
125 d readcallback like(xmlInputReadCallback)
126 d closecallback like(xmlInputCloseCallback)
128 d encoder like(xmlCharEncodingHandlerPtr) Conversions --> UTF8
130 d buffer like(xmlBufPtr) UTF-8 local buffer
131 d raw like(xmlBufPtr) Raw input buffer
136 /if defined(LIBXML_OUTPUT_ENABLED)
138 d ds based(xmlOutputBufferPtr)
141 d writecallback like(xmlOutputWriteCallback)
142 d closecallback like(xmlOutputCloseCallback)
144 d encoder like(xmlCharEncodingHandlerPtr) Conversions --> UTF8
146 d buffer like(xmlBufPtr) UTF-8/ISOLatin local
147 d conv like(xmlBufPtr) Buffer for output
148 d written 10i 0 Total # byte written
150 /endif LIBXML_OUTPUT_ENABLD
152 * Interfaces for input
154 d xmlCleanupInputCallbacks...
155 d pr extproc('xmlCleanupInputCallbacks')
157 d xmlPopInputCallbacks...
158 d pr 10i 0 extproc('xmlPopInputCallbacks')
160 d xmlRegisterDefaultInputCallbacks...
162 d 'xmlRegisterDefaultInputCallbacks')
164 d xmlAllocParserInputBuffer...
165 d pr extproc('xmlAllocParserInputBuffer')
166 d like(xmlParserInputBufferPtr)
167 d enc value like(xmlCharEncoding)
169 d xmlParserInputBufferCreateFilename...
171 d 'xmlParserInputBufferCreateFilename')
172 d like(xmlParserInputBufferPtr)
173 d URI * value options(*string) const char *
174 d enc value like(xmlCharEncoding)
176 d xmlParserInputBufferCreateFile...
178 d 'xmlParserInputBufferCreateFile')
179 d like(xmlParserInputBufferPtr)
180 d file * value FILE *
181 d enc value like(xmlCharEncoding)
183 d xmlParserInputBufferCreateFd...
185 d 'xmlParserInputBufferCreateFd')
186 d like(xmlParserInputBufferPtr)
188 d enc value like(xmlCharEncoding)
190 d xmlParserInputBufferCreateMem...
192 d 'xmlParserInputBufferCreateMem')
193 d like(xmlParserInputBufferPtr)
194 d mem * value options(*string) const char *
196 d enc value like(xmlCharEncoding)
198 d xmlParserInputBufferCreateStatic...
200 d 'xmlParserInputBufferCreateStatic')
201 d like(xmlParserInputBufferPtr)
202 d mem * value options(*string) const char *
204 d enc value like(xmlCharEncoding)
206 d xmlParserInputBufferCreateIO...
208 d 'xmlParserInputBufferCreateIO')
209 d like(xmlParserInputBufferPtr)
210 d ioread value like(xmlInputReadCallback)
211 d ioclose value like(xmlInputCloseCallback)
212 d ioctx * value void *
213 d enc value like(xmlCharEncoding)
215 d xmlParserInputBufferRead...
216 d pr 10i 0 extproc('xmlParserInputBufferRead')
217 d in value like(xmlParserInputBufferPtr)
220 d xmlParserInputBufferGrow...
221 d pr 10i 0 extproc('xmlParserInputBufferGrow')
222 d in value like(xmlParserInputBufferPtr)
225 d xmlParserInputBufferPush...
226 d pr 10i 0 extproc('xmlParserInputBufferPush')
227 d in value like(xmlParserInputBufferPtr)
229 d buf * value options(*string) const char *
231 d xmlFreeParserInputBuffer...
232 d pr extproc('xmlFreeParserInputBuffer')
233 d in value like(xmlParserInputBufferPtr)
235 d xmlParserGetDirectory...
236 d pr * extproc('xmlParserGetDirectory') char *
237 d filename * value options(*string) const char *
239 d xmlRegisterInputCallbacks...
240 d pr 10i 0 extproc('xmlRegisterInputCallbacks')
241 d matchFunc value like(xmlInputMatchCallback)
242 d openFunc value like(xmlInputOpenCallback)
243 d readFunc value like(xmlInputReadCallback)
244 d closeFunc value like(xmlInputCloseCallback)
246 /if defined(LIBXML_OUTPUT_ENABLED)
248 * Interfaces for output
250 d xmlCleanupOutputCallbacks...
251 d pr extproc('xmlCleanupOutputCallbacks')
253 d xmlRegisterDefaultOutputCallbacks...
255 d 'xmlRegisterDefaultOuputCallbacks')
257 d xmlAllocOutputBuffer...
258 d pr extproc('xmlAllocOutputBuffer')
259 d like(xmlOutputBufferPtr)
261 d like(xmlCharEncodingHandlerPtr)
263 d xmlOutputBufferCreateFilename...
265 d 'xmlOutputBufferCreateFilename')
266 d like(xmlOutputBufferPtr)
267 d URI * value options(*string) const char *
269 d like(xmlCharEncodingHandlerPtr)
270 d compression 10i 0 value
272 d xmlOutputBufferCreateFile...
273 d pr extproc('xmlOutputBufferCreateFile')
274 d like(xmlOutputBufferPtr)
275 d file * value FILE *
277 d like(xmlCharEncodingHandlerPtr)
279 d xmlOutputBufferCreateBuffer...
281 d 'xmlOutputBufferCreateBuffer')
282 d like(xmlOutputBufferPtr)
283 d buffer value like(xmlBufferPtr)
285 d like(xmlCharEncodingHandlerPtr)
287 d xmlOutputBufferCreateFd...
288 d pr extproc('xmlOutputBufferCreateFd')
289 d like(xmlOutputBufferPtr)
292 d like(xmlCharEncodingHandlerPtr)
294 d xmlOutputBufferCreateIO...
295 d pr extproc('xmlOutputBufferCreateIO')
296 d like(xmlOutputBufferPtr)
297 d iowrite value like(xmlOutputWriteCallback)
298 d ioclose value like(xmlOutputCloseCallback)
299 d ioctx * value void *
301 d like(xmlCharEncodingHandlerPtr)
303 * Couple of APIs to get the output without digging into the buffers
305 d xmlOutputBufferGetContent...
306 d pr * extproc('xmlOutputBufferGetContent') const xmlChar *
307 d out value like(xmlOutputBufferPtr)
309 d xmlOutputBufferGetSize...
310 d pr 10u 0 extproc('xmlOutputBufferGetSize') size_t
311 d out value like(xmlOutputBufferPtr)
313 d xmlOutputBufferWrite...
314 d pr 10i 0 extproc('xmlOutputBufferWrite')
315 d out value like(xmlOutputBufferPtr)
317 d buf * value options(*string) const char *
319 d xmlOutputBufferWriteString...
320 d pr 10i 0 extproc('xmlOutputBufferWriteString')
321 d out value like(xmlOutputBufferPtr)
322 d str * value options(*string) const char *
324 d xmlOutputBufferWriteEscape...
325 d pr 10i 0 extproc('xmlOutputBufferWriteEscape')
326 d out value like(xmlOutputBufferPtr)
327 d str * value options(*string) const xmlChar *
328 d escaping value like(xmlCharEncodingOutputFunc)
330 d xmlOutputBufferFlush...
331 d pr 10i 0 extproc('xmlOutputBufferFlush')
332 d out value like(xmlOutputBufferPtr)
334 d xmlOutputBufferClose...
335 d pr 10i 0 extproc('xmlOutputBufferClose')
336 d out value like(xmlOutputBufferPtr)
338 d xmlRegisterOutputCallbacks...
339 d pr 10i 0 extproc('xmlRegisterOutputCallbacks')
340 d matchFunc value like(xmlOutputMatchCallback)
341 d openFunc value like(xmlOutputOpenCallback)
342 d writeFunc value like(xmlOutputWriteCallback)
343 d closeFunc value like(xmlOutputCloseCallback)
345 /if defined(LIBXML_HTTP_ENABLED)
347 * This function only exists if HTTP support built into the library
349 d xmlRegisterHTTPPostCallbacks...
351 d 'xmlRegisterHTTPPostCallbacks')
353 /endif LIBXML_HTTP_ENABLED
354 /endif LIBXML_OUTPUT_ENABLD
356 d xmlCheckHTTPInput...
357 d pr extproc('xmlCheckHTTPInput')
358 d like(xmlParserInputPtr)
359 d ctxt value like(xmlParserCtxtPtr)
360 d ret value like(xmlParserInputPtr)
362 * A predefined entity loader disabling network accesses
364 d xmlNoNetExternalEntityLoader...
366 d 'xmlNoNetExternalEntityLoader')
367 d like(xmlParserInputPtr)
368 d URL * value options(*string) const char *
369 d ID * value options(*string) const char *
370 d ctxt value like(xmlParserCtxtPtr)
372 * xmlNormalizeWindowsPath is obsolete, don't use it.
373 * Check xmlCanonicPath in uri.h for a better alternative.
375 d xmlNormalizeWindowsPath...
376 d pr * extproc('xmlNormalizeWindowsPath') xmlChar *
377 d path * value options(*string) const xmlChar *
379 d xmlCheckFilename...
380 d pr 10i 0 extproc('xmlCheckFilename')
381 d path * value options(*string) const char *
383 * Default 'file://' protocol callbacks
385 d xmlFileMatch pr 10i 0 extproc('xmlFileMatch')
386 d filename * value options(*string) const char *
388 d xmlFileOpen pr * extproc('xmlFileOpen') void *
389 d filename * value options(*string) const char *
391 d xmlFileRead pr 10i 0 extproc('xmlFileRead')
392 d context * value void *
393 d buffer 65535 options(*varsize)
396 d xmlFileClose pr 10i 0 extproc('xmlFileClose')
397 d context * value void *
399 * Default 'http://' protocol callbacks
401 /if defined(LIBXML_HTTP_ENABLED)
402 d xmlIOHTTPMatch pr 10i 0 extproc('xmlIOHTTPMatch')
403 d filename * value options(*string) const char *
405 d xmlIOHTTPOpen pr * extproc('xmlIOHTTPOpen') void *
406 d filename * value options(*string) const char *
408 /if defined(LIBXML_OUTPUT_ENABLED)
409 d xmlIOHTTPOpenW pr * extproc('xmlIOHTTPOpenW') void *
410 d post_uri * value options(*string) const char *
411 d compression 10i 0 value
412 /endif LIBXML_OUTPUT_ENABLD
414 d xmlIOHTTPRead pr 10i 0 extproc('xmlIOHTTPRead')
415 d context * value void *
416 d buffer 65535 options(*varsize)
419 d xmlIOHTTPClose pr 10i 0 extproc('xmlIOHTTPClose')
420 d context * value void *
421 /endif LIBXML_HTTP_ENABLED
423 * Default 'ftp://' protocol callbacks
425 /if defined(LIBXML_FTP_ENABLED)
426 d xmlIOFTPMatch pr 10i 0 extproc('xmlIOFTPMatch')
427 d filename * value options(*string) const char *
429 d xmlIOFTPOpen pr * extproc('xmlIOFTPOpen') void *
430 d filename * value options(*string) const char *
432 d xmlIOFTPRead pr 10i 0 extproc('xmlIOFTPRead')
433 d context * value void *
434 d buffer 65535 options(*varsize)
437 d xmlIOFTPClose pr 10i 0 extproc('xmlIOFTPClose')
438 d context * value void *
439 /endif LIBXML_FTP_ENABLED