xref: /aosp_15_r20/external/cronet/third_party/libxml/src/include/private/buf.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 #ifndef XML_BUF_H_PRIVATE__
2 #define XML_BUF_H_PRIVATE__
3 
4 #include <libxml/tree.h>
5 
6 XML_HIDDEN xmlBufPtr
7 xmlBufCreate(void);
8 XML_HIDDEN xmlBufPtr
9 xmlBufCreateSize(size_t size);
10 
11 XML_HIDDEN int
12 xmlBufSetAllocationScheme(xmlBufPtr buf, xmlBufferAllocationScheme scheme);
13 XML_HIDDEN int
14 xmlBufGetAllocationScheme(xmlBufPtr buf);
15 
16 XML_HIDDEN void
17 xmlBufFree(xmlBufPtr buf);
18 XML_HIDDEN void
19 xmlBufEmpty(xmlBufPtr buf);
20 
21 /* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
22 XML_HIDDEN int
23 xmlBufGrow(xmlBufPtr buf, int len);
24 XML_HIDDEN int
25 xmlBufResize(xmlBufPtr buf, size_t len);
26 
27 XML_HIDDEN int
28 xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
29 XML_HIDDEN int
30 xmlBufCat(xmlBufPtr buf, const xmlChar *str);
31 XML_HIDDEN int
32 xmlBufCCat(xmlBufPtr buf, const char *str);
33 XML_HIDDEN int
34 xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
35 
36 XML_HIDDEN size_t
37 xmlBufAvail(const xmlBufPtr buf);
38 XML_HIDDEN size_t
39 xmlBufLength(const xmlBufPtr buf);
40 /* size_t xmlBufUse(const xmlBufPtr buf); */
41 XML_HIDDEN int
42 xmlBufIsEmpty(const xmlBufPtr buf);
43 XML_HIDDEN int
44 xmlBufAddLen(xmlBufPtr buf, size_t len);
45 
46 /* const xmlChar * xmlBufContent(const xmlBuf *buf); */
47 /* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
48 
49 XML_HIDDEN xmlChar *
50 xmlBufDetach(xmlBufPtr buf);
51 
52 XML_HIDDEN size_t
53 xmlBufDump(FILE *file, xmlBufPtr buf);
54 
55 XML_HIDDEN xmlBufPtr
56 xmlBufFromBuffer(xmlBufferPtr buffer);
57 XML_HIDDEN xmlBufferPtr
58 xmlBufBackToBuffer(xmlBufPtr buf);
59 
60 XML_HIDDEN int
61 xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
62 XML_HIDDEN int
63 xmlBufUpdateInput(xmlBufPtr buf, xmlParserInputPtr input, size_t pos);
64 
65 #endif /* XML_BUF_H_PRIVATE__ */
66