61 url_str.replace(
"localhost",
getIPStr());
62 Url new_url{url_str.c_str()};
86 static char result[80] = {0};
172 const char*
udn =
"uuid:09349455-2941-4cf7-9847-0dd5ab210e97";
173 const char*
ns =
"xmlns=\"urn:schemas-upnp-org:device-1-0\"";
192 result +=
xml.
printNode(
"specVersion", printSpecVersionB);
215 result +=
xml.
printNode(
"serviceList", printServiceListCb);
220 char major[5], minor[5];
221 sprintf(major,
"%d", this->version_major);
222 sprintf(minor,
"%d", this->version_minor);
229 auto printServiceCb =
262 auto printIconDlnaInfoCb =
#define DLNA_MAX_URL_LEN
Definition: DLNAServiceInfo.h:5
Setup of a Basic DLNA Control Point. The control point.
Definition: DLNAControlPointMgr.h:32
Device Attributes and generation of XML using urn:schemas-upnp-org:device-1-0. We could just return a...
Definition: DLNADevice.h:27
Vector< DLNAServiceInfo > services
Definition: DLNADevice.h:185
const char * getSerialNumber()
Definition: DLNADevice.h:107
const char * model_number
Definition: DLNADevice.h:181
void setManufacturerURL(const char *url)
Definition: DLNADevice.h:98
size_t printService(void *srv)
Definition: DLNADevice.h:236
void setDeviceType(const char *st)
Definition: DLNADevice.h:42
void setSerialNumber(const char *sn)
Definition: DLNADevice.h:106
StringRegistry & getStringRegistry()
Definition: DLNADevice.h:161
void setActive(bool flag)
Definition: DLNADevice.h:159
const char * getModelDescription()
Definition: DLNADevice.h:101
const char * model_description
Definition: DLNADevice.h:178
const char * friendly_name
Definition: DLNADevice.h:175
uint32_t getTimestamp()
Returns the time when this object has been updated.
Definition: DLNADevice.h:157
const char * getModelNumber()
Definition: DLNADevice.h:105
void setModelDescription(const char *descr)
Definition: DLNADevice.h:100
const char * device_type
Definition: DLNADevice.h:174
Vector< DLNAServiceInfo > & getServices()
Definition: DLNADevice.h:125
const char * getModelName()
Definition: DLNADevice.h:103
Icon icon
Definition: DLNADevice.h:184
const char * manufacturer_url
Definition: DLNADevice.h:177
const char * addString(char *string)
Adds a string to the string repository.
Definition: DLNADevice.h:151
void setFriendlyName(const char *name)
Definition: DLNADevice.h:94
const char * universal_product_code
Definition: DLNADevice.h:183
size_t printRoot()
Definition: DLNADevice.h:189
void clear()
Definition: DLNADevice.h:127
bool is_active
Definition: DLNADevice.h:165
const char * model_url
Definition: DLNADevice.h:180
IPAddress localhost
Definition: DLNADevice.h:169
const char * model_name
Definition: DLNADevice.h:179
const char * getManufacturer()
Definition: DLNADevice.h:97
const char * manufacturer
Definition: DLNADevice.h:176
DLNAServiceInfo & getService(const char *id)
Finds a service definition by name.
Definition: DLNADevice.h:115
void setBaseURL(Url url)
Defines the base url.
Definition: DLNADevice.h:53
size_t printIconList()
Definition: DLNADevice.h:252
IPAddress getIPAddress()
Definition: DLNADevice.h:82
size_t printDevice()
Definition: DLNADevice.h:199
Url & getDeviceURL()
This method returns base url/device.xml.
Definition: DLNADevice.h:69
size_t printSpecVersion()
Definition: DLNADevice.h:219
Url base_url
Definition: DLNADevice.h:167
void setManufacturer(const char *man)
Definition: DLNADevice.h:96
void print(Print &out)
renderes the device xml
Definition: DLNADevice.h:34
const char * getManufacturerURL()
Definition: DLNADevice.h:99
const char * getFriendlyName()
Definition: DLNADevice.h:95
void setModelNumber(const char *number)
Definition: DLNADevice.h:104
size_t printServiceList()
Definition: DLNADevice.h:226
void addService(DLNAServiceInfo s)
Adds a service defintion.
Definition: DLNADevice.h:112
Url device_url
Definition: DLNADevice.h:168
const char * serial_number
Definition: DLNADevice.h:182
Url & getBaseURL()
Provides the base url.
Definition: DLNADevice.h:56
void setUniveralProductCode(const char *upc)
Definition: DLNADevice.h:108
void setIPAddress(IPAddress address)
Definition: DLNADevice.h:80
size_t printIconDlnaInfo(Icon &icon)
Definition: DLNADevice.h:269
void setNS(const char *ns)
Definition: DLNADevice.h:92
int version_minor
Definition: DLNADevice.h:171
void setUDN(const char *id)
Define the udn uuid.
Definition: DLNADevice.h:47
const char * ns
Definition: DLNADevice.h:173
const char * getDeviceType()
Definition: DLNADevice.h:44
void clearIcons()
Overwrite the default icon.
Definition: DLNADevice.h:144
Icon getIcon(int idx=0)
Definition: DLNADevice.h:146
const char * getUDN()
Provide the udn uuid.
Definition: DLNADevice.h:50
uint64_t timestamp
Definition: DLNADevice.h:164
const char * getIPStr()
Provides the local address as string.
Definition: DLNADevice.h:85
void setModelName(const char *name)
Definition: DLNADevice.h:102
const char * getNS()
Definition: DLNADevice.h:93
int version_major
Definition: DLNADevice.h:170
const char * udn
Definition: DLNADevice.h:172
void addIcon(Icon icon)
Definition: DLNADevice.h:145
StringRegistry strings
Definition: DLNADevice.h:187
void updateTimestamp()
Update the timestamp.
Definition: DLNADevice.h:154
XMLPrinter xml
Definition: DLNADevice.h:166
const char * getUniveralProductCode()
Definition: DLNADevice.h:109
Vector< Icon > icons
Definition: DLNADevice.h:186
DLNADevice(bool ok=true)
Definition: DLNADevice.h:32
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
int depth
Definition: Icon.h:15
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 bool isEmpty()
checks if the string is empty
Definition: StrView.h:373
const char * buildPath(const char *start, const char *p1=nullptr, const char *p2=nullptr)
Definition: StrView.h:736
virtual bool endsWith(const char *str)
checks if the string ends with the indicated substring
Definition: StrView.h:185
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
Definition: StringRegistry.h:9
void clear()
Definition: StringRegistry.h:22
const char * add(char *in)
adds a string
Definition: StringRegistry.h:12
URL parser which breaks a full url string up into its individual parts.
Definition: Url.h:18
const char * path()
Definition: Url.h:47
const char * url()
Definition: Url.h:46
const char * host()
Definition: Url.h:48
Vector implementation which provides the most important methods as defined by std::vector....
Definition: Vector.h:21
Parses an DLNA device xml string to fill the DLNADevice data structure.
Definition: XMLDeviceParser.h:17
Definition: Allocator.h:6
Functions to efficiently output XML. XML data contains a lot of redundancy so it is more memory effic...
Definition: XMLPrinter.h:31
size_t printNode(XMLNode node)
Definition: XMLPrinter.h:43
void setOutput(Print &output)
Defines the output.
Definition: XMLPrinter.h:36
size_t printXMLHeader()
Definition: XMLPrinter.h:38