60 result.
time = millis() + random(result.
mx * 1000);
80 return result.
active ? &result :
nullptr;
88 int end = in.
indexOf(
"\r\n", start);
89 if (end < 0) end = in.
indexOf(
"\n", start);
Translates DLNA UDP Requests to Schedule so that we can schedule a reply.
Definition: DLNADeviceRequestParser.h:15
Schedule * parse(DLNADevice &device, RequestData &req)
Definition: DLNADeviceRequestParser.h:20
void addMSearchST(const char *accept)
Definition: DLNADeviceRequestParser.h:18
bool parse(Str &in, const char *tag, StrView &result)
Definition: DLNADeviceRequestParser.h:83
Vector< const char * > mx_vector
Definition: DLNADeviceRequestParser.h:44
DLNADevice * p_device
Definition: DLNADeviceRequestParser.h:45
Schedule * processMSearch(RequestData &req)
Definition: DLNADeviceRequestParser.h:47
Device Attributes and generation of XML using urn:schemas-upnp-org:device-1-0. We could just return a...
Definition: DLNADevice.h:27
void log(DlnaLogLevel current_level, const char *fmt...)
Print log message.
Definition: Logger.h:40
Answer from device to MSearch request by sending a reply.
Definition: Schedule.h:77
Str search_target
Definition: Schedule.h:107
int mx
Definition: Schedule.h:110
A simple wrapper to provide string functions on char*. If the underlying char* is a const we do not a...
Definition: StrView.h:25
virtual void clearAll()
Definition: StrView.h:549
virtual int indexOf(const char c, int start=0)
Definition: StrView.h:267
int toInt()
Converts the string to an int.
Definition: StrView.h:586
virtual const char * c_str()
provides the string value as const char*
Definition: StrView.h:366
virtual void trim()
remove leading and traling spaces
Definition: StrView.h:510
virtual void substring(StrView &from, int start, int end)
copies a substring into the current string
Definition: StrView.h:483
virtual bool equals(const char *str)
checks if the string equals indicated parameter string
Definition: StrView.h:171
virtual bool contains(const char *str)
checks if the string contains a substring
Definition: StrView.h:277
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:188
void push_back(T &&value)
Definition: Vector.h:167
Definition: Allocator.h:6
@ DlnaDebug
Definition: Logger.h:16
@ DlnaInfo
Definition: Logger.h:16
@ DlnaWarning
Definition: Logger.h:16
@ DlnaError
Definition: Logger.h:16
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
IPAddressAndPort peer
Definition: IUDPService.h:25
Str data
Definition: IUDPService.h:24
An individual Schedule (to send out UDP messages)
Definition: Schedule.h:17
bool active
Definition: Schedule.h:26
uint64_t time
Definition: Schedule.h:20