UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches

Configure the full URL for the description document. More...

#include <urlconfig.hpp>
#include <unixutil.hpp>
#include <upnpdebug.hpp>
#include <uri.hpp>
#include <webserver.hpp>
+ Include dependency graph for urlconfig.cpp:

Go to the source code of this file.

Functions

int configure_urlbase (IXML_Document *doc, const sockaddr *serverAddr, const char *alias, time_t last_modified, char docURL[LINE_SIZE])
 Configure the full URL for the description document.
 
Scope restricted to file
int anonymous_namespace{urlconfig.cpp}::addrToString (const sockaddr *addr, char *ipaddr_port, size_t ipaddr_port_size)
 Converts an Internet address to a string and stores it in a buffer.
 
int anonymous_namespace{urlconfig.cpp}::calc_alias (const char *alias, const char *rootPath, char **newAlias)
 Determine alias based urlbase's root path.
 
int anonymous_namespace{urlconfig.cpp}::calc_descURL (const char *ipPortStr, const char *alias, char descURL[LINE_SIZE])
 Determines the description URL.
 
int anonymous_namespace{urlconfig.cpp}::config_description_doc (IXML_Document *doc, const char *ip_str, char **root_path_str)
 Configure the description document.
 

Detailed Description

Configure the full URL for the description document.

Definition in file urlconfig.cpp.

Function Documentation

◆ configure_urlbase()

int configure_urlbase ( IXML_Document doc,
const sockaddr *  serverAddr,
const char *  alias,
time_t  last_modified,
char  docURL[LINE_SIZE] 
)

Configure the full URL for the description document.

Create the URL document and add alias, description information. The doc is added to the web server to be served using the given alias.

Note
The function is available only if the web server was enabled on compiling.
Returns
On success: UPNP_E_SUCCESS
On error: UPNP_E_OUTOF_MEMORY - Default Error
Parameters
[in,out]docIXML Description document (dom document whose urlbase is to be modified).
[in]serverAddrSocket address object providing the IP address and port information (ip address and port of the miniserver).
[in]aliasString containing the alias (a name to be used for the temp, e.g.:"foo.xml").
[in]last_modifiedTime when the XML document was downloaded.
[out]docURLBuffer to hold the URL of the document.

Definition at line 307 of file urlconfig.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: