23 size_t write(
const uint8_t* data,
size_t size)
override {
34 if (data ==
nullptr || total_len == 0)
return false;
74 Str& attributes,
int start,
int len,
void* ref) {
89 for (
int i = 0; i < path.
size(); ++i) {
Print to a dynamic string.
Definition: StrPrint.h:12
const char * c_str()
Definition: StrPrint.h:38
size_t length()
Definition: StrPrint.h:40
size_t write(uint8_t ch) override
Definition: StrPrint.h:15
void reset()
Definition: StrPrint.h:42
void consume(int n)
Definition: StrPrint.h:44
void setExpandEncoded(bool flag)
Definition: StrPrint.h:46
virtual bool isEmpty()
checks if the string is empty
Definition: StrView.h:383
String implementation which keeps the data on the heap. We grow the allocated memory only if the copy...
Definition: Str.h:22
const char * c_str()
provides the string value as const char*
Definition: Str.h:187
void reset()
Definition: Str.h:190
Vector implementation which provides the most important methods as defined by std::vector....
Definition: Vector.h:21
int size()
Definition: Vector.h:167
Helper that implements a Print interface to accumulate XML data and then parse it using XMLParser.
Definition: XMLParserPrint.h:12
struct tiny_dlna::XMLParserPrint::CBRef cbref
StrPrint buffer
Definition: XMLParserPrint.h:57
const char * c_str()
Definition: XMLParserPrint.h:52
void reset()
Definition: XMLParserPrint.h:50
size_t write(uint8_t ch) override
Definition: XMLParserPrint.h:21
void setExpandEncoded(bool flag)
Forward expand-entities setting to the underlying XMLParser.
Definition: XMLParserPrint.h:28
static void wrapperCallback(Str &nodeName, Vector< Str > &path, Str &text, Str &attributes, int start, int len, void *ref)
Definition: XMLParserPrint.h:73
size_t length()
Definition: XMLParserPrint.h:54
XMLParserPrint(int reserve=80)
Definition: XMLParserPrint.h:14
size_t write(const uint8_t *data, size_t size) override
Definition: XMLParserPrint.h:23
XMLParser p
Definition: XMLParserPrint.h:58
bool parse(Str &outNodeName, Vector< Str > &outPath, Str &outText, Str &outAttributes)
Definition: XMLParserPrint.h:30
Lightweight streaming XML parser.
Definition: XMLParser.h:27
void setCallback(void(*cb)(Str &nodeName, Vector< Str > &path, Str &text, Str &attributes, int start, int len, void *ref))
Set the callback to be invoked for parsed fragments.
Definition: XMLParser.h:78
void setReportTextOnly(bool flag)
report only nodes with text
Definition: XMLParser.h:128
void setXml(const char *xmlStr)
Set the XML buffer to parse.
Definition: XMLParser.h:68
void setReference(void *ref)
Attach an opaque user pointer to the parser instance.
Definition: XMLParser.h:60
bool parseSingle()
Parse a single fragment (one callback invocation) from the previously set XML buffer.
Definition: XMLParser.h:104
int getParsePos()
Expose current parse position for incremental wrappers.
Definition: XMLParser.h:131
Definition: Allocator.h:6
Definition: XMLParserPrint.h:61
int len
Definition: XMLParserPrint.h:63
int start
Definition: XMLParserPrint.h:62
Str * outNode
Definition: XMLParserPrint.h:64
Str * outText
Definition: XMLParserPrint.h:66
Str * outAttrs
Definition: XMLParserPrint.h:67
Vector< Str > * outPath
Definition: XMLParserPrint.h:65