Arduino DLNA Server
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tiny_dlna::XMLDeviceParser Class Reference

Incremental XML device parser using XMLParserPrint. More...

#include <XMLDeviceParser.h>

Public Member Functions

 XMLDeviceParser (DLNADeviceInfo &result)
 
void begin ()
 
void parse (const uint8_t *buffer, size_t len)
 
void end (DLNADeviceInfo &result)
 Finalize parser state and flush any pending objects.
 

Protected Member Functions

void resetState ()
 

Protected Attributes

DLNAServiceInfo cur_service
 
DLNADeviceInfop_device = nullptr
 
XMLParserPrint xml_parser
 
uint64_t start_time = 0
 
bool in_service = false
 
bool in_icon = false
 
Icon cur_icon
 

Detailed Description

Incremental XML device parser using XMLParserPrint.

This parser consumes parse events from an XMLParserPrint instance and fills a DLNADeviceInfo structure incrementally. It keeps internal state across multiple calls so callers can feed XML data in chunks.

Constructor & Destructor Documentation

◆ XMLDeviceParser()

tiny_dlna::XMLDeviceParser::XMLDeviceParser ( DLNADeviceInfo result)
inline

Member Function Documentation

◆ begin()

void tiny_dlna::XMLDeviceParser::begin ( )
inline

◆ end()

void tiny_dlna::XMLDeviceParser::end ( DLNADeviceInfo result)
inline

Finalize parser state and flush any pending objects.

◆ parse()

void tiny_dlna::XMLDeviceParser::parse ( const uint8_t *  buffer,
size_t  len 
)
inline

Parse available nodes from xml_parser and populate result. Caller may call this repeatedly as more data is written into xml_parser.

◆ resetState()

void tiny_dlna::XMLDeviceParser::resetState ( )
inlineprotected

Member Data Documentation

◆ cur_icon

Icon tiny_dlna::XMLDeviceParser::cur_icon
protected

◆ cur_service

DLNAServiceInfo tiny_dlna::XMLDeviceParser::cur_service
protected

◆ in_icon

bool tiny_dlna::XMLDeviceParser::in_icon = false
protected

◆ in_service

bool tiny_dlna::XMLDeviceParser::in_service = false
protected

◆ p_device

DLNADeviceInfo* tiny_dlna::XMLDeviceParser::p_device = nullptr
protected

◆ start_time

uint64_t tiny_dlna::XMLDeviceParser::start_time = 0
protected

◆ xml_parser

XMLParserPrint tiny_dlna::XMLDeviceParser::xml_parser
protected

The documentation for this class was generated from the following file: