Jacek Caban : wininet: Make HTTP_HttpOpenRequestW static and avoid forward its declaration.
Alexandre Julliard
julliard at winehq.org
Tue Dec 1 09:19:41 CST 2009
Module: wine
Branch: master
Commit: 47c71fcd0a465cad427ad5bbb56135f8ea98fd1b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=47c71fcd0a465cad427ad5bbb56135f8ea98fd1b
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Nov 30 20:00:28 2009 +0100
wininet: Make HTTP_HttpOpenRequestW static and avoid forward its declaration.
---
dlls/wininet/http.c | 109 +++++++++++++++++++++++------------------------
dlls/wininet/internet.h | 4 --
2 files changed, 54 insertions(+), 59 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 5c504d4..5309096 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1177,60 +1177,6 @@ BOOL WINAPI HttpEndRequestW(HINTERNET hRequest,
}
/***********************************************************************
- * 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.@)
*
* Open a HTTP request handle
@@ -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)
diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h
index b9612b2..a29cb45 100644
--- a/dlls/wininet/internet.h
+++ b/dlls/wininet/internet.h
@@ -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,
More information about the wine-cvs
mailing list