UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
compa::anonymous_namespace{webserver.cpp}::CXmlAlias Struct Reference

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.
 

Detailed Description

Alias directory structure on the webserver for an XML document.

Definition at line 100 of file webserver.cpp.

Member Function Documentation

◆ set()

int compa::anonymous_namespace{webserver.cpp}::CXmlAlias::set ( const char *  a_alias_name,
const char *&  a_alias_content,
size_t &  a_alias_content_length,
time_t  a_last_modified = time(nullptr) 
)
inline

Set an XML Document.

To remove the current alias, set a_alias_name to nullptr.

Returns
  • UPNP_E_SUCCESS
  • UPNP_E_INVALID_ARGUMENT
Parameters
[in]a_alias_namePointer 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_contentPointer 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_lengthLength of alias body in bytes. Document can also contain '\0' characters within its length.
[in]a_last_modifiedTime when contents of alias were last changed (local time).
Note
Due to taking over ownership:
  • Parameter a_alias_content is invalid (nullptr) after return. It cannot be reused and must be new set.
  • Parameter a_alias_content_length is set to 0 after return and must be new set.

Definition at line 164 of file webserver.cpp.

◆ name()

std::string_view compa::anonymous_namespace{webserver.cpp}::CXmlAlias::name ( ) const
inline

Get the name of the root udevice description XML document.

Definition at line 200 of file webserver.cpp.

+ Here is the caller graph for this function:

◆ doc()

std::string_view compa::anonymous_namespace{webserver.cpp}::CXmlAlias::doc ( ) const
inline

Get the root udevice description XML document.

Definition at line 210 of file webserver.cpp.

+ Here is the caller graph for this function:

◆ last_modified()

time_t compa::anonymous_namespace{webserver.cpp}::CXmlAlias::last_modified ( ) const
inline

Get last modified date of the root udevice description XML document.

Definition at line 221 of file webserver.cpp.

+ Here is the caller graph for this function:

◆ is_valid()

bool compa::anonymous_namespace{webserver.cpp}::CXmlAlias::is_valid ( ) const
inline

Returns if the XML object contains a valid XML document.

Definition at line 231 of file webserver.cpp.

+ Here is the caller graph for this function:

◆ release()

void compa::anonymous_namespace{webserver.cpp}::CXmlAlias::release ( )
inline

Release an XML document from the XML object.

Definition at line 241 of file webserver.cpp.

+ Here is the caller graph for this function:

◆ clear()

void compa::anonymous_namespace{webserver.cpp}::CXmlAlias::clear ( )
inline

Clear the XML object.

Definition at line 250 of file webserver.cpp.


The documentation for this struct was generated from the following file: