Logo Search packages:      
Sourcecode: libupnp4 version File versions  Download package

EXPORT_SPEC int UpnpOpenHttpGetEx ( const char *  url,
void **  handle,
char **  contentType,
int *  contentLength,
int *  httpStatus,
int  lowRange,
int  highRange,
int  timeout 

Gets specified number of bytes from a file specified in the URL.

The number of bytes is specified through a low count and a high count which are passed as a range of bytes for the request. The SDK allocates the memory for handle and contentType, the application is responsible for freeing this memory.

An integer representing one of the following:
  • UPNP_E_SUCCESS: The operation completed successfully.
  • UPNP_E_INVALID_PARAM: Either url, handle, contentType, contentLength or httpStatus is not a valid pointer.
  • UPNP_E_INVALID_URL: The url is not a valid URL.
  • UPNP_E_OUTOF_MEMORY: Insufficient resources exist to download this file.
  • UPNP_E_NETWORK_ERROR: A network error occurred.
  • UPNP_E_SOCKET_WRITE: An error or timeout occurred writing to a socket.
  • UPNP_E_SOCKET_READ: An error or timeout occurred reading from a socket.
  • UPNP_E_SOCKET_BIND: An error occurred binding a socket.
  • UPNP_E_SOCKET_CONNECT: An error occurred connecting a socket.
  • UPNP_E_OUTOF_SOCKET: Too many sockets are currently allocated.
  • UPNP_E_BAD_RESPONSE: A bad response was received from the remote server.
url  [in] The URL of the item to get.
handle  [in,out] A pointer to store the handle for this connection.
contentType  [in,out] A buffer to store the media type of the item.
contentLength  [in,out] A buffer to store the length of the item.
httpStatus  [in,out] The status returned on receiving a response message from the remote server.
lowRange  [in] An integer value representing the low end of a range to retrieve.
highRange  [in] An integer value representing the high end of a range to retrieve.
timeout  [in] A time out value sent with the request during which a response is expected from the server, failing which, an error is reported back to the user.

Definition at line 2527 of file upnpapi.c.

      return http_OpenHttpGetEx(
            url_str, Handle, contentType, contentLength, httpStatus,
            lowRange, highRange, timeout);

Generated by  Doxygen 1.6.0   Back to index