33#ifndef GENLIB_NET_HTTP_HTTPREADWRITE_H
34#define GENLIB_NET_HTTP_HTTPREADWRITE_H
46#define HTTP_DEFAULT_TIMEOUT 30
53struct tm *http_gmtime_r(
const time_t *clock,
struct tm *result);
55 #define http_gmtime_r gmtime_r
58int http_CancelHttpGet(
void *Handle);
124 http_method_t request_method,
126 int *http_error_code);
182int http_RequestAndResponse(
uri_type *destination,
184 size_t request_length,
185 http_method_t req_method,
220int http_Download(
const char *url,
241int http_HttpGetProgress(
void *Handle,
size_t *length,
size_t *total);
306 Upnp_HttpMethod method,
318 const char *contentType,
499int http_SendStatusResponse(
SOCKINFO *info,
500 int http_status_code,
501 int request_major_version,
502 int request_minor_version);
548 int http_major_version,
550 int http_minor_version,
570void http_CalcResponseVersion(
int request_major_vers,
571 int request_minor_vers,
572 int *response_major_vers,
573 int *response_minor_vers);
600int http_OpenHttpGetEx(
const char *url_str,
622void get_sdk_info(
char *info,
size_t infoSize);
#define UPNP_EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition UpnpGlobal.h:98
int SOCKET
Definition UpnpInet.h:48
struct s_UpnpString UpnpString
Type of the string objects inside libupnp.
Definition UpnpString.h:33
int http_ReadHttpResponse(void *Handle, char *buf, size_t *size, int timeout)
Reads the content of a response using a connection previously created by UpnpOpenHttpConnection.
Definition httpreadwrite.c:1492
int http_OpenHttpConnection(const char *url_str, void **Handle, int timeout)
Opens a connection to the server.
Definition httpreadwrite.c:1266
int http_CloseHttpConnection(void *Handle)
Closes the connection created with UpnpOpenHttpConnection and frees any memory associated with the co...
Definition httpreadwrite.c:1597
int http_FixStrUrl(const char *urlstr, size_t urlstrlen, uri_type *fixed_url)
Parses URL and then validates URL.
Definition httpreadwrite.c:276
int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt,...)
Sends a message to the destination based on the format parameter.
Definition httpreadwrite.c:492
SOCKET http_Connect(uri_type *destination_url, uri_type *url)
Gets destination address from URL and then connects to the remote end.
Definition httpreadwrite.c:302
int http_FixUrl(uri_type *url, uri_type *fixed_url)
Validates URL.
Definition httpreadwrite.c:249
int http_WriteHttpRequest(void *Handle, char *buf, size_t *size, int timeout)
Writes the content of a HTTP request initiated by a UpnpMakeHttpRequest call. The end of the content ...
Definition httpreadwrite.c:1364
int http_EndHttpRequest(void *Handle, int timeout)
Indicates the end of a HTTP request previously made by UpnpMakeHttpRequest.
Definition httpreadwrite.c:1410
int http_GetHttpResponse(void *Handle, UpnpString *headers, char **contentType, int *contentLength, int *httpStatus, int timeout)
Gets the response from the server using a connection previously created by UpnpOpenHttpConnection.
Definition httpreadwrite.c:1429
int http_MakeHttpRequest(Upnp_HttpMethod method, const char *url_str, void *Handle, UpnpString *headers, const char *contentType, int contentLength, int timeout)
Makes a HTTP request using a connection previously created by UpnpOpenHttpConnection.
Definition httpreadwrite.c:1326
int http_RecvMessage(SOCKINFO *info, http_parser_t *parser, http_method_t request_method, int *timeout_secs, int *http_error_code)
Get the data on the socket and take actions based on the read data to modify the parser objects buffe...
Definition httpreadwrite.c:364
int http_MakeMessage(membuffer *buf, int http_major_version, int http_minor_version, const char *fmt,...)
Generate an HTTP message based on the format that is specified in the input parameters.
Definition httpreadwrite.c:1662
Represents a URI used in parse_uri and elsewhere.
Definition uri.h:134
Definition httpparser.h:217
Definition membuffer.h:58