wininet: Make HTTP_HttpOpenRequestW static and avoid forward its declaration.
This commit is contained in:
parent
b01d58428b
commit
47c71fcd0a
|
@ -1176,60 +1176,6 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
|
|||
return rc;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* HttpOpenRequestW (WININET.@)
|
||||
*
|
||||
* Open a HTTP request handle
|
||||
*
|
||||
* RETURNS
|
||||
* HINTERNET a HTTP request handle on success
|
||||
* NULL on failure
|
||||
*
|
||||
*/
|
||||
HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession,
|
||||
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
|
||||
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
|
||||
DWORD dwFlags, DWORD_PTR dwContext)
|
||||
{
|
||||
http_session_t *lpwhs;
|
||||
HINTERNET handle = NULL;
|
||||
|
||||
TRACE("(%p, %s, %s, %s, %s, %p, %08x, %08lx)\n", hHttpSession,
|
||||
debugstr_w(lpszVerb), debugstr_w(lpszObjectName),
|
||||
debugstr_w(lpszVersion), debugstr_w(lpszReferrer), lpszAcceptTypes,
|
||||
dwFlags, dwContext);
|
||||
if(lpszAcceptTypes!=NULL)
|
||||
{
|
||||
int i;
|
||||
for(i=0;lpszAcceptTypes[i]!=NULL;i++)
|
||||
TRACE("\taccept type: %s\n",debugstr_w(lpszAcceptTypes[i]));
|
||||
}
|
||||
|
||||
lpwhs = (http_session_t*) WININET_GetObject( hHttpSession );
|
||||
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
|
||||
{
|
||||
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
||||
goto lend;
|
||||
}
|
||||
|
||||
/*
|
||||
* My tests seem to show that the windows version does not
|
||||
* become asynchronous until after this point. And anyhow
|
||||
* if this call was asynchronous then how would you get the
|
||||
* necessary HINTERNET pointer returned by this function.
|
||||
*
|
||||
*/
|
||||
handle = HTTP_HttpOpenRequestW(lpwhs, lpszVerb, lpszObjectName,
|
||||
lpszVersion, lpszReferrer, lpszAcceptTypes,
|
||||
dwFlags, dwContext);
|
||||
lend:
|
||||
if( lpwhs )
|
||||
WININET_Release( &lpwhs->hdr );
|
||||
TRACE("returning %p\n", handle);
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* HttpOpenRequestA (WININET.@)
|
||||
*
|
||||
|
@ -2584,7 +2530,7 @@ static const object_vtbl_t HTTPREQVtbl = {
|
|||
* NULL on failure
|
||||
*
|
||||
*/
|
||||
HINTERNET WINAPI HTTP_HttpOpenRequestW(http_session_t *lpwhs,
|
||||
static HINTERNET WINAPI HTTP_HttpOpenRequestW(http_session_t *lpwhs,
|
||||
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
|
||||
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
|
||||
DWORD dwFlags, DWORD_PTR dwContext)
|
||||
|
@ -2722,6 +2668,59 @@ lend:
|
|||
return handle;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* HttpOpenRequestW (WININET.@)
|
||||
*
|
||||
* Open a HTTP request handle
|
||||
*
|
||||
* RETURNS
|
||||
* HINTERNET a HTTP request handle on success
|
||||
* NULL on failure
|
||||
*
|
||||
*/
|
||||
HINTERNET WINAPI HttpOpenRequestW(HINTERNET hHttpSession,
|
||||
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
|
||||
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
|
||||
DWORD dwFlags, DWORD_PTR dwContext)
|
||||
{
|
||||
http_session_t *lpwhs;
|
||||
HINTERNET handle = NULL;
|
||||
|
||||
TRACE("(%p, %s, %s, %s, %s, %p, %08x, %08lx)\n", hHttpSession,
|
||||
debugstr_w(lpszVerb), debugstr_w(lpszObjectName),
|
||||
debugstr_w(lpszVersion), debugstr_w(lpszReferrer), lpszAcceptTypes,
|
||||
dwFlags, dwContext);
|
||||
if(lpszAcceptTypes!=NULL)
|
||||
{
|
||||
int i;
|
||||
for(i=0;lpszAcceptTypes[i]!=NULL;i++)
|
||||
TRACE("\taccept type: %s\n",debugstr_w(lpszAcceptTypes[i]));
|
||||
}
|
||||
|
||||
lpwhs = (http_session_t*) WININET_GetObject( hHttpSession );
|
||||
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
|
||||
{
|
||||
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
||||
goto lend;
|
||||
}
|
||||
|
||||
/*
|
||||
* My tests seem to show that the windows version does not
|
||||
* become asynchronous until after this point. And anyhow
|
||||
* if this call was asynchronous then how would you get the
|
||||
* necessary HINTERNET pointer returned by this function.
|
||||
*
|
||||
*/
|
||||
handle = HTTP_HttpOpenRequestW(lpwhs, lpszVerb, lpszObjectName,
|
||||
lpszVersion, lpszReferrer, lpszAcceptTypes,
|
||||
dwFlags, dwContext);
|
||||
lend:
|
||||
if( lpwhs )
|
||||
WININET_Release( &lpwhs->hdr );
|
||||
TRACE("returning %p\n", handle);
|
||||
return handle;
|
||||
}
|
||||
|
||||
/* read any content returned by the server so that the connection can be
|
||||
* reused */
|
||||
static void HTTP_DrainContent(http_request_t *req)
|
||||
|
|
|
@ -414,10 +414,6 @@ LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen);
|
|||
BOOLAPI HTTP_HttpSendRequestW(http_request_t *req, LPCWSTR lpszHeaders,
|
||||
DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength,
|
||||
DWORD dwContentLength, BOOL bEndRequest);
|
||||
INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(http_session_t *session,
|
||||
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
|
||||
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
|
||||
DWORD dwFlags, DWORD_PTR dwContext);
|
||||
|
||||
VOID SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext,
|
||||
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
|
||||
|
|
Loading…
Reference in New Issue