33 #ifndef GENLIB_NET_HTTP_HTTPREADWRITE_H
34 #define GENLIB_NET_HTTP_HTTPREADWRITE_H
46 #define HTTP_DEFAULT_TIMEOUT 30
53 struct tm *http_gmtime_r(
const time_t *clock,
struct tm *result);
55 #define http_gmtime_r gmtime_r
58 int http_CancelHttpGet(
void *Handle);
124 http_method_t request_method,
126 int* http_error_code );
183 int http_RequestAndResponse(
186 size_t request_length,
187 http_method_t req_method,
229 char* content_type );
247 int http_HttpGetProgress(
315 Upnp_HttpMethod method,
325 const char *contentType,
508 int http_SendStatusResponse(
510 int http_status_code,
511 int request_major_version,
512 int request_minor_version );
556 int http_major_version,
558 int http_minor_version,
579 void http_CalcResponseVersion(
580 int request_major_vers,
581 int request_minor_vers,
582 int* response_major_vers,
583 int* response_minor_vers );
611 int http_OpenHttpGetEx(
const char *url_str,
634 void get_sdk_info(
char *info,
size_t infoSize );
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:1477
int http_OpenHttpConnection(const char *url_str, void **Handle, int timeout)
Opens a connection to the server.
Definition: httpreadwrite.c:1251
int http_FixStrUrl(const char *urlstr, size_t urlstrlen, uri_type *fixed_url)
Parses URL and then validates URL.
Definition: httpreadwrite.c:270
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:358
Represents a URI used in parse_uri and elsewhere.
Definition: uri.h:127
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:1414
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:1311
int http_EndHttpRequest(void *Handle, int timeout)
Indicates the end of a HTTP request previously made by UpnpMakeHttpRequest.
Definition: httpreadwrite.c:1395
int http_CloseHttpConnection(void *Handle)
Closes the connection created with UpnpOpenHttpConnection and frees any memory associated with the co...
Definition: httpreadwrite.c:1582
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:1647
int SOCKET
Definition: UpnpInet.h:48
int http_FixUrl(uri_type *url, uri_type *fixed_url)
Validates URL.
Definition: httpreadwrite.c:243
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:296
int http_SendMessage(SOCKINFO *info, int *TimeOut, const char *fmt,...)
Sends a message to the destination based on the format parameter.
Definition: httpreadwrite.c:482
Definition: httpparser.h:216
struct s_UpnpString UpnpString
Type of the string objects inside libupnp.
Definition: UpnpString.h:38
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:1349
Definition: membuffer.h:56
#define EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition: UpnpGlobal.h:91