EXPORT_SPEC int UpnpRegisterRootDevice2

( IN Upnp_DescType descriptionType,
  IN const char* description,
  IN size_t bufferLen,
  IN int config_baseURL,
  IN Upnp_FunPtr Fun,
  IN const void* Cookie,
  OUT UpnpDevice_Handle* Hnd )

UpnpRegisterRootDevice2 is similar to UpnpRegisterRootDevice, except that it also allows the description document to be specified as a file or a memory buffer.

Documentation

UpnpRegisterRootDevice2 is similar to UpnpRegisterRootDevice, except that it also allows the description document to be specified as a file or a memory buffer. The description can also be configured to have the correct IP and port address.

NOTE: For the configuration to be functional, the internal web server MUST be present. In addition, the web server MUST be activated (using UpnpSetWebServerRootDir) before calling this function. The only condition where the web server can be absent is if the description document is specified as a URL and no configuration is required (i.e. config_baseURL = 0.)

UpnpRegisterRootDevice2 is synchronous and does not generate any callbacks. Callbacks can occur as soon as this function returns.

Examples of using different types of description documents:

    1) Description specified as a URL:
          descriptionType == UPNPREG_URL_DESC
          description is the URL
          bufferLen = 0 (ignored)
    2) Description specified as a file:
          descriptionType == UPNPREG_FILENAME_DESC
          description is a filename
          bufferLen = 0 (ignored)
    3) Description specified as a memory buffer:
          descriptionType == UPNPREG_BUF_DESC
          description is pointer to a memory buffer
          bufferLen == length of memory buffer
    

Parameters:
descriptionType - The type of the description document.
description - Treated as a URL, file name or memory buffer depending on description type.
bufferLen - The length of memory buffer if passing a description in a buffer, otherwise it is ignored.
config_baseURL - If nonzero, URLBase of description document is configured and the description is served using the internal web server.
Fun - Pointer to the callback function for receiving asynchronous events.
Cookie - Pointer to user data returned with the callback function when invoked.
Hnd - Pointer to a variable to store the new device handle.
Returns:
[int] An integer representing one of the following:

Alphabetic index



This page was generated with the help of DOC++.