wininet: Get rid of ASYNC_FUNC enum.

This commit is contained in:
Jacek Caban 2006-12-25 21:37:00 +01:00 committed by Alexandre Julliard
parent f08ff892be
commit 49f5ee746c
5 changed files with 2 additions and 28 deletions

View File

@ -214,7 +214,6 @@ BOOL WINAPI FtpPutFileW(HINTERNET hConnect, LPCWSTR lpszLocalFile,
WORKREQUEST workRequest;
struct WORKREQ_FTPPUTFILEW *req = &workRequest.u.FtpPutFileW;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpPutFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req->lpszLocalFile = WININET_strdupW(lpszLocalFile);
@ -390,7 +389,6 @@ BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
WORKREQUEST workRequest;
struct WORKREQ_FTPSETCURRENTDIRECTORYW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpSetCurrentDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpSetCurrentDirectoryW;
@ -529,7 +527,6 @@ BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
WORKREQUEST workRequest;
struct WORKREQ_FTPCREATEDIRECTORYW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpCreateDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpCreateDirectoryW;
@ -675,7 +672,6 @@ HINTERNET WINAPI FtpFindFirstFileW(HINTERNET hConnect,
WORKREQUEST workRequest;
struct WORKREQ_FTPFINDFIRSTFILEW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpFindFirstFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpFindFirstFileW;
@ -868,7 +864,6 @@ BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDir
WORKREQUEST workRequest;
struct WORKREQ_FTPGETCURRENTDIRECTORYW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpGetCurrentDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpGetCurrentDirectoryW;
@ -1043,7 +1038,6 @@ HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
WORKREQUEST workRequest;
struct WORKREQ_FTPOPENFILEW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpOpenFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpOpenFileW;
@ -1238,7 +1232,6 @@ BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lps
WORKREQUEST workRequest;
struct WORKREQ_FTPGETFILEW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpGetFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpGetFileW;
@ -1418,7 +1411,6 @@ BOOL WINAPI FtpDeleteFileW(HINTERNET hFtpSession, LPCWSTR lpszFileName)
WORKREQUEST workRequest;
struct WORKREQ_FTPDELETEFILEW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpDeleteFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpDeleteFileW;
@ -1549,7 +1541,6 @@ BOOL WINAPI FtpRemoveDirectoryW(HINTERNET hFtpSession, LPCWSTR lpszDirectory)
WORKREQUEST workRequest;
struct WORKREQ_FTPREMOVEDIRECTORYW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpRemoveDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpRemoveDirectoryW;
@ -1685,7 +1676,6 @@ BOOL WINAPI FtpRenameFileW(HINTERNET hFtpSession, LPCWSTR lpszSrc, LPCWSTR lpszD
WORKREQUEST workRequest;
struct WORKREQ_FTPRENAMEFILEW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpRenameFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpRenameFileW;

View File

@ -1792,7 +1792,6 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
WORKREQUEST workRequest;
struct WORKREQ_HTTPSENDREQUESTW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncHttpSendRequestProc;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW;
@ -1888,7 +1887,6 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
WORKREQUEST workRequest;
struct WORKREQ_HTTPSENDREQUESTW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncHttpSendRequestProc;
workRequest.hdr = WININET_AddRef( &lpwhr->hdr );
req = &workRequest.u.HttpSendRequestW;

View File

@ -947,7 +947,6 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData)
WORKREQUEST workRequest;
struct WORKREQ_FTPFINDNEXTW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpFindNextFileProc;
workRequest.hdr = WININET_AddRef( &lpwh->hdr );
req = &workRequest.u.FtpFindNextW;
@ -1866,7 +1865,6 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu
WORKREQUEST workRequest;
struct WORKREQ_INTERNETREADFILEEXA *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncInternetReadFileExProc;
workRequest.hdr = WININET_AddRef( lpwh );
req = &workRequest.u.InternetReadFileExA;
@ -2940,7 +2938,6 @@ HINTERNET WINAPI InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
WORKREQUEST workRequest;
struct WORKREQ_INTERNETOPENURLW *req;
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncInternetOpenUrlProc;
workRequest.hdr = WININET_AddRef( &hIC->hdr );
req = &workRequest.u.InternetOpenUrlW;
@ -3248,12 +3245,8 @@ static VOID INTERNET_ExecuteWork(void)
if (!INTERNET_GetWorkRequest(&workRequest))
return;
switch (workRequest.asyncall)
{
case CALLASYNCPROC:
workRequest.asyncproc(&workRequest);
break;
}
workRequest.asyncproc(&workRequest);
WININET_Release( workRequest.hdr );
}

View File

@ -247,11 +247,6 @@ typedef struct
LPFILEPROPERTIESW lpafp;
} WININETFTPFINDNEXTW, *LPWININETFTPFINDNEXTW;
typedef enum
{
CALLASYNCPROC,
} ASYNC_FUNC;
struct WORKREQ_FTPPUTFILEW
{
LPWSTR lpszLocalFile;
@ -358,7 +353,6 @@ struct WORKREQ_INTERNETREADFILEEXA
typedef struct WORKREQ
{
ASYNC_FUNC asyncall;
void (*asyncproc)(struct WORKREQ*);
WININETHANDLEHEADER *hdr;

View File

@ -293,7 +293,6 @@ VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength);
}
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = SendAsyncCallbackProc;
workRequest.hdr = WININET_AddRef( hdr );
req = &workRequest.u.SendCallback;