34 const int len = end - pos + 1;
59 int parseStr(
const char* name,
const char*& result) {
63 int parseInt(
int pos,
const char* name,
int& result) {
73 result = temp_view.
toInt();
81 int parseStr(
int pos,
const char* name,
const char*& result) {
130 int servicePos =
str.
indexOf(
"<service>", pos);
131 if (servicePos > 0) {
Device Attributes and generation of XML using urn:schemas-upnp-org:device-1-0. We could just return a...
Definition: DLNADevice.h:27
const char * model_number
Definition: DLNADevice.h:181
const char * model_description
Definition: DLNADevice.h:178
const char * friendly_name
Definition: DLNADevice.h:175
const char * device_type
Definition: DLNADevice.h:174
const char * manufacturer_url
Definition: DLNADevice.h:177
const char * addString(char *string)
Adds a string to the string repository.
Definition: DLNADevice.h:151
const char * model_url
Definition: DLNADevice.h:180
const char * model_name
Definition: DLNADevice.h:179
const char * manufacturer
Definition: DLNADevice.h:176
void addService(DLNAServiceInfo s)
Adds a service defintion.
Definition: DLNADevice.h:112
const char * serial_number
Definition: DLNADevice.h:182
int version_minor
Definition: DLNADevice.h:171
int version_major
Definition: DLNADevice.h:170
void addIcon(Icon icon)
Definition: DLNADevice.h:145
Attributes needed for the DLNA Service Definition.
Definition: DLNAServiceInfo.h:16
const char * scpd_url
Definition: DLNAServiceInfo.h:35
const char * service_type
Definition: DLNAServiceInfo.h:33
const char * service_id
Definition: DLNAServiceInfo.h:34
const char * control_url
Definition: DLNAServiceInfo.h:36
const char * event_sub_url
Definition: DLNAServiceInfo.h:37
Information about the icon.
Definition: Icon.h:10
const char * icon_url
Definition: Icon.h:16
int width
Definition: Icon.h:13
int height
Definition: Icon.h:14
const char * mime
Definition: Icon.h:12
int depth
Definition: Icon.h:15
void log(DlnaLogLevel current_level, const char *fmt...)
Print log message.
Definition: Logger.h:40
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 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 int length()
Definition: StrView.h:370
virtual const char * c_str()
provides the string value as const char*
Definition: StrView.h:366
virtual void swap(StrView &str)
Definition: StrView.h:100
virtual void substring(StrView &from, int start, int end)
copies a substring into the current string
Definition: StrView.h:483
Parses an DLNA device xml string to fill the DLNADevice data structure.
Definition: XMLDeviceParser.h:17
const char * substring(char *in, int pos, int end)
extract string, add to string repository and return repository string
Definition: XMLDeviceParser.h:33
int parseInt(int pos, const char *name, int &result)
Definition: XMLDeviceParser.h:63
DLNADevice * p_device
Definition: XMLDeviceParser.h:30
void parse(DLNADevice &result, const char *xmlStr)
Definition: XMLDeviceParser.h:19
void parseServices()
Definition: XMLDeviceParser.h:120
int parseIcon(DLNADevice &device, int pos)
Definition: XMLDeviceParser.h:104
StrView str
Definition: XMLDeviceParser.h:29
int parseStr(int pos, const char *name, const char *&result)
Definition: XMLDeviceParser.h:81
int parseStr(const char *name, const char *&result)
Definition: XMLDeviceParser.h:59
void parseDevice(DLNADevice &result)
Definition: XMLDeviceParser.h:46
int parseService(int pos)
Definition: XMLDeviceParser.h:127
void parseVersion(DLNADevice &result)
Definition: XMLDeviceParser.h:41
void parseIcons(DLNADevice &device)
Definition: XMLDeviceParser.h:97
Definition: Allocator.h:6
@ DlnaDebug
Definition: Logger.h:16
LoggerClass DlnaLogger
Definition: Logger.cpp:5