40 "parseMSearchReply parsed -> LOCATION='%s' USN='%s' ST='%s'",
56 parse(req.
data,
"<e:propertyset", result->
xml,
"</e:propertyset>");
61 bool parse(
Str& in,
const char* tag,
Str& result,
const char* end =
"\r\n") {
72 int end_pos = sin.
indexOf(end, start_pos);
73 start_pos += strlen(tag);
74 if (end_pos < 0) end_pos = in.
indexOf(
"\n", start_pos);
Translates DLNA UDP Requests to Schedule so that we can schedule a reply.
Definition: DLNAControlPointRequestParser.h:15
MSearchReplyCP * parseMSearchReply(RequestData &req)
Definition: DLNAControlPointRequestParser.h:32
Schedule * parse(RequestData &req)
Definition: DLNAControlPointRequestParser.h:17
NotifyReplyCP * parseNotifyReply(RequestData &req)
Definition: DLNAControlPointRequestParser.h:46
bool parse(Str &in, const char *tag, Str &result, const char *end="\r\n")
Definition: DLNAControlPointRequestParser.h:61
void log(DlnaLogLevel current_level, const char *fmt...)
Print log message.
Definition: Logger.h:40
Processing at control point to handle a MSearchReply from the device.
Definition: Schedule.h:122
Str usn
Definition: Schedule.h:126
Str location
Definition: Schedule.h:125
Str search_target
Definition: Schedule.h:127
Represents a notification/notify reply scheduled for control-point processing.
Definition: Schedule.h:163
Str delivery_host_and_port
Definition: Schedule.h:167
Str xml
Definition: Schedule.h:171
Str event_key
Definition: Schedule.h:170
Str subscription_id
Definition: Schedule.h:169
Str delivery_path
Definition: Schedule.h:168
Str nts
Definition: Schedule.h:166
virtual void substrView(StrView &from, int start, int end)
copies a substring into the current string
Definition: StrView.h:493
virtual void clearAll()
Definition: StrView.h:559
virtual int indexOf(const char c, int start=0)
Definition: StrView.h:275
virtual bool startsWith(const char *str)
checks if the string starts with the indicated substring
Definition: StrView.h:184
virtual void trim()
remove leading and traling spaces
Definition: StrView.h:520
void toLowerCase()
Converts the string to lowercase letters.
Definition: StrView.h:634
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
Definition: Allocator.h:6
LoggerClass DlnaLogger
Definition: Logger.cpp:5
Provides information of the received UDP which consists of the (xml) data and the peer address and po...
Definition: IUDPService.h:23
Str data
Definition: IUDPService.h:24
An individual Schedule (to send out UDP messages)
Definition: Schedule.h:17