Alias directory structure on the webserver for an XML document. More...
Public Member Functions | |
int | set (const char *a_alias_name, const char *&a_alias_content, size_t &a_alias_content_length, time_t a_last_modified=time(nullptr)) |
Set an XML Document. | |
std::string_view | name () const |
Get the name of the root udevice description XML document. | |
std::string_view | doc () const |
Get the root udevice description XML document. | |
time_t | last_modified () const |
Get last modified date of the root udevice description XML document. | |
bool | is_valid () const |
Returns if the XML object contains a valid XML document. | |
void | release () |
Release an XML document from the XML object. | |
void | clear () |
Clear the XML object. | |
Alias directory structure on the webserver for an XML document.
Definition at line 100 of file webserver.cpp.
|
inline |
Set an XML Document.
To remove the current alias, set a_alias_name to nullptr.
UPNP_E_SUCCESS
UPNP_E_INVALID_ARGUMENT
[in] | a_alias_name | Pointer to webserver name of alias for a copy; the ownership of this C string with terminating '\0' remains by the caller. He is still responsible to manage it (e.g. deallocating if allocated etc.). |
[in,out] | a_alias_content | Pointer to the xml doc. This string must be allocated by the caller. Ownership of this argument is then taken over by the web server to manage it, in particular also deallocate it. The caller hasn't to worry about memory management. |
[in,out] | a_alias_content_length | Length of alias body in bytes. Document can also contain '\0' characters within its length. |
[in] | a_last_modified | Time when contents of alias were last changed (local time). |
Definition at line 164 of file webserver.cpp.
|
inline |
Get the name of the root udevice description XML document.
Definition at line 200 of file webserver.cpp.
|
inline |
Get the root udevice description XML document.
Definition at line 210 of file webserver.cpp.
|
inline |
Get last modified date of the root udevice description XML document.
Definition at line 221 of file webserver.cpp.
|
inline |
Returns if the XML object contains a valid XML document.
Definition at line 231 of file webserver.cpp.
|
inline |
Release an XML document from the XML object.
Definition at line 241 of file webserver.cpp.
|
inline |
Clear the XML object.
Definition at line 250 of file webserver.cpp.