Mbed OS Reference
|
Basic message parser that aggregates URIParser, TextParser and MimeParser. More...
#include <SimpleMessageParser.h>
Data Structures | |
struct | Delegate |
Delegate invoked when the parser raise an event. More... | |
Public Member Functions | |
SimpleMessageParser () | |
Construct a new CommonMessageParser. More... | |
void | set_delegate (Delegate *delegate) |
Set the handler that processes parsing events. More... | |
void | parse (const Span< const uint8_t > &data_buffer) |
Parse an NDEF Message. More... | |
void | add_record_parser (RecordParser *parser) |
Insert a new parser in the parser chain. More... | |
Basic message parser that aggregates URIParser, TextParser and MimeParser.
Custom parsers can be added at runtime as well.
Definition at line 43 of file SimpleMessageParser.h.
Construct a new CommonMessageParser.
void set_delegate | ( | Delegate * | delegate | ) |
Set the handler that processes parsing events.
delegate | The parsing event handler. |
void parse | ( | const Span< const uint8_t > & | data_buffer | ) |
Parse an NDEF Message.
Records and errors are reported to the handler registered with set_event_handler.
data_buffer | The data buffer that contains the NDEF message. |
void add_record_parser | ( | RecordParser * | parser | ) |
Insert a new parser in the parser chain.
parser | The parser to add in the parsing chain. |