2012-07-11 16:48:47 +08:00
/*
2012-08-10 10:00:18 +08:00
* Summary : Internal Interfaces for memory buffers in libxml2
* Description : this module describes most of the new xmlBuf buffer
* entry points , those are private routines , with a
* few exceptions exported in tree . h . This was added
* in 2.9 .0 .
2012-07-11 16:48:47 +08:00
*
2012-08-10 10:00:18 +08:00
* Copy : See Copyright for the status of this software .
2012-07-11 16:48:47 +08:00
*
2012-08-10 10:00:18 +08:00
* Author : Daniel Veillard
2012-07-11 16:48:47 +08:00
*/
# ifndef __XML_BUF_H__
# define __XML_BUF_H__
# include <libxml/tree.h>
# ifdef __cplusplus
extern " C " {
# endif
xmlBufPtr xmlBufCreate ( void ) ;
xmlBufPtr xmlBufCreateSize ( size_t size ) ;
xmlBufPtr xmlBufCreateStatic ( void * mem , size_t size ) ;
int xmlBufSetAllocationScheme ( xmlBufPtr buf ,
xmlBufferAllocationScheme scheme ) ;
int xmlBufGetAllocationScheme ( xmlBufPtr buf ) ;
void xmlBufFree ( xmlBufPtr buf ) ;
void xmlBufEmpty ( xmlBufPtr buf ) ;
2012-08-22 11:05:09 +08:00
/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
2012-07-11 16:48:47 +08:00
int xmlBufGrow ( xmlBufPtr buf , int len ) ;
int xmlBufInflate ( xmlBufPtr buf , size_t len ) ;
int xmlBufResize ( xmlBufPtr buf , size_t len ) ;
int xmlBufAdd ( xmlBufPtr buf , const xmlChar * str , int len ) ;
int xmlBufAddHead ( xmlBufPtr buf , const xmlChar * str , int len ) ;
int xmlBufCat ( xmlBufPtr buf , const xmlChar * str ) ;
int xmlBufCCat ( xmlBufPtr buf , const char * str ) ;
int xmlBufWriteCHAR ( xmlBufPtr buf , const xmlChar * string ) ;
int xmlBufWriteChar ( xmlBufPtr buf , const char * string ) ;
int xmlBufWriteQuotedString ( xmlBufPtr buf , const xmlChar * string ) ;
2012-08-06 10:16:41 +08:00
size_t xmlBufAvail ( const xmlBufPtr buf ) ;
size_t xmlBufLength ( const xmlBufPtr buf ) ;
/* size_t xmlBufUse(const xmlBufPtr buf); */
int xmlBufIsEmpty ( const xmlBufPtr buf ) ;
2012-07-11 16:48:47 +08:00
int xmlBufAddLen ( xmlBufPtr buf , size_t len ) ;
int xmlBufErase ( xmlBufPtr buf , size_t len ) ;
2012-08-06 10:16:41 +08:00
/* const xmlChar * xmlBufContent(const xmlBufPtr buf); */
/* const xmlChar * xmlBufEnd(const xmlBufPtr buf); */
2012-07-11 16:48:47 +08:00
xmlChar * xmlBufDetach ( xmlBufPtr buf ) ;
size_t xmlBufDump ( FILE * file , xmlBufPtr buf ) ;
xmlBufPtr xmlBufFromBuffer ( xmlBufferPtr buffer ) ;
xmlBufferPtr xmlBufBackToBuffer ( xmlBufPtr buf ) ;
int xmlBufMergeBuffer ( xmlBufPtr buf , xmlBufferPtr buffer ) ;
2012-07-16 16:28:47 +08:00
int xmlBufResetInput ( xmlBufPtr buf , xmlParserInputPtr input ) ;
2012-07-16 18:03:01 +08:00
size_t xmlBufGetInputBase ( xmlBufPtr buf , xmlParserInputPtr input ) ;
int xmlBufSetInputBaseCur ( xmlBufPtr buf , xmlParserInputPtr input ,
size_t base , size_t cur ) ;
2012-07-11 16:48:47 +08:00
# ifdef __cplusplus
}
# endif
# endif /* __XML_BUF_H__ */