wininet: Rename WININETHTTPSESSIONW to http_session_t.

This commit is contained in:
Jacek Caban 2009-07-13 01:41:18 +02:00 committed by Alexandre Julliard
parent 0e85dec8b6
commit e9f4a40584
3 changed files with 22 additions and 22 deletions

View File

@ -63,7 +63,7 @@ struct WININET_ErrorDlgParams
static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz ) static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{ {
LPWININETHTTPREQW lpwhr; LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs = NULL; http_session_t *lpwhs = NULL;
LPWININETAPPINFOW hIC = NULL; LPWININETAPPINFOW hIC = NULL;
LPWSTR p; LPWSTR p;
@ -204,7 +204,7 @@ static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
LPWSTR username, LPWSTR password ) LPWSTR username, LPWSTR password )
{ {
LPWININETHTTPREQW lpwhr; LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs; http_session_t *lpwhs;
LPWININETAPPINFOW hIC; LPWININETAPPINFOW hIC;
LPWSTR p; LPWSTR p;

View File

@ -1018,7 +1018,7 @@ HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes, LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD_PTR dwContext) DWORD dwFlags, DWORD_PTR dwContext)
{ {
LPWININETHTTPSESSIONW lpwhs; http_session_t *lpwhs;
HINTERNET handle = NULL; HINTERNET handle = NULL;
TRACE("(%p, %s, %s, %s, %s, %p, %08x, %08lx)\n", hHttpSession, TRACE("(%p, %s, %s, %s, %s, %p, %08x, %08lx)\n", hHttpSession,
@ -1032,7 +1032,7 @@ HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession,
TRACE("\taccept type: %s\n",debugstr_w(lpszAcceptTypes[i])); TRACE("\taccept type: %s\n",debugstr_w(lpszAcceptTypes[i]));
} }
lpwhs = (LPWININETHTTPSESSIONW) WININET_GetObject( hHttpSession ); lpwhs = (http_session_t*) WININET_GetObject( hHttpSession );
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION) if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
{ {
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
@ -1388,7 +1388,7 @@ static WCHAR *HTTP_BuildProxyRequestUrl(WININETHTTPREQW *req)
static const WCHAR slash[] = { '/',0 }; static const WCHAR slash[] = { '/',0 };
static const WCHAR format[] = { 'h','t','t','p',':','/','/','%','s',':','%','d',0 }; static const WCHAR format[] = { 'h','t','t','p',':','/','/','%','s',':','%','d',0 };
static const WCHAR formatSSL[] = { 'h','t','t','p','s',':','/','/','%','s',':','%','d',0 }; static const WCHAR formatSSL[] = { 'h','t','t','p','s',':','/','/','%','s',':','%','d',0 };
WININETHTTPSESSIONW *session = req->lpHttpSession; http_session_t *session = req->lpHttpSession;
size = 16; /* "https://" + sizeof(port#) + ":/\0" */ size = 16; /* "https://" + sizeof(port#) + ":/\0" */
size += strlenW( session->lpszHostName ) + strlenW( req->lpszPath ); size += strlenW( session->lpszHostName ) + strlenW( req->lpszPath );
@ -1410,7 +1410,7 @@ static WCHAR *HTTP_BuildProxyRequestUrl(WININETHTTPREQW *req)
* HTTP_DealWithProxy * HTTP_DealWithProxy
*/ */
static BOOL HTTP_DealWithProxy( LPWININETAPPINFOW hIC, static BOOL HTTP_DealWithProxy( LPWININETAPPINFOW hIC,
LPWININETHTTPSESSIONW lpwhs, LPWININETHTTPREQW lpwhr) http_session_t *lpwhs, LPWININETHTTPREQW lpwhr)
{ {
WCHAR buf[MAXHOSTNAME]; WCHAR buf[MAXHOSTNAME];
WCHAR proxy[MAXHOSTNAME + 15]; /* 15 == "http://" + sizeof(port#) + ":/\0" */ WCHAR proxy[MAXHOSTNAME + 15]; /* 15 == "http://" + sizeof(port#) + ":/\0" */
@ -1455,7 +1455,7 @@ static BOOL HTTP_DealWithProxy( LPWININETAPPINFOW hIC,
static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr) static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr)
{ {
char szaddr[INET6_ADDRSTRLEN]; char szaddr[INET6_ADDRSTRLEN];
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession; http_session_t *lpwhs = lpwhr->lpHttpSession;
const void *addr; const void *addr;
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
@ -1604,7 +1604,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
switch(option) { switch(option) {
case INTERNET_OPTION_SECURITY_FLAGS: case INTERNET_OPTION_SECURITY_FLAGS:
{ {
LPWININETHTTPSESSIONW lpwhs; http_session_t *lpwhs;
lpwhs = req->lpHttpSession; lpwhs = req->lpHttpSession;
if (*size < sizeof(ULONG)) if (*size < sizeof(ULONG))
@ -2392,7 +2392,7 @@ static const object_vtbl_t HTTPREQVtbl = {
* NULL on failure * NULL on failure
* *
*/ */
HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, HINTERNET WINAPI HTTP_HttpOpenRequestW(http_session_t *lpwhs,
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion, LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes, LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD_PTR dwContext) DWORD dwFlags, DWORD_PTR dwContext)
@ -3134,7 +3134,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
LPWININETHTTPREQW lpwhr; LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs; http_session_t *lpwhs;
LPWININETAPPINFOW hIC; LPWININETAPPINFOW hIC;
TRACE("(%p, %p, %p, %08x, %08lx)\n", hRequest, lpBuffersIn, TRACE("(%p, %p, %p, %08x, %08lx)\n", hRequest, lpBuffersIn,
@ -3222,7 +3222,7 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength) DWORD dwHeaderLength, LPVOID lpOptional ,DWORD dwOptionalLength)
{ {
LPWININETHTTPREQW lpwhr; LPWININETHTTPREQW lpwhr;
LPWININETHTTPSESSIONW lpwhs = NULL; http_session_t *lpwhs = NULL;
LPWININETAPPINFOW hIC = NULL; LPWININETAPPINFOW hIC = NULL;
BOOL r; BOOL r;
@ -3332,7 +3332,7 @@ static LPWSTR HTTP_GetRedirectURL(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl)
{ {
static WCHAR szHttp[] = {'h','t','t','p',0}; static WCHAR szHttp[] = {'h','t','t','p',0};
static WCHAR szHttps[] = {'h','t','t','p','s',0}; static WCHAR szHttps[] = {'h','t','t','p','s',0};
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession; http_session_t *lpwhs = lpwhr->lpHttpSession;
URL_COMPONENTSW urlComponents; URL_COMPONENTSW urlComponents;
DWORD url_length = 0; DWORD url_length = 0;
LPWSTR orig_url; LPWSTR orig_url;
@ -3392,7 +3392,7 @@ static LPWSTR HTTP_GetRedirectURL(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl)
*/ */
static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl) static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl)
{ {
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession; http_session_t *lpwhs = lpwhr->lpHttpSession;
LPWININETAPPINFOW hIC = lpwhs->lpAppInfo; LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
BOOL using_proxy = hIC->lpszProxy && hIC->lpszProxy[0]; BOOL using_proxy = hIC->lpszProxy && hIC->lpszProxy[0];
WCHAR path[INTERNET_MAX_URL_LENGTH]; WCHAR path[INTERNET_MAX_URL_LENGTH];
@ -3575,7 +3575,7 @@ static BOOL HTTP_SecureProxyConnect(LPWININETHTTPREQW lpwhr)
BOOL ret; BOOL ret;
static const WCHAR szConnect[] = {'C','O','N','N','E','C','T',0}; static const WCHAR szConnect[] = {'C','O','N','N','E','C','T',0};
static const WCHAR szFormat[] = {'%','s',':','%','d',0}; static const WCHAR szFormat[] = {'%','s',':','%','d',0};
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession; http_session_t *lpwhs = lpwhr->lpHttpSession;
TRACE("\n"); TRACE("\n");
@ -3944,7 +3944,7 @@ lend:
*/ */
static void HTTPSESSION_Destroy(object_header_t *hdr) static void HTTPSESSION_Destroy(object_header_t *hdr)
{ {
LPWININETHTTPSESSIONW lpwhs = (LPWININETHTTPSESSIONW) hdr; http_session_t *lpwhs = (http_session_t*) hdr;
TRACE("%p\n", lpwhs); TRACE("%p\n", lpwhs);
@ -3976,7 +3976,7 @@ static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *b
static DWORD HTTPSESSION_SetOption(object_header_t *hdr, DWORD option, void *buffer, DWORD size) static DWORD HTTPSESSION_SetOption(object_header_t *hdr, DWORD option, void *buffer, DWORD size)
{ {
WININETHTTPSESSIONW *ses = (WININETHTTPSESSIONW*)hdr; http_session_t *ses = (http_session_t*)hdr;
switch(option) { switch(option) {
case INTERNET_OPTION_USERNAME: case INTERNET_OPTION_USERNAME:
@ -4025,7 +4025,7 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
DWORD dwInternalFlags) DWORD dwInternalFlags)
{ {
LPWININETHTTPSESSIONW lpwhs = NULL; http_session_t *lpwhs = NULL;
HINTERNET handle = NULL; HINTERNET handle = NULL;
TRACE("-->\n"); TRACE("-->\n");
@ -4038,7 +4038,7 @@ HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
assert( hIC->hdr.htype == WH_HINIT ); assert( hIC->hdr.htype == WH_HINIT );
lpwhs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WININETHTTPSESSIONW)); lpwhs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(http_session_t));
if (NULL == lpwhs) if (NULL == lpwhs)
{ {
INTERNET_SetLastError(ERROR_OUTOFMEMORY); INTERNET_SetLastError(ERROR_OUTOFMEMORY);
@ -4122,7 +4122,7 @@ lerror:
static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr) static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
{ {
BOOL bSuccess = FALSE; BOOL bSuccess = FALSE;
LPWININETHTTPSESSIONW lpwhs; http_session_t *lpwhs;
LPWININETAPPINFOW hIC = NULL; LPWININETAPPINFOW hIC = NULL;
char szaddr[INET6_ADDRSTRLEN]; char szaddr[INET6_ADDRSTRLEN];
const void *addr; const void *addr;

View File

@ -167,7 +167,7 @@ typedef struct
INTERNET_PORT nServerPort; /* the port of the server we directly connect to */ INTERNET_PORT nServerPort; /* the port of the server we directly connect to */
struct sockaddr_storage socketAddress; struct sockaddr_storage socketAddress;
socklen_t sa_len; socklen_t sa_len;
} WININETHTTPSESSIONW, *LPWININETHTTPSESSIONW; } http_session_t;
#define HDR_ISREQUEST 0x0001 #define HDR_ISREQUEST 0x0001
#define HDR_COMMADELIMITED 0x0002 #define HDR_COMMADELIMITED 0x0002
@ -189,7 +189,7 @@ typedef struct gzip_stream_t gzip_stream_t;
typedef struct typedef struct
{ {
object_header_t hdr; object_header_t hdr;
WININETHTTPSESSIONW *lpHttpSession; http_session_t *lpHttpSession;
LPWSTR lpszPath; LPWSTR lpszPath;
LPWSTR lpszVerb; LPWSTR lpszVerb;
LPWSTR lpszRawHeaders; LPWSTR lpszRawHeaders;
@ -393,7 +393,7 @@ LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen);
BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength, DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength,
DWORD dwContentLength, BOOL bEndRequest); DWORD dwContentLength, BOOL bEndRequest);
INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(http_session_t *session,
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion, LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes, LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD_PTR dwContext); DWORD dwFlags, DWORD_PTR dwContext);