Commit aeef9b4f authored by Jaco Greeff's avatar Jaco Greeff Committed by Alexandre Julliard

- Implementation of [Internet|Ftp]*W functions to extend (almost)

non-existant wide-character support. - Moved some functions from "stub in wininet.spec" to "FIXME("STUB")" to allow for testing of changes.
parent c36d63f4
......@@ -7,6 +7,7 @@
* Noureddine Jemmali
*
* Copyright 2000 Andreas Mohr
* Copyright 2002 Jaco Greeff
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -43,6 +44,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "wininet.h"
#include "winnls.h"
#include "winerror.h"
#include "wine/debug.h"
......@@ -302,6 +304,33 @@ BOOL WINAPI FtpSetCurrentDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
/***********************************************************************
* FtpSetCurrentDirectoryW (WININET.@)
*
* Change the working directory on the FTP server
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI FtpSetCurrentDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
{
CHAR *szDir;
INT len;
BOOL rc;
len = lstrlenW(lpszDirectory)+1;
if (!(szDir = (CHAR *)malloc(len*sizeof(CHAR))))
return FALSE;
WideCharToMultiByte(CP_ACP, -1, lpszDirectory, -1, szDir, len, NULL, NULL);
rc = FtpSetCurrentDirectoryA(hConnect, szDir);
free(szDir);
return rc;
}
/***********************************************************************
* FTP_FtpSetCurrentDirectoryA (Internal)
*
* Change the working directory on the FTP server
......@@ -399,6 +428,33 @@ BOOL WINAPI FtpCreateDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory)
/***********************************************************************
* FtpCreateDirectoryW (WININET.@)
*
* Create new directory on the FTP server
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory)
{
CHAR *szDir;
INT len;
BOOL rc;
len = lstrlenW(lpszDirectory)+1;
if (!(szDir = (CHAR *)malloc(len*sizeof(CHAR))))
return FALSE;
WideCharToMultiByte(CP_ACP, -1, lpszDirectory, -1, szDir, len, NULL, NULL);
rc = FtpCreateDirectoryA(hConnect, szDir);
free(szDir);
return rc;
}
/***********************************************************************
* FTP_FtpCreateDirectoryA (Internal)
*
* Create new directory on the FTP server
......@@ -500,6 +556,24 @@ HINTERNET WINAPI FtpFindFirstFileA(HINTERNET hConnect,
/***********************************************************************
* FtpFindFirstFileA (WININET.@)
*
* Search the specified directory
*
* RETURNS
* HINTERNET on success
* NULL on failure
*
*/
HINTERNET WINAPI FtpFindFirstFileW(HINTERNET hConnect,
LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD dwContext)
{
FIXME("STUB\n");
return NULL;
}
/***********************************************************************
* FTP_FtpFindFirstFileA (Internal)
*
* Search the specified directory
......@@ -604,7 +678,7 @@ lend:
*
*/
BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory,
LPDWORD lpdwCurrentDirectory)
LPDWORD lpdwCurrentDirectory)
{
LPWININETFTPSESSIONA lpwfs = (LPWININETFTPSESSIONA) hFtpSession;
LPWININETAPPINFOA hIC = NULL;
......@@ -638,6 +712,24 @@ BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDire
/***********************************************************************
* FtpGetCurrentDirectoryW (WININET.@)
*
* Retrieves the current directory
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDirectory,
LPDWORD lpdwCurrentDirectory)
{
FIXME("STUB\n");
return FALSE;
}
/***********************************************************************
* FTP_FtpGetCurrentDirectoryA (Internal)
*
* Retrieves the current directory
......@@ -728,8 +820,8 @@ lend:
*
*/
HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession,
LPCSTR lpszFileName, DWORD fdwAccess, DWORD dwFlags,
DWORD dwContext)
LPCSTR lpszFileName, DWORD fdwAccess, DWORD dwFlags,
DWORD dwContext)
{
LPWININETFTPSESSIONA lpwfs = (LPWININETFTPSESSIONA) hFtpSession;
LPWININETAPPINFOA hIC = NULL;
......@@ -763,6 +855,25 @@ HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession,
/***********************************************************************
* FtpOpenFileW (WININET.@)
*
* Open a remote file for writing or reading
*
* RETURNS
* HINTERNET handle on success
* NULL on failure
*
*/
HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
LPCWSTR lpszFileName, DWORD fdwAccess, DWORD dwFlags,
DWORD dwContext)
{
FIXME("STUB\n");
return NULL;
}
/***********************************************************************
* FTP_FtpOpenFileA (Internal)
*
* Open a remote file for writing or reading
......@@ -852,8 +963,8 @@ HINTERNET FTP_FtpOpenFileA(HINTERNET hFtpSession,
*
*/
BOOL WINAPI FtpGetFileA(HINTERNET hInternet, LPCSTR lpszRemoteFile, LPCSTR lpszNewFile,
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
DWORD dwContext)
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
DWORD dwContext)
{
LPWININETFTPSESSIONA lpwfs = (LPWININETFTPSESSIONA) hInternet;
LPWININETAPPINFOA hIC = NULL;
......@@ -889,6 +1000,25 @@ BOOL WINAPI FtpGetFileA(HINTERNET hInternet, LPCSTR lpszRemoteFile, LPCSTR lpszN
/***********************************************************************
* FtpGetFileW (WININET.@)
*
* Retrieve file from the FTP server
*
* RETURNS
* TRUE on success
* FALSE on failure
*
*/
BOOL WINAPI FtpGetFileW(HINTERNET hInternet, LPCWSTR lpszRemoteFile, LPCWSTR lpszNewFile,
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
DWORD dwContext)
{
FIXME("STUB\n");
return FALSE;
}
/***********************************************************************
* FTP_FtpGetFileA (Internal)
*
* Retrieve file from the FTP server
......
init WININET_LibMain
@ stub InternetInitializeAutoProxyDll
@ stdcall InternetInitializeAutoProxyDll(long) InternetInitializeAutoProxyDll
@ stub ShowCertificate
@ stdcall CommitUrlCacheEntryA(str str long long long str long str str) CommitUrlCacheEntryA
@ stub CommitUrlCacheEntryW
......@@ -30,18 +30,18 @@ init WININET_LibMain
@ stub FindNextUrlCacheEntryW
@ stub FreeUrlCacheSpaceA
@ stub FreeUrlCacheSpaceW
@ stdcall FtpCreateDirectoryA(ptr str) FtpCreateDirectoryA
@ stub FtpCreateDirectoryW
@ stdcall FtpCreateDirectoryA(ptr str) FtpCreateDirectoryA
@ stdcall FtpCreateDirectoryW(ptr wstr) FtpCreateDirectoryW
@ stdcall FtpDeleteFileA(ptr str) FtpDeleteFileA
@ stub FtpDeleteFileW
@ stdcall FtpFindFirstFileA(ptr str str long long) FtpFindFirstFileA
@ stub FtpFindFirstFileW
@ stdcall FtpFindFirstFileW(ptr wstr wstr long long) FtpFindFirstFileW
@ stdcall FtpGetCurrentDirectoryA(ptr str ptr) FtpGetCurrentDirectoryA
@ stub FtpGetCurrentDirectoryW
@ stdcall FtpGetCurrentDirectoryW(ptr wstr ptr) FtpGetCurrentDirectoryW
@ stdcall FtpGetFileA(ptr str str long long long long) FtpGetFileA
@ stub FtpGetFileW
@ stdcall FtpGetFileW(ptr wstr wstr long long long long) FtpGetFileW
@ stdcall FtpOpenFileA(ptr str long long long) FtpOpenFileA
@ stub FtpOpenFileW
@ stdcall FtpOpenFileW(ptr wstr long long long) FtpOpenFileW
@ stdcall FtpPutFileA(ptr str str long long) FtpPutFileA
@ stub FtpPutFileW
@ stdcall FtpRemoveDirectoryA(ptr str) FtpRemoveDirectoryA
......@@ -49,7 +49,7 @@ init WININET_LibMain
@ stdcall FtpRenameFileA(ptr str str) FtpRenameFileA
@ stub FtpRenameFileW
@ stdcall FtpSetCurrentDirectoryA(ptr str) FtpSetCurrentDirectoryA
@ stub FtpSetCurrentDirectoryW
@ stdcall FtpSetCurrentDirectoryW(ptr wstr) FtpSetCurrentDirectoryW
@ stub GetUrlCacheConfigInfoA
@ stub GetUrlCacheConfigInfoW
@ stdcall GetUrlCacheEntryInfoA(str ptr long) GetUrlCacheEntryInfoA
......@@ -83,17 +83,17 @@ init WININET_LibMain
@ stdcall InternetAttemptConnect(long) InternetAttemptConnect
@ stdcall InternetAutodial(long ptr) InternetAutoDial
@ stub InternetAutodialCallback
@ stub InternetAutodialHangup
@ stdcall InternetAutodialHangup(long) InternetAutodialHangup
@ stdcall InternetCanonicalizeUrlA(str str ptr long) InternetCanonicalizeUrlA
@ stub InternetCanonicalizeUrlW
@ stdcall InternetCanonicalizeUrlW(wstr wstr ptr long) InternetCanonicalizeUrlW
@ stdcall InternetCheckConnectionA(ptr long long) InternetCheckConnectionA
@ stub InternetCheckConnectionW
@ stdcall InternetCheckConnectionW(ptr long long) InternetCheckConnectionW
@ stdcall InternetCloseHandle(long) InternetCloseHandle
@ stub InternetCombineUrlA
@ stub InternetCombineUrlW
@ stub InternetConfirmZoneCrossing
@ stdcall InternetConnectA(ptr str long str str long long long) InternetConnectA
@ stub InternetConnectW
@ stdcall InternetConnectW(ptr wstr long wstr wstr long long long) InternetConnectW
@ stdcall InternetCrackUrlA(str long long ptr) InternetCrackUrlA
@ stub InternetCrackUrlW
@ stub InternetCreateUrlA
......@@ -106,17 +106,17 @@ init WININET_LibMain
@ stub InternetGetCertByURL
@ stdcall InternetGetConnectedState(ptr long) InternetGetConnectedState
@ stdcall InternetGetCookieA(str str ptr long) InternetGetCookieA
@ stub InternetGetCookieW
@ stdcall InternetGetCookieW(wstr wstr ptr long) InternetGetCookieW
@ stdcall InternetGetLastResponseInfoA(ptr str ptr) InternetGetLastResponseInfoA
@ stub InternetGetLastResponseInfoW
@ stub InternetGoOnline
@ stub InternetHangUp
@ stdcall InternetLockRequestFile(ptr ptr) InternetLockRequestFile
@ stdcall InternetOpenA(str long str str long) InternetOpenA
@ stdcall InternetOpenW(wstr long wstr wstr long) InternetOpenW
@ stub InternetOpenServerPushParse
@ stdcall InternetOpenUrlA(ptr str str long long long) InternetOpenUrlA
@ stub InternetOpenUrlW
@ stub InternetOpenW
@ stdcall InternetOpenUrlW(ptr wstr wstr long long long) InternetOpenUrlW
@ stdcall InternetQueryDataAvailable(ptr ptr long long) InternetQueryDataAvailable
@ stdcall InternetQueryOptionA(ptr long ptr ptr) InternetQueryOptionA
@ stub InternetQueryOptionW
......@@ -125,7 +125,7 @@ init WININET_LibMain
@ stdcall InternetReadFileExW(ptr ptr long long) InternetReadFileExW
@ stub InternetServerPushParse
@ stdcall InternetSetCookieA(str str str) InternetSetCookieA
@ stub InternetSetCookieW
@ stdcall InternetSetCookieW(wstr wstr wstr) InternetSetCookieW
@ stub InternetSetDialState
@ stub InternetSetFilePointer
@ stdcall InternetSetOptionA(ptr long ptr long) InternetSetOptionA
......
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