Commit 6d1601a8 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Rename WININETAPPINFOW to appinfo_t.

parent 34abacde
......@@ -64,7 +64,7 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{
http_request_t *lpwhr;
http_session_t *lpwhs = NULL;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
LPWSTR p;
lpwhr = (http_request_t*) WININET_GetObject( hRequest );
......@@ -205,7 +205,7 @@ static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
{
http_request_t *lpwhr;
http_session_t *lpwhs;
LPWININETAPPINFOW hIC;
appinfo_t *hIC;
LPWSTR p;
lpwhr = (http_request_t*) WININET_GetObject( hRequest );
......
......@@ -81,7 +81,7 @@ typedef struct
typedef struct _WININETFTPSESSIONW
{
object_header_t hdr;
WININETAPPINFOW *lpAppInfo;
appinfo_t *lpAppInfo;
int sndSocket;
int lstnSocket;
int pasvSocket; /* data socket connected by us in case of passive FTP */
......@@ -265,7 +265,7 @@ BOOL WINAPI FtpPutFileW(HINTERNET hConnect, LPCWSTR lpszLocalFile,
LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD_PTR dwContext)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
if (!lpszLocalFile || !lpszNewRemoteFile)
......@@ -341,7 +341,7 @@ static BOOL FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
{
HANDLE hFile;
BOOL bSuccess = FALSE;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
INT nResCode;
TRACE(" lpszLocalFile(%s) lpszNewRemoteFile(%s)\n", debugstr_w(lpszLocalFile), debugstr_w(lpszNewRemoteFile));
......@@ -444,7 +444,7 @@ static void AsyncFtpSetCurrentDirectoryProc(WORKREQUEST *workRequest)
BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
{
LPWININETFTPSESSIONW lpwfs = NULL;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
if (!lpszDirectory)
......@@ -507,7 +507,7 @@ lend:
static BOOL FTP_FtpSetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory)
{
INT nResCode;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
DWORD bSuccess = FALSE;
TRACE("lpszDirectory(%s)\n", debugstr_w(lpszDirectory));
......@@ -590,7 +590,7 @@ static void AsyncFtpCreateDirectoryProc(WORKREQUEST *workRequest)
BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hConnect );
......@@ -656,7 +656,7 @@ static BOOL FTP_FtpCreateDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDire
{
INT nResCode;
BOOL bSuccess = FALSE;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
TRACE("lpszDirectory(%s)\n", debugstr_w(lpszDirectory));
......@@ -746,7 +746,7 @@ HINTERNET WINAPI FtpFindFirstFileW(HINTERNET hConnect,
LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD_PTR dwContext)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
HINTERNET r = NULL;
lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hConnect );
......@@ -806,7 +806,7 @@ static HINTERNET FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs,
LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD_PTR dwContext)
{
INT nResCode;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
HINTERNET hFindNext = NULL;
TRACE("\n");
......@@ -939,7 +939,7 @@ BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDir
LPDWORD lpdwCurrentDirectory)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
TRACE("%p %p %p\n", hFtpSession, lpszCurrentDirectory, lpdwCurrentDirectory);
......@@ -1017,7 +1017,7 @@ static BOOL FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszC
LPDWORD lpdwCurrentDirectory)
{
INT nResCode;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
DWORD bSuccess = FALSE;
/* Clear any error information */
......@@ -1260,7 +1260,7 @@ HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs,
INT nDataSocket;
BOOL bSuccess = FALSE;
LPWININETFTPFILE lpwh = NULL;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
HINTERNET handle = NULL;
TRACE("\n");
......@@ -1389,7 +1389,7 @@ HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
DWORD_PTR dwContext)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
HINTERNET r = NULL;
TRACE("(%p,%s,0x%08x,0x%08x,0x%08lx)\n", hFtpSession,
......@@ -1509,7 +1509,7 @@ BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lps
DWORD_PTR dwContext)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
if (!lpszRemoteFile || !lpszNewFile)
......@@ -1590,7 +1590,7 @@ static BOOL FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile,
{
BOOL bSuccess = FALSE;
HANDLE hFile;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
TRACE("lpszRemoteFile(%s) lpszNewFile(%s)\n", debugstr_w(lpszRemoteFile), debugstr_w(lpszNewFile));
......@@ -1706,7 +1706,7 @@ static void AsyncFtpDeleteFileProc(WORKREQUEST *workRequest)
BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hFtpSession );
......@@ -1772,7 +1772,7 @@ BOOL FTP_FtpDeleteFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName)
{
INT nResCode;
BOOL bSuccess = FALSE;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
TRACE("%p\n", lpwfs);
......@@ -1851,7 +1851,7 @@ static void AsyncFtpRemoveDirectoryProc(WORKREQUEST *workRequest)
BOOL WINAPI FtpRemoveDirectoryW(HINTERNET hFtpSession, LPCWSTR lpszDirectory)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hFtpSession );
......@@ -1917,7 +1917,7 @@ BOOL FTP_FtpRemoveDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory)
{
INT nResCode;
BOOL bSuccess = FALSE;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
TRACE("\n");
......@@ -2001,7 +2001,7 @@ static void AsyncFtpRenameFileProc(WORKREQUEST *workRequest)
BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszDest)
{
LPWININETFTPSESSIONW lpwfs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r = FALSE;
lpwfs = (LPWININETFTPSESSIONW) WININET_GetObject( hFtpSession );
......@@ -2069,7 +2069,7 @@ BOOL FTP_FtpRenameFileW( LPWININETFTPSESSIONW lpwfs,
{
INT nResCode;
BOOL bSuccess = FALSE;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
TRACE("\n");
......@@ -2322,7 +2322,7 @@ static const object_vtbl_t FTPSESSIONVtbl = {
*
*/
HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
DWORD dwInternalFlags)
......
......@@ -1409,8 +1409,7 @@ static WCHAR *HTTP_BuildProxyRequestUrl(http_request_t *req)
/***********************************************************************
* HTTP_DealWithProxy
*/
static BOOL HTTP_DealWithProxy( LPWININETAPPINFOW hIC,
http_session_t *lpwhs, http_request_t *lpwhr)
static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *lpwhs, http_request_t *lpwhr)
{
WCHAR buf[MAXHOSTNAME];
WCHAR proxy[MAXHOSTNAME + 15]; /* 15 == "http://" + sizeof(port#) + ":/\0" */
......@@ -2396,7 +2395,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(http_session_t *lpwhs,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD_PTR dwContext)
{
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
http_request_t *lpwhr;
LPWSTR lpszHostName = NULL;
HINTERNET handle = NULL;
......@@ -3134,7 +3133,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
BOOL ret = FALSE;
http_request_t *lpwhr;
http_session_t *lpwhs;
LPWININETAPPINFOW hIC;
appinfo_t *hIC;
TRACE("(%p, %p, %p, %08x, %08lx)\n", hRequest, lpBuffersIn,
lpBuffersOut, dwFlags, dwContext);
......@@ -3222,7 +3221,7 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
{
http_request_t *lpwhr;
http_session_t *lpwhs = NULL;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
BOOL r;
TRACE("%p, %s, %i, %p, %i)\n", hHttpRequest,
......@@ -3392,7 +3391,7 @@ static LPWSTR HTTP_GetRedirectURL(http_request_t *lpwhr, LPCWSTR lpszUrl)
static BOOL HTTP_HandleRedirect(http_request_t *lpwhr, LPCWSTR lpszUrl)
{
http_session_t *lpwhs = lpwhr->lpHttpSession;
LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
appinfo_t *hIC = lpwhs->lpAppInfo;
BOOL using_proxy = hIC->lpszProxy && hIC->lpszProxy[0];
WCHAR path[INTERNET_MAX_URL_LENGTH];
int index;
......@@ -4019,7 +4018,7 @@ static const object_vtbl_t HTTPSESSIONVtbl = {
* NULL on failure
*
*/
HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
HINTERNET HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
DWORD dwInternalFlags)
......@@ -4122,7 +4121,7 @@ static BOOL HTTP_OpenConnection(http_request_t *lpwhr)
{
BOOL bSuccess = FALSE;
http_session_t *lpwhs;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
char szaddr[INET6_ADDRSTRLEN];
const void *addr;
......
......@@ -348,7 +348,7 @@ BOOL WINAPI DetectAutoProxyUrl(LPSTR lpszAutoProxyUrl,
* The proxy may be specified in the form 'http=proxy.my.org'
* Presumably that means there can be ftp=ftpproxy.my.org too.
*/
static BOOL INTERNET_ConfigureProxy( LPWININETAPPINFOW lpwai )
static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai )
{
HKEY key;
DWORD type, len, enabled = 0;
......@@ -489,7 +489,7 @@ static void dump_INTERNET_FLAGS(DWORD dwFlags)
*/
static VOID APPINFO_Destroy(object_header_t *hdr)
{
LPWININETAPPINFOW lpwai = (LPWININETAPPINFOW) hdr;
appinfo_t *lpwai = (appinfo_t*)hdr;
TRACE("%p\n",lpwai);
......@@ -503,7 +503,7 @@ static VOID APPINFO_Destroy(object_header_t *hdr)
static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
{
LPWININETAPPINFOW ai = (LPWININETAPPINFOW)hdr;
appinfo_t *ai = (appinfo_t*)hdr;
switch(option) {
case INTERNET_OPTION_HANDLE_TYPE:
......@@ -639,7 +639,7 @@ static const object_vtbl_t APPINFOVtbl = {
HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType,
LPCWSTR lpszProxy, LPCWSTR lpszProxyBypass, DWORD dwFlags)
{
LPWININETAPPINFOW lpwai = NULL;
appinfo_t *lpwai = NULL;
HINTERNET handle = NULL;
if (TRACE_ON(wininet)) {
......@@ -670,7 +670,7 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType,
/* Clear any error information */
INTERNET_SetLastError(0);
lpwai = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WININETAPPINFOW));
lpwai = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(appinfo_t));
if (NULL == lpwai)
{
INTERNET_SetLastError(ERROR_OUTOFMEMORY);
......@@ -962,7 +962,7 @@ HINTERNET WINAPI InternetConnectW(HINTERNET hInternet,
LPCWSTR lpszUserName, LPCWSTR lpszPassword,
DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext)
{
LPWININETAPPINFOW hIC;
appinfo_t *hIC;
HINTERNET rc = NULL;
TRACE("(%p, %s, %i, %s, %s, %i, %i, %lx)\n", hInternet, debugstr_w(lpszServerName),
......@@ -977,7 +977,7 @@ HINTERNET WINAPI InternetConnectW(HINTERNET hInternet,
/* Clear any error information */
INTERNET_SetLastError(0);
hIC = (LPWININETAPPINFOW) WININET_GetObject( hInternet );
hIC = (appinfo_t*)WININET_GetObject( hInternet );
if ( (hIC == NULL) || (hIC->hdr.htype != WH_HINIT) )
{
INTERNET_SetLastError(ERROR_INVALID_HANDLE);
......@@ -2066,7 +2066,6 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode)
return ERROR_SUCCESS;
case INTERNET_OPTION_CONNECTED_STATE:
if (warn) {
FIXME("INTERNET_OPTION_CONNECTED_STATE: semi-stub\n");
warn = FALSE;
......@@ -2080,10 +2079,10 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode)
return ERROR_SUCCESS;
case INTERNET_OPTION_PROXY: {
WININETAPPINFOW ai;
appinfo_t ai;
TRACE("Getting global proxy info\n");
memset(&ai, 0, sizeof(WININETAPPINFOW));
memset(&ai, 0, sizeof(appinfo_t));
INTERNET_ConfigureProxy(&ai);
return APPINFO_QueryOption(&ai.hdr, INTERNET_OPTION_PROXY, buffer, size, unicode); /* FIXME */
......@@ -2830,7 +2829,7 @@ BOOL WINAPI InternetCheckConnectionA(LPCSTR lpszUrl, DWORD dwFlags, DWORD dwRese
* RETURNS
* handle of connection or NULL on failure
*/
static HINTERNET INTERNET_InternetOpenUrlW(LPWININETAPPINFOW hIC, LPCWSTR lpszUrl,
static HINTERNET INTERNET_InternetOpenUrlW(appinfo_t *hIC, LPCWSTR lpszUrl,
LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD_PTR dwContext)
{
URL_COMPONENTSW urlComponents;
......@@ -2942,7 +2941,7 @@ static HINTERNET INTERNET_InternetOpenUrlW(LPWININETAPPINFOW hIC, LPCWSTR lpszUr
static void AsyncInternetOpenUrlProc(WORKREQUEST *workRequest)
{
struct WORKREQ_INTERNETOPENURLW const *req = &workRequest->u.InternetOpenUrlW;
LPWININETAPPINFOW hIC = (LPWININETAPPINFOW) workRequest->hdr;
appinfo_t *hIC = (appinfo_t*) workRequest->hdr;
TRACE("%p\n", hIC);
......@@ -2956,7 +2955,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD_PTR dwContext)
{
HINTERNET ret = NULL;
LPWININETAPPINFOW hIC = NULL;
appinfo_t *hIC = NULL;
if (TRACE_ON(wininet)) {
TRACE("(%p, %s, %s, %08x, %08x, %08lx)\n", hInternet, debugstr_w(lpszUrl), debugstr_w(lpszHeaders),
......@@ -2971,7 +2970,7 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
goto lend;
}
hIC = (LPWININETAPPINFOW) WININET_GetObject( hInternet );
hIC = (appinfo_t*)WININET_GetObject( hInternet );
if (NULL == hIC || hIC->hdr.htype != WH_HINIT) {
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
goto lend;
......
......@@ -152,13 +152,13 @@ typedef struct
LPWSTR lpszProxyUsername;
LPWSTR lpszProxyPassword;
DWORD dwAccessType;
} WININETAPPINFOW, *LPWININETAPPINFOW;
} appinfo_t;
typedef struct
{
object_header_t hdr;
WININETAPPINFOW *lpAppInfo;
appinfo_t *lpAppInfo;
LPWSTR lpszHostName; /* the final destination of the request */
LPWSTR lpszServerName; /* the name of the server we directly connect to */
LPWSTR lpszUserName;
......@@ -371,12 +371,12 @@ DWORD INET_QueryOption(DWORD,void*,DWORD*,BOOL);
time_t ConvertTimeString(LPCWSTR asctime);
HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
DWORD dwInternalFlags);
HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
HINTERNET HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
DWORD dwInternalFlags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment