Autosyncing with Wine HEAD

svn path=/trunk/; revision=30894
This commit is contained in:
The Wine Synchronizer 2007-11-29 12:52:01 +00:00
parent 0fd742014c
commit 45a4774b49
37 changed files with 3677 additions and 2104 deletions

View file

@ -17,7 +17,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h" #include "config.h"
@ -39,8 +39,6 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "internet.h" #include "internet.h"
#include "wine/list.h"
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */ #define RESPONSE_TIMEOUT 30 /* FROM internet.c */
@ -176,7 +174,7 @@ static cookie_domain *COOKIE_addDomain(LPCWSTR domain, LPCWSTR path)
return newDomain; return newDomain;
} }
static void COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen) static BOOL COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostNameLen, LPWSTR path, int pathLen)
{ {
URL_COMPONENTSW UrlComponents; URL_COMPONENTSW UrlComponents;
@ -186,10 +184,14 @@ static void COOKIE_crackUrlSimple(LPCWSTR lpszUrl, LPWSTR hostName, int hostName
UrlComponents.lpszUrlPath = path; UrlComponents.lpszUrlPath = path;
UrlComponents.lpszUserName = NULL; UrlComponents.lpszUserName = NULL;
UrlComponents.lpszHostName = hostName; UrlComponents.lpszHostName = hostName;
UrlComponents.dwExtraInfoLength = 0;
UrlComponents.dwPasswordLength = 0;
UrlComponents.dwSchemeLength = 0;
UrlComponents.dwUserNameLength = 0;
UrlComponents.dwHostNameLength = hostNameLen; UrlComponents.dwHostNameLength = hostNameLen;
UrlComponents.dwUrlPathLength = pathLen; UrlComponents.dwUrlPathLength = pathLen;
InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents); return InternetCrackUrlW(lpszUrl, 0, 0, &UrlComponents);
} }
/* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */ /* match a domain. domain must match if the domain is not NULL. path must match if the path is not NULL */
@ -256,15 +258,23 @@ static void COOKIE_deleteDomain(cookie_domain *deadDomain)
BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
LPWSTR lpCookieData, LPDWORD lpdwSize) LPWSTR lpCookieData, LPDWORD lpdwSize)
{ {
BOOL ret;
struct list * cursor; struct list * cursor;
int cnt = 0, domain_count = 0; unsigned int cnt = 0, domain_count = 0, cookie_count = 0;
int cookie_count = 0;
WCHAR hostName[2048], path[2048]; WCHAR hostName[2048], path[2048];
TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName), TRACE("(%s, %s, %p, %p)\n", debugstr_w(lpszUrl),debugstr_w(lpszCookieName),
lpCookieData, lpdwSize); lpCookieData, lpdwSize);
COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0])); if (!lpszUrl)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
hostName[0] = 0;
ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
if (!ret || !hostName[0]) return FALSE;
LIST_FOR_EACH(cursor, &domain_list) LIST_FOR_EACH(cursor, &domain_list)
{ {
@ -280,22 +290,29 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry); cookie *thisCookie = LIST_ENTRY(cursor, cookie, entry);
if (lpCookieData == NULL) /* return the size of the buffer required to lpdwSize */ if (lpCookieData == NULL) /* return the size of the buffer required to lpdwSize */
{ {
if (cookie_count != 0) unsigned int len;
cnt += 2; /* '; ' */
if (cookie_count) cnt += 2; /* '; ' */
cnt += strlenW(thisCookie->lpCookieName); cnt += strlenW(thisCookie->lpCookieName);
if ((len = strlenW(thisCookie->lpCookieData)))
{
cnt += 1; /* = */ cnt += 1; /* = */
cnt += strlenW(thisCookie->lpCookieData); cnt += len;
}
} }
else else
{ {
static const WCHAR szsc[] = { ';',' ',0 }; static const WCHAR szsc[] = { ';',' ',0 };
static const WCHAR szpseq[] = { '%','s','=','%','s',0 }; static const WCHAR szname[] = { '%','s',0 };
if (cookie_count != 0) static const WCHAR szdata[] = { '=','%','s',0 };
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szpseq, if (cookie_count) cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szsc);
thisCookie->lpCookieName, cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szname, thisCookie->lpCookieName);
thisCookie->lpCookieData);
TRACE("Cookie: %s=%s\n", debugstr_w(thisCookie->lpCookieName), debugstr_w(thisCookie->lpCookieData)); if (thisCookie->lpCookieData[0])
cnt += snprintfW(lpCookieData + cnt, *lpdwSize - cnt, szdata, thisCookie->lpCookieData);
TRACE("Cookie: %s\n", debugstr_w(lpCookieData));
} }
cookie_count++; cookie_count++;
} }
@ -311,15 +328,14 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
if (lpCookieData == NULL) if (lpCookieData == NULL)
{ {
cnt += 1; /* NULL */ *lpdwSize = (cnt + 1) * sizeof(WCHAR);
*lpdwSize = cnt*sizeof(WCHAR); TRACE("returning %u\n", *lpdwSize);
TRACE("returning\n");
return TRUE; return TRUE;
} }
*lpdwSize = (cnt + 1)*sizeof(WCHAR); *lpdwSize = cnt + 1;
TRACE("Returning %i (from %i domains): %s\n", cnt, domain_count, TRACE("Returning %u (from %u domains): %s\n", cnt, domain_count,
debugstr_w(lpCookieData)); debugstr_w(lpCookieData));
return (cnt ? TRUE : FALSE); return (cnt ? TRUE : FALSE);
@ -365,13 +381,17 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
{ {
szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); szCookieData = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
if( !szCookieData ) if( !szCookieData )
return FALSE; {
r = FALSE;
}
else
{
r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len ); r = InternetGetCookieW( szUrl, szCookieName, szCookieData, &len );
*lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len, *lpdwSize = WideCharToMultiByte( CP_ACP, 0, szCookieData, len,
lpCookieData, *lpdwSize, NULL, NULL ); lpCookieData, *lpdwSize, NULL, NULL );
} }
}
HeapFree( GetProcessHeap(), 0, szCookieData ); HeapFree( GetProcessHeap(), 0, szCookieData );
HeapFree( GetProcessHeap(), 0, szCookieName ); HeapFree( GetProcessHeap(), 0, szCookieName );
@ -380,6 +400,34 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
return r; return r;
} }
static BOOL set_cookie(LPCWSTR domain, LPCWSTR path, LPCWSTR cookie_name, LPCWSTR cookie_data)
{
cookie_domain *thisCookieDomain = NULL;
cookie *thisCookie;
struct list *cursor;
LIST_FOR_EACH(cursor, &domain_list)
{
thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry);
if (COOKIE_matchDomain(domain, NULL /* FIXME: path */, thisCookieDomain, FALSE))
break;
thisCookieDomain = NULL;
}
if (!thisCookieDomain)
thisCookieDomain = COOKIE_addDomain(domain, path);
if ((thisCookie = COOKIE_findCookie(thisCookieDomain, cookie_name)))
COOKIE_deleteCookie(thisCookie, FALSE);
TRACE("setting cookie %s=%s for domain %s\n", debugstr_w(cookie_name),
debugstr_w(cookie_data), debugstr_w(thisCookieDomain->lpCookieDomain));
if (!COOKIE_addCookie(thisCookieDomain, cookie_name, cookie_data))
return FALSE;
return TRUE;
}
/*********************************************************************** /***********************************************************************
* InternetSetCookieW (WININET.@) * InternetSetCookieW (WININET.@)
@ -394,64 +442,47 @@ BOOL WINAPI InternetGetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName, BOOL WINAPI InternetSetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
LPCWSTR lpCookieData) LPCWSTR lpCookieData)
{ {
cookie_domain *thisCookieDomain = NULL; BOOL ret;
cookie *thisCookie;
WCHAR hostName[2048], path[2048]; WCHAR hostName[2048], path[2048];
struct list * cursor;
TRACE("(%s,%s,%s)\n", debugstr_w(lpszUrl), TRACE("(%s,%s,%s)\n", debugstr_w(lpszUrl),
debugstr_w(lpszCookieName), debugstr_w(lpCookieData)); debugstr_w(lpszCookieName), debugstr_w(lpCookieData));
if (!lpCookieData || !strlenW(lpCookieData)) if (!lpszUrl || !lpCookieData)
{ {
TRACE("no cookie data, not adding\n"); SetLastError(ERROR_INVALID_PARAMETER);
return FALSE; return FALSE;
} }
hostName[0] = path[0] = 0;
ret = COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
if (!ret || !hostName[0]) return FALSE;
if (!lpszCookieName) if (!lpszCookieName)
{ {
/* some apps (or is it us??) try to add a cookie with no cookie name, but unsigned int len;
* the cookie data in the form of name=data. */ WCHAR *cookie, *data;
/* FIXME, probably a bug here, for now I don't care */
WCHAR *ourCookieName, *ourCookieData;
int ourCookieNameSize;
BOOL ret;
if (!(ourCookieData = strchrW(lpCookieData, '='))) len = strlenW(lpCookieData);
if (!(cookie = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR))))
{ {
TRACE("something terribly wrong with cookie data %s\n", SetLastError(ERROR_OUTOFMEMORY);
debugstr_w(ourCookieData));
return FALSE; return FALSE;
} }
ourCookieNameSize = ourCookieData - lpCookieData; strcpyW(cookie, lpCookieData);
ourCookieData += 1;
ourCookieName = HeapAlloc(GetProcessHeap(), 0, /* some apps (or is it us??) try to add a cookie with no cookie name, but
(ourCookieNameSize + 1)*sizeof(WCHAR)); * the cookie data in the form of name[=data].
memcpy(ourCookieName, ourCookieData, ourCookieNameSize * sizeof(WCHAR)); */
ourCookieName[ourCookieNameSize] = '\0'; if (!(data = strchrW(cookie, '='))) data = cookie + len;
TRACE("setting (hacked) cookie of %s, %s\n", else data++;
debugstr_w(ourCookieName), debugstr_w(ourCookieData));
ret = InternetSetCookieW(lpszUrl, ourCookieName, ourCookieData); ret = set_cookie(hostName, path, cookie, data);
HeapFree(GetProcessHeap(), 0, ourCookieName);
HeapFree(GetProcessHeap(), 0, cookie);
return ret; return ret;
} }
return set_cookie(hostName, path, lpszCookieName, lpCookieData);
COOKIE_crackUrlSimple(lpszUrl, hostName, sizeof(hostName)/sizeof(hostName[0]), path, sizeof(path)/sizeof(path[0]));
LIST_FOR_EACH(cursor, &domain_list)
{
thisCookieDomain = LIST_ENTRY(cursor, cookie_domain, entry);
if (COOKIE_matchDomain(hostName, NULL /* FIXME: path */, thisCookieDomain, FALSE))
break;
thisCookieDomain = NULL;
}
if (!thisCookieDomain)
thisCookieDomain = COOKIE_addDomain(hostName, path);
if ((thisCookie = COOKIE_findCookie(thisCookieDomain, lpszCookieName)))
COOKIE_deleteCookie(thisCookie, FALSE);
thisCookie = COOKIE_addCookie(thisCookieDomain, lpszCookieName, lpCookieData);
return TRUE;
} }
@ -513,7 +544,7 @@ BOOL WINAPI InternetSetCookieA(LPCSTR lpszUrl, LPCSTR lpszCookieName,
DWORD WINAPI InternetSetCookieExA( LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR lpszCookieData, DWORD WINAPI InternetSetCookieExA( LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR lpszCookieData,
DWORD dwFlags, DWORD_PTR dwReserved) DWORD dwFlags, DWORD_PTR dwReserved)
{ {
FIXME("(%s, %s, %s, 0x%08lx, 0x%08lx) stub\n", FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
debugstr_a(lpszURL), debugstr_a(lpszCookieName), debugstr_a(lpszCookieData), debugstr_a(lpszURL), debugstr_a(lpszCookieName), debugstr_a(lpszCookieData),
dwFlags, dwReserved); dwFlags, dwReserved);
return TRUE; return TRUE;
@ -532,7 +563,7 @@ DWORD WINAPI InternetSetCookieExA( LPCSTR lpszURL, LPCSTR lpszCookieName, LPCSTR
DWORD WINAPI InternetSetCookieExW( LPCWSTR lpszURL, LPCWSTR lpszCookieName, LPCWSTR lpszCookieData, DWORD WINAPI InternetSetCookieExW( LPCWSTR lpszURL, LPCWSTR lpszCookieName, LPCWSTR lpszCookieData,
DWORD dwFlags, DWORD_PTR dwReserved) DWORD dwFlags, DWORD_PTR dwReserved)
{ {
FIXME("(%s, %s, %s, 0x%08lx, 0x%08lx) stub\n", FIXME("(%s, %s, %s, 0x%08x, 0x%08lx) stub\n",
debugstr_w(lpszURL), debugstr_w(lpszCookieName), debugstr_w(lpszCookieData), debugstr_w(lpszURL), debugstr_w(lpszCookieName), debugstr_w(lpszCookieData),
dwFlags, dwReserved); dwFlags, dwReserved);
return TRUE; return TRUE;
@ -546,7 +577,7 @@ DWORD WINAPI InternetSetCookieExW( LPCWSTR lpszURL, LPCWSTR lpszCookieName, LPCW
BOOL WINAPI InternetGetCookieExA( LPCSTR pchURL, LPCSTR pchCookieName, LPSTR pchCookieData, BOOL WINAPI InternetGetCookieExA( LPCSTR pchURL, LPCSTR pchCookieName, LPSTR pchCookieData,
LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved) LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
{ {
FIXME("(%s, %s, %s, %p, 0x%08lx, %p) stub\n", FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
debugstr_a(pchURL), debugstr_a(pchCookieName), debugstr_a(pchCookieData), debugstr_a(pchURL), debugstr_a(pchCookieName), debugstr_a(pchCookieData),
pcchCookieData, dwFlags, lpReserved); pcchCookieData, dwFlags, lpReserved);
return FALSE; return FALSE;
@ -565,7 +596,7 @@ BOOL WINAPI InternetGetCookieExA( LPCSTR pchURL, LPCSTR pchCookieName, LPSTR pch
BOOL WINAPI InternetGetCookieExW( LPCWSTR pchURL, LPCWSTR pchCookieName, LPWSTR pchCookieData, BOOL WINAPI InternetGetCookieExW( LPCWSTR pchURL, LPCWSTR pchCookieName, LPWSTR pchCookieData,
LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved) LPDWORD pcchCookieData, DWORD dwFlags, LPVOID lpReserved)
{ {
FIXME("(%s, %s, %s, %p, 0x%08lx, %p) stub\n", FIXME("(%s, %s, %s, %p, 0x%08x, %p) stub\n",
debugstr_w(pchURL), debugstr_w(pchCookieName), debugstr_w(pchCookieData), debugstr_w(pchURL), debugstr_w(pchCookieName), debugstr_w(pchCookieData),
pcchCookieData, dwFlags, lpReserved); pcchCookieData, dwFlags, lpReserved);
return FALSE; return FALSE;
@ -641,7 +672,7 @@ BOOL WINAPI InternetGetPerSiteCookieDecisionW( LPCWSTR pwchHostName, unsigned lo
*/ */
BOOL WINAPI InternetSetPerSiteCookieDecisionA( LPCSTR pchHostName, DWORD dwDecision ) BOOL WINAPI InternetSetPerSiteCookieDecisionA( LPCSTR pchHostName, DWORD dwDecision )
{ {
FIXME("(%s, 0x%08lx) stub\n", debugstr_a(pchHostName), dwDecision); FIXME("(%s, 0x%08x) stub\n", debugstr_a(pchHostName), dwDecision);
return FALSE; return FALSE;
} }
@ -650,6 +681,6 @@ BOOL WINAPI InternetSetPerSiteCookieDecisionA( LPCSTR pchHostName, DWORD dwDecis
*/ */
BOOL WINAPI InternetSetPerSiteCookieDecisionW( LPCWSTR pchHostName, DWORD dwDecision ) BOOL WINAPI InternetSetPerSiteCookieDecisionW( LPCWSTR pchHostName, DWORD dwDecision )
{ {
FIXME("(%s, 0x%08lx) stub\n", debugstr_w(pchHostName), dwDecision); FIXME("(%s, 0x%08x) stub\n", debugstr_w(pchHostName), dwDecision);
return FALSE; return FALSE;
} }

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h" #include "config.h"
@ -29,7 +29,6 @@
#include "winreg.h" #include "winreg.h"
#include "wininet.h" #include "wininet.h"
#include "winnetwk.h" #include "winnetwk.h"
#include "winnls.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "winerror.h" #include "winerror.h"
#define NO_SHLWAPI_STREAM #define NO_SHLWAPI_STREAM
@ -68,11 +67,11 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
if (NULL == lpwhr) if (NULL == lpwhr)
return FALSE; return FALSE;
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent; lpwhs = lpwhr->lpHttpSession;
if (NULL == lpwhs) if (NULL == lpwhs)
return FALSE; return FALSE;
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent; hIC = lpwhs->lpAppInfo;
if (NULL == hIC) if (NULL == hIC)
return FALSE; return FALSE;
@ -80,7 +79,7 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
/* FIXME: perhaps it would be better to use InternetCrackUrl here */ /* FIXME: perhaps it would be better to use InternetCrackUrl here */
p = strchrW(szBuf, ':'); p = strchrW(szBuf, ':');
if(*p) if (p)
*p = 0; *p = 0;
return TRUE; return TRUE;
@ -108,8 +107,13 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
* dealing with 'Basic' Authentication * dealing with 'Basic' Authentication
*/ */
p = strchrW( szBuf, ' ' ); p = strchrW( szBuf, ' ' );
if( p && !strncmpW( p+1, szRealm, strlenW(szRealm) ) ) if( !p || strncmpW( p+1, szRealm, strlenW(szRealm) ) )
{ {
ERR("proxy response wrong? (%s)\n", debugstr_w(szBuf));
return FALSE;
}
/* remove quotes */ /* remove quotes */
p += 7; p += 7;
if( *p == '"' ) if( *p == '"' )
@ -119,8 +123,6 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
if( q ) if( q )
*q = 0; *q = 0;
} }
}
strcpyW( szBuf, p ); strcpyW( szBuf, p );
return TRUE; return TRUE;
@ -206,14 +208,14 @@ static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
if( !lpwhr ) if( !lpwhr )
return FALSE; return FALSE;
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent; lpwhs = lpwhr->lpHttpSession;
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION) if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
{ {
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE); INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
return FALSE; return FALSE;
} }
hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent; hIC = lpwhs->lpAppInfo;
p = HeapAlloc( GetProcessHeap(), 0, (strlenW( username ) + 1)*sizeof(WCHAR) ); p = HeapAlloc( GetProcessHeap(), 0, (strlenW( username ) + 1)*sizeof(WCHAR) );
if( !p ) if( !p )
@ -333,7 +335,7 @@ static INT WININET_GetConnectionStatus( HINTERNET hRequest )
return -1; return -1;
dwStatus = atoiW( szStatus ); dwStatus = atoiW( szStatus );
TRACE("request %p status = %ld\n", hRequest, dwStatus ); TRACE("request %p status = %d\n", hRequest, dwStatus );
return dwStatus; return dwStatus;
} }
@ -349,7 +351,7 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
HMODULE hwininet = GetModuleHandleA( "wininet.dll" ); HMODULE hwininet = GetModuleHandleA( "wininet.dll" );
INT dwStatus; INT dwStatus;
TRACE("%p %p %ld %08lx %p\n", hWnd, hRequest, dwError, dwFlags, lppvData); TRACE("%p %p %d %08x %p\n", hWnd, hRequest, dwError, dwFlags, lppvData);
params.hWnd = hWnd; params.hWnd = hWnd;
params.hRequest = hRequest; params.hRequest = hRequest;
@ -377,7 +379,7 @@ DWORD WINAPI InternetErrorDlg(HWND hWnd, HINTERNET hRequest,
case ERROR_INTERNET_POST_IS_NON_SECURE: case ERROR_INTERNET_POST_IS_NON_SECURE:
case ERROR_INTERNET_SEC_CERT_CN_INVALID: case ERROR_INTERNET_SEC_CERT_CN_INVALID:
case ERROR_INTERNET_SEC_CERT_DATE_INVALID: case ERROR_INTERNET_SEC_CERT_DATE_INVALID:
FIXME("Need to display dialog for error %ld\n", dwError); FIXME("Need to display dialog for error %d\n", dwError);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h" #include "config.h"
@ -93,7 +93,7 @@ BOOL WINAPI GopherCreateLocatorW(
* - Locator created by the GopherCreateLocator function. * - Locator created by the GopherCreateLocator function.
* lpszSearchString [I] what to search for if this request is to an index server. * lpszSearchString [I] what to search for if this request is to an index server.
* Otherwise, this parameter should be NULL. * Otherwise, this parameter should be NULL.
* lpFindData [O] retrived information * lpFindData [O] retrieved information
* dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE} * dwFlags [I] INTERNET_FLAG_{HYPERLINK, NEED_FILE, NO_CACHE_WRITE, RELOAD, RESYNCHRONIZE}
* dwContext [I] application private value * dwContext [I] application private value
* *
@ -108,7 +108,7 @@ HINTERNET WINAPI GopherFindFirstFileA(
LPGOPHER_FIND_DATAA LPGOPHER_FIND_DATAA
lpFindData, lpFindData,
DWORD dwFlags, DWORD dwFlags,
DWORD dwContext DWORD_PTR dwContext
) )
{ {
FIXME("stub\n"); FIXME("stub\n");
@ -127,7 +127,7 @@ HINTERNET WINAPI GopherFindFirstFileW(
LPGOPHER_FIND_DATAW LPGOPHER_FIND_DATAW
lpFindData, lpFindData,
DWORD dwFlags, DWORD dwFlags,
DWORD dwContext DWORD_PTR dwContext
) )
{ {
FIXME("stub\n"); FIXME("stub\n");
@ -152,7 +152,7 @@ BOOL WINAPI GopherGetAttributeA(
LPDWORD lpdwCharactersReturned, LPDWORD lpdwCharactersReturned,
GOPHER_ATTRIBUTE_ENUMERATORA GOPHER_ATTRIBUTE_ENUMERATORA
lpfnEnumerator, lpfnEnumerator,
DWORD dwContext DWORD_PTR dwContext
) )
{ {
FIXME("stub\n"); FIXME("stub\n");
@ -173,7 +173,7 @@ BOOL WINAPI GopherGetAttributeW(
LPDWORD lpdwCharactersReturned, LPDWORD lpdwCharactersReturned,
GOPHER_ATTRIBUTE_ENUMERATORW GOPHER_ATTRIBUTE_ENUMERATORW
lpfnEnumerator, lpfnEnumerator,
DWORD dwContext DWORD_PTR dwContext
) )
{ {
FIXME("stub\n"); FIXME("stub\n");
@ -231,7 +231,7 @@ HINTERNET WINAPI GopherOpenFileA(
LPCSTR lpszLocator, LPCSTR lpszLocator,
LPCSTR lpszView, LPCSTR lpszView,
DWORD dwFlags, DWORD dwFlags,
DWORD dwContext DWORD_PTR dwContext
) )
{ {
FIXME("stub\n"); FIXME("stub\n");
@ -248,7 +248,7 @@ HINTERNET WINAPI GopherOpenFileW(
LPCWSTR lpszLocator, LPCWSTR lpszLocator,
LPCWSTR lpszView, LPCWSTR lpszView,
DWORD dwFlags, DWORD dwFlags,
DWORD dwContext DWORD_PTR dwContext
) )
{ {
FIXME("stub\n"); FIXME("stub\n");

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -17,13 +17,18 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#ifndef _WINE_INTERNET_H_ #ifndef _WINE_INTERNET_H_
#define _WINE_INTERNET_H_ #define _WINE_INTERNET_H_
#ifndef __WINE_CONFIG_H
# error You must include config.h to use this header
#endif
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/list.h"
#include <time.h> #include <time.h>
#ifdef HAVE_NETDB_H #ifdef HAVE_NETDB_H
@ -36,6 +41,10 @@
#ifdef HAVE_OPENSSL_SSL_H #ifdef HAVE_OPENSSL_SSL_H
#define DSA __ssl_DSA /* avoid conflict with commctrl.h */ #define DSA __ssl_DSA /* avoid conflict with commctrl.h */
#undef FAR #undef FAR
/* avoid conflict with wincrypt.h */
#undef PKCS7_SIGNER_INFO
#undef X509_NAME
#undef X509_CERT_PAIR
# include <openssl/ssl.h> # include <openssl/ssl.h>
#undef FAR #undef FAR
#define FAR do_not_use_this_in_wine #define FAR do_not_use_this_in_wine
@ -63,24 +72,18 @@ typedef struct
SSL *ssl_s; SSL *ssl_s;
char *peek_msg; char *peek_msg;
char *peek_msg_mem; char *peek_msg_mem;
size_t peek_len;
#endif #endif
} WININET_NETCONNECTION; } WININET_NETCONNECTION;
inline static LPSTR WININET_strdup( LPCSTR str ) static inline LPWSTR WININET_strdupW( LPCWSTR str )
{
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, strlen(str) + 1 );
if (ret) strcpy( ret, str );
return ret;
}
inline static LPWSTR WININET_strdupW( LPCWSTR str )
{ {
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, (strlenW(str) + 1)*sizeof(WCHAR) ); LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, (strlenW(str) + 1)*sizeof(WCHAR) );
if (ret) strcpyW( ret, str ); if (ret) strcpyW( ret, str );
return ret; return ret;
} }
inline static LPWSTR WININET_strdup_AtoW( LPCSTR str ) static inline LPWSTR WININET_strdup_AtoW( LPCSTR str )
{ {
int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0); int len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0);
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
@ -89,7 +92,7 @@ inline static LPWSTR WININET_strdup_AtoW( LPCSTR str )
return ret; return ret;
} }
inline static LPSTR WININET_strdup_WtoA( LPCWSTR str ) static inline LPSTR WININET_strdup_WtoA( LPCWSTR str )
{ {
int len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL); int len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
LPSTR ret = HeapAlloc( GetProcessHeap(), 0, len ); LPSTR ret = HeapAlloc( GetProcessHeap(), 0, len );
@ -98,7 +101,7 @@ inline static LPSTR WININET_strdup_WtoA( LPCWSTR str )
return ret; return ret;
} }
inline static void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA) static inline void WININET_find_data_WtoA(LPWIN32_FIND_DATAW dataW, LPWIN32_FIND_DATAA dataA)
{ {
dataA->dwFileAttributes = dataW->dwFileAttributes; dataA->dwFileAttributes = dataW->dwFileAttributes;
dataA->ftCreationTime = dataW->ftCreationTime; dataA->ftCreationTime = dataW->ftCreationTime;
@ -123,7 +126,7 @@ typedef enum
WH_HGOPHERSESSION = INTERNET_HANDLE_TYPE_CONNECT_GOPHER, WH_HGOPHERSESSION = INTERNET_HANDLE_TYPE_CONNECT_GOPHER,
WH_HHTTPSESSION = INTERNET_HANDLE_TYPE_CONNECT_HTTP, WH_HHTTPSESSION = INTERNET_HANDLE_TYPE_CONNECT_HTTP,
WH_HFILE = INTERNET_HANDLE_TYPE_FTP_FILE, WH_HFILE = INTERNET_HANDLE_TYPE_FTP_FILE,
WH_HFINDNEXT = INTERNET_HANDLE_TYPE_FTP_FIND, WH_HFTPFINDNEXT = INTERNET_HANDLE_TYPE_FTP_FIND,
WH_HHTTPREQ = INTERNET_HANDLE_TYPE_HTTP_REQUEST, WH_HHTTPREQ = INTERNET_HANDLE_TYPE_HTTP_REQUEST,
} WH_TYPE; } WH_TYPE;
@ -133,19 +136,22 @@ typedef enum
struct _WININETHANDLEHEADER; struct _WININETHANDLEHEADER;
typedef struct _WININETHANDLEHEADER WININETHANDLEHEADER, *LPWININETHANDLEHEADER; typedef struct _WININETHANDLEHEADER WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
typedef void (*WININET_object_destructor)( LPWININETHANDLEHEADER ); typedef void (*WININET_object_function)( LPWININETHANDLEHEADER );
struct _WININETHANDLEHEADER struct _WININETHANDLEHEADER
{ {
WH_TYPE htype; WH_TYPE htype;
HINTERNET hInternet;
DWORD dwFlags; DWORD dwFlags;
DWORD dwContext; DWORD_PTR dwContext;
DWORD dwError; DWORD dwError;
DWORD dwInternalFlags; DWORD dwInternalFlags;
DWORD dwRefCount; DWORD dwRefCount;
WININET_object_destructor destroy; WININET_object_function close_connection;
WININET_object_function destroy;
INTERNET_STATUS_CALLBACK lpfnStatusCB; INTERNET_STATUS_CALLBACK lpfnStatusCB;
struct _WININETHANDLEHEADER *lpwhparent; struct list entry;
struct list children;
}; };
@ -164,9 +170,11 @@ typedef struct
typedef struct typedef struct
{ {
WININETHANDLEHEADER hdr; WININETHANDLEHEADER hdr;
WININETAPPINFOW *lpAppInfo;
LPWSTR lpszHostName; /* the final destination of the request */ LPWSTR lpszHostName; /* the final destination of the request */
LPWSTR lpszServerName; /* the name of the server we directly connect to */ LPWSTR lpszServerName; /* the name of the server we directly connect to */
LPWSTR lpszUserName; LPWSTR lpszUserName;
LPWSTR lpszPassword;
INTERNET_PORT nHostPort; /* the final destination port of the request */ INTERNET_PORT nHostPort; /* the final destination port of the request */
INTERNET_PORT nServerPort; /* the port of the server we directly connect to */ INTERNET_PORT nServerPort; /* the port of the server we directly connect to */
struct sockaddr_in socketAddress; struct sockaddr_in socketAddress;
@ -185,35 +193,46 @@ typedef struct
} HTTPHEADERW, *LPHTTPHEADERW; } HTTPHEADERW, *LPHTTPHEADERW;
struct HttpAuthInfo;
typedef struct typedef struct
{ {
WININETHANDLEHEADER hdr; WININETHANDLEHEADER hdr;
WININETHTTPSESSIONW *lpHttpSession;
LPWSTR lpszPath; LPWSTR lpszPath;
LPWSTR lpszVerb; LPWSTR lpszVerb;
LPWSTR lpszRawHeaders; LPWSTR lpszRawHeaders;
WININET_NETCONNECTION netConnection; WININET_NETCONNECTION netConnection;
LPWSTR lpszVersion; LPWSTR lpszVersion;
LPWSTR lpszStatusText; LPWSTR lpszStatusText;
DWORD dwContentLength; /* total number of bytes to be read */
DWORD dwContentRead; /* bytes of the content read so far */
HTTPHEADERW *pCustHeaders; HTTPHEADERW *pCustHeaders;
DWORD nCustHeaders; DWORD nCustHeaders;
struct HttpAuthInfo *pAuthInfo;
struct HttpAuthInfo *pProxyAuthInfo;
} WININETHTTPREQW, *LPWININETHTTPREQW; } WININETHTTPREQW, *LPWININETHTTPREQW;
struct _WININETFTPSESSIONW;
typedef struct typedef struct
{ {
WININETHANDLEHEADER hdr; WININETHANDLEHEADER hdr;
struct _WININETFTPSESSIONW *lpFtpSession;
BOOL session_deleted; BOOL session_deleted;
int nDataSocket; int nDataSocket;
} WININETFILE, *LPWININETFILE; } WININETFTPFILE, *LPWININETFTPFILE;
typedef struct typedef struct _WININETFTPSESSIONW
{ {
WININETHANDLEHEADER hdr; WININETHANDLEHEADER hdr;
WININETAPPINFOW *lpAppInfo;
int sndSocket; int sndSocket;
int lstnSocket; int lstnSocket;
int pasvSocket; /* data socket connected by us in case of passive FTP */ int pasvSocket; /* data socket connected by us in case of passive FTP */
LPWININETFILE download_in_progress; LPWININETFTPFILE download_in_progress;
struct sockaddr_in socketAddress; struct sockaddr_in socketAddress;
struct sockaddr_in lstnSocketAddress; struct sockaddr_in lstnSocketAddress;
LPWSTR lpszPassword; LPWSTR lpszPassword;
@ -234,37 +253,18 @@ typedef struct
typedef struct typedef struct
{ {
WININETHANDLEHEADER hdr; WININETHANDLEHEADER hdr;
WININETFTPSESSIONW *lpFtpSession;
DWORD index; DWORD index;
DWORD size; DWORD size;
LPFILEPROPERTIESW lpafp; LPFILEPROPERTIESW lpafp;
} WININETFINDNEXTW, *LPWININETFINDNEXTW; } WININETFTPFINDNEXTW, *LPWININETFTPFINDNEXTW;
typedef enum
{
FTPPUTFILEW,
FTPSETCURRENTDIRECTORYW,
FTPCREATEDIRECTORYW,
FTPFINDFIRSTFILEW,
FTPGETCURRENTDIRECTORYW,
FTPOPENFILEW,
FTPGETFILEW,
FTPDELETEFILEW,
FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW,
INTERNETFINDNEXTW,
HTTPSENDREQUESTW,
HTTPOPENREQUESTW,
SENDCALLBACK,
INTERNETOPENURLW,
INTERNETREADFILEEXA,
} ASYNC_FUNC;
struct WORKREQ_FTPPUTFILEW struct WORKREQ_FTPPUTFILEW
{ {
LPWSTR lpszLocalFile; LPWSTR lpszLocalFile;
LPWSTR lpszNewRemoteFile; LPWSTR lpszNewRemoteFile;
DWORD dwFlags; DWORD dwFlags;
DWORD dwContext; DWORD_PTR dwContext;
}; };
struct WORKREQ_FTPSETCURRENTDIRECTORYW struct WORKREQ_FTPSETCURRENTDIRECTORYW
@ -282,7 +282,7 @@ struct WORKREQ_FTPFINDFIRSTFILEW
LPWSTR lpszSearchFile; LPWSTR lpszSearchFile;
LPWIN32_FIND_DATAW lpFindFileData; LPWIN32_FIND_DATAW lpFindFileData;
DWORD dwFlags; DWORD dwFlags;
DWORD dwContext; DWORD_PTR dwContext;
}; };
struct WORKREQ_FTPGETCURRENTDIRECTORYW struct WORKREQ_FTPGETCURRENTDIRECTORYW
@ -296,7 +296,7 @@ struct WORKREQ_FTPOPENFILEW
LPWSTR lpszFilename; LPWSTR lpszFilename;
DWORD dwAccess; DWORD dwAccess;
DWORD dwFlags; DWORD dwFlags;
DWORD dwContext; DWORD_PTR dwContext;
}; };
struct WORKREQ_FTPGETFILEW struct WORKREQ_FTPGETFILEW
@ -306,7 +306,7 @@ struct WORKREQ_FTPGETFILEW
BOOL fFailIfExists; BOOL fFailIfExists;
DWORD dwLocalFlagsAttribute; DWORD dwLocalFlagsAttribute;
DWORD dwFlags; DWORD dwFlags;
DWORD dwContext; DWORD_PTR dwContext;
}; };
struct WORKREQ_FTPDELETEFILEW struct WORKREQ_FTPDELETEFILEW
@ -325,22 +325,11 @@ struct WORKREQ_FTPRENAMEFILEW
LPWSTR lpszDestFile; LPWSTR lpszDestFile;
}; };
struct WORKREQ_INTERNETFINDNEXTW struct WORKREQ_FTPFINDNEXTW
{ {
LPWIN32_FIND_DATAW lpFindFileData; LPWIN32_FIND_DATAW lpFindFileData;
}; };
struct WORKREQ_HTTPOPENREQUESTW
{
LPWSTR lpszVerb;
LPWSTR lpszObjectName;
LPWSTR lpszVersion;
LPWSTR lpszReferrer;
LPCWSTR *lpszAcceptTypes;
DWORD dwFlags;
DWORD dwContext;
};
struct WORKREQ_HTTPSENDREQUESTW struct WORKREQ_HTTPSENDREQUESTW
{ {
LPWSTR lpszHeader; LPWSTR lpszHeader;
@ -353,7 +342,7 @@ struct WORKREQ_HTTPSENDREQUESTW
struct WORKREQ_SENDCALLBACK struct WORKREQ_SENDCALLBACK
{ {
DWORD dwContext; DWORD_PTR dwContext;
DWORD dwInternetStatus; DWORD dwInternetStatus;
LPVOID lpvStatusInfo; LPVOID lpvStatusInfo;
DWORD dwStatusInfoLength; DWORD dwStatusInfoLength;
@ -366,7 +355,7 @@ struct WORKREQ_INTERNETOPENURLW
LPWSTR lpszHeaders; LPWSTR lpszHeaders;
DWORD dwHeadersLength; DWORD dwHeadersLength;
DWORD dwFlags; DWORD dwFlags;
DWORD dwContext; DWORD_PTR dwContext;
}; };
struct WORKREQ_INTERNETREADFILEEXA struct WORKREQ_INTERNETREADFILEEXA
@ -376,7 +365,7 @@ struct WORKREQ_INTERNETREADFILEEXA
typedef struct WORKREQ typedef struct WORKREQ
{ {
ASYNC_FUNC asyncall; void (*asyncproc)(struct WORKREQ*);
WININETHANDLEHEADER *hdr; WININETHANDLEHEADER *hdr;
union { union {
@ -390,17 +379,13 @@ typedef struct WORKREQ
struct WORKREQ_FTPDELETEFILEW FtpDeleteFileW; struct WORKREQ_FTPDELETEFILEW FtpDeleteFileW;
struct WORKREQ_FTPREMOVEDIRECTORYW FtpRemoveDirectoryW; struct WORKREQ_FTPREMOVEDIRECTORYW FtpRemoveDirectoryW;
struct WORKREQ_FTPRENAMEFILEW FtpRenameFileW; struct WORKREQ_FTPRENAMEFILEW FtpRenameFileW;
struct WORKREQ_INTERNETFINDNEXTW InternetFindNextW; struct WORKREQ_FTPFINDNEXTW FtpFindNextW;
struct WORKREQ_HTTPOPENREQUESTW HttpOpenRequestW;
struct WORKREQ_HTTPSENDREQUESTW HttpSendRequestW; struct WORKREQ_HTTPSENDREQUESTW HttpSendRequestW;
struct WORKREQ_SENDCALLBACK SendCallback; struct WORKREQ_SENDCALLBACK SendCallback;
struct WORKREQ_INTERNETOPENURLW InternetOpenUrlW; struct WORKREQ_INTERNETOPENURLW InternetOpenUrlW;
struct WORKREQ_INTERNETREADFILEEXA InternetReadFileExA; struct WORKREQ_INTERNETREADFILEEXA InternetReadFileExA;
} u; } u;
struct WORKREQ *next;
struct WORKREQ *prev;
} WORKREQUEST, *LPWORKREQUEST; } WORKREQUEST, *LPWORKREQUEST;
HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info ); HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info );
@ -408,18 +393,17 @@ LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet );
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info ); LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info );
BOOL WININET_Release( LPWININETHANDLEHEADER info ); BOOL WININET_Release( LPWININETHANDLEHEADER info );
BOOL WININET_FreeHandle( HINTERNET hinternet ); BOOL WININET_FreeHandle( HINTERNET hinternet );
HINTERNET WININET_FindHandle( LPWININETHANDLEHEADER info );
time_t ConvertTimeString(LPCWSTR asctime); time_t ConvertTimeString(LPCWSTR asctime);
HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, HINTERNET FTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD dwContext, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
DWORD dwInternalFlags); DWORD dwInternalFlags);
HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName, HINTERNET HTTP_Connect(LPWININETAPPINFOW hIC, LPCWSTR lpszServerName,
INTERNET_PORT nServerPort, LPCWSTR lpszUserName, INTERNET_PORT nServerPort, LPCWSTR lpszUserName,
LPCWSTR lpszPassword, DWORD dwFlags, DWORD dwContext, LPCWSTR lpszPassword, DWORD dwFlags, DWORD_PTR dwContext,
DWORD dwInternalFlags); DWORD dwInternalFlags);
BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort, BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
@ -430,13 +414,17 @@ DWORD INTERNET_GetLastError(void);
BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest); BOOL INTERNET_AsyncCall(LPWORKREQUEST lpWorkRequest);
LPSTR INTERNET_GetResponseBuffer(void); LPSTR INTERNET_GetResponseBuffer(void);
LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen); LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen);
BOOL INTERNET_ReadFile(LPWININETHANDLEHEADER lpwh, LPVOID lpBuffer,
DWORD dwNumOfBytesToRead, LPDWORD pdwNumOfBytesRead,
BOOL bWait, BOOL bSendCompletionStatus);
BOOLAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile, BOOLAPI FTP_FtpPutFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszLocalFile,
LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD dwContext); LPCWSTR lpszNewRemoteFile, DWORD dwFlags, DWORD_PTR dwContext);
BOOLAPI FTP_FtpSetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory); BOOLAPI FTP_FtpSetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
BOOLAPI FTP_FtpCreateDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory); BOOLAPI FTP_FtpCreateDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
INTERNETAPI HINTERNET WINAPI FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs, INTERNETAPI HINTERNET WINAPI FTP_FtpFindFirstFileW(LPWININETFTPSESSIONW lpwfs,
LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD dwContext); LPCWSTR lpszSearchFile, LPWIN32_FIND_DATAW lpFindFileData, DWORD dwFlags, DWORD_PTR dwContext);
BOOL WINAPI FTP_FindNextFileW(LPWININETFTPFINDNEXTW lpwh, LPVOID lpvFindData);
BOOLAPI FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszCurrentDirectory, BOOLAPI FTP_FtpGetCurrentDirectoryW(LPWININETFTPSESSIONW lpwfs, LPWSTR lpszCurrentDirectory,
LPDWORD lpdwCurrentDirectory); LPDWORD lpdwCurrentDirectory);
BOOL FTP_ConvertFileProp(LPFILEPROPERTIESW lpafp, LPWIN32_FIND_DATAW lpFindFileData); BOOL FTP_ConvertFileProp(LPFILEPROPERTIESW lpafp, LPWIN32_FIND_DATAW lpFindFileData);
@ -444,10 +432,10 @@ BOOL FTP_FtpRenameFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszSrc, LPCWSTR lps
BOOL FTP_FtpRemoveDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory); BOOL FTP_FtpRemoveDirectoryW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszDirectory);
BOOL FTP_FtpDeleteFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName); BOOL FTP_FtpDeleteFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName);
HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName, HINTERNET FTP_FtpOpenFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszFileName,
DWORD fdwAccess, DWORD dwFlags, DWORD dwContext); DWORD fdwAccess, DWORD dwFlags, DWORD_PTR dwContext);
BOOLAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, LPCWSTR lpszNewFile, BOOLAPI FTP_FtpGetFileW(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, LPCWSTR lpszNewFile,
BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags, BOOL fFailIfExists, DWORD dwLocalFlagsAttribute, DWORD dwInternetFlags,
DWORD dwContext); DWORD_PTR dwContext);
BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength, DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength,
@ -455,13 +443,14 @@ BOOLAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion, LPCWSTR lpszVerb, LPCWSTR lpszObjectName, LPCWSTR lpszVersion,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes, LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD dwContext); DWORD dwFlags, DWORD_PTR dwContext);
BOOL HTTP_FinishedReading(LPWININETHTTPREQW lpwhr);
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext, VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength); DWORD dwStatusInfoLength);
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext, VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength); DWORD dwStatusInfoLength);
@ -479,6 +468,7 @@ BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len,
int *sent /* out */); int *sent /* out */);
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags, BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
int *recvd /* out */); int *recvd /* out */);
BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available);
BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer); BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPDWORD dwBuffer);
LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection); LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection);
BOOL NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value); BOOL NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value);

View file

@ -17,7 +17,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h" #include "config.h"
@ -33,6 +33,9 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -44,6 +47,7 @@
#include "winbase.h" #include "winbase.h"
#include "wininet.h" #include "wininet.h"
#include "winerror.h" #include "winerror.h"
#include "wincrypt.h"
/* To avoid conflicts with the Unix socket headers. we only need it for /* To avoid conflicts with the Unix socket headers. we only need it for
* the error codes anyway. */ * the error codes anyway. */
@ -52,9 +56,10 @@
#include "wine/debug.h" #include "wine/debug.h"
#include "internet.h" #include "internet.h"
#include "wincrypt.h"
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */ #define RESPONSE_TIMEOUT 30 /* FROM internet.c */
#define sock_get_error(x) WSAGetLastError()
#undef FIONREAD
WINE_DEFAULT_DEBUG_CHANNEL(wininet); WINE_DEFAULT_DEBUG_CHANNEL(wininet);
@ -65,17 +70,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet);
* SSL stuff should use crypt32.dll * SSL stuff should use crypt32.dll
*/ */
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
#include <openssl/err.h> #include <openssl/err.h>
#ifndef SONAME_LIBSSL
#define SONAME_LIBSSL "libssl.so"
#endif
#ifndef SONAME_LIBCRYPTO
#define SONAME_LIBCRYPTO "libcrypto.so"
#endif
static void *OpenSSL_ssl_handle; static void *OpenSSL_ssl_handle;
static void *OpenSSL_crypto_handle; static void *OpenSSL_crypto_handle;
@ -117,7 +115,7 @@ BOOL NETCON_init(WININET_NETCONNECTION *connection, BOOL useSSL)
connection->socketFD = -1; connection->socketFD = -1;
if (useSSL) if (useSSL)
{ {
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
TRACE("using SSL connection\n"); TRACE("using SSL connection\n");
if (OpenSSL_ssl_handle) /* already initialized everything */ if (OpenSSL_ssl_handle) /* already initialized everything */
return TRUE; return TRUE;
@ -204,6 +202,72 @@ BOOL NETCON_connected(WININET_NETCONNECTION *connection)
return TRUE; return TRUE;
} }
#ifndef __REACTOS__
/* translate a unix error code into a winsock one */
static int sock_get_error( int err )
{
switch (err)
{
case EINTR: return WSAEINTR;
case EBADF: return WSAEBADF;
case EPERM:
case EACCES: return WSAEACCES;
case EFAULT: return WSAEFAULT;
case EINVAL: return WSAEINVAL;
case EMFILE: return WSAEMFILE;
case EWOULDBLOCK: return WSAEWOULDBLOCK;
case EINPROGRESS: return WSAEINPROGRESS;
case EALREADY: return WSAEALREADY;
case ENOTSOCK: return WSAENOTSOCK;
case EDESTADDRREQ: return WSAEDESTADDRREQ;
case EMSGSIZE: return WSAEMSGSIZE;
case EPROTOTYPE: return WSAEPROTOTYPE;
case ENOPROTOOPT: return WSAENOPROTOOPT;
case EPROTONOSUPPORT: return WSAEPROTONOSUPPORT;
case ESOCKTNOSUPPORT: return WSAESOCKTNOSUPPORT;
case EOPNOTSUPP: return WSAEOPNOTSUPP;
case EPFNOSUPPORT: return WSAEPFNOSUPPORT;
case EAFNOSUPPORT: return WSAEAFNOSUPPORT;
case EADDRINUSE: return WSAEADDRINUSE;
case EADDRNOTAVAIL: return WSAEADDRNOTAVAIL;
case ENETDOWN: return WSAENETDOWN;
case ENETUNREACH: return WSAENETUNREACH;
case ENETRESET: return WSAENETRESET;
case ECONNABORTED: return WSAECONNABORTED;
case EPIPE:
case ECONNRESET: return WSAECONNRESET;
case ENOBUFS: return WSAENOBUFS;
case EISCONN: return WSAEISCONN;
case ENOTCONN: return WSAENOTCONN;
case ESHUTDOWN: return WSAESHUTDOWN;
case ETOOMANYREFS: return WSAETOOMANYREFS;
case ETIMEDOUT: return WSAETIMEDOUT;
case ECONNREFUSED: return WSAECONNREFUSED;
case ELOOP: return WSAELOOP;
case ENAMETOOLONG: return WSAENAMETOOLONG;
case EHOSTDOWN: return WSAEHOSTDOWN;
case EHOSTUNREACH: return WSAEHOSTUNREACH;
case ENOTEMPTY: return WSAENOTEMPTY;
#ifdef EPROCLIM
case EPROCLIM: return WSAEPROCLIM;
#endif
#ifdef EUSERS
case EUSERS: return WSAEUSERS;
#endif
#ifdef EDQUOT
case EDQUOT: return WSAEDQUOT;
#endif
#ifdef ESTALE
case ESTALE: return WSAESTALE;
#endif
#ifdef EREMOTE
case EREMOTE: return WSAEREMOTE;
#endif
default: errno=err; perror("sock_set_error"); return WSAEFAULT;
}
}
#endif
/****************************************************************************** /******************************************************************************
* NETCON_create * NETCON_create
* Basically calls 'socket()' * Basically calls 'socket()'
@ -211,15 +275,15 @@ BOOL NETCON_connected(WININET_NETCONNECTION *connection)
BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain, BOOL NETCON_create(WININET_NETCONNECTION *connection, int domain,
int type, int protocol) int type, int protocol)
{ {
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
if (connection->useSSL) if (connection->useSSL)
return FALSE; return FALSE;
#endif #endif
connection->socketFD = socket(domain, type, protocol); connection->socketFD = socket(domain, type, protocol);
if (INVALID_SOCKET == connection->socketFD) if (connection->socketFD == -1)
{ {
INTERNET_SetLastError(WSAGetLastError()); INTERNET_SetLastError(sock_get_error(errno));
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -235,12 +299,13 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection)
if (!NETCON_connected(connection)) return FALSE; if (!NETCON_connected(connection)) return FALSE;
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
if (connection->useSSL) if (connection->useSSL)
{ {
HeapFree(GetProcessHeap(),0,connection->peek_msg_mem); HeapFree(GetProcessHeap(),0,connection->peek_msg_mem);
connection->peek_msg = NULL; connection->peek_msg = NULL;
connection->peek_msg_mem = NULL; connection->peek_msg_mem = NULL;
connection->peek_len = 0;
pSSL_shutdown(connection->ssl_s); pSSL_shutdown(connection->ssl_s);
pSSL_free(connection->ssl_s); pSSL_free(connection->ssl_s);
@ -253,14 +318,14 @@ BOOL NETCON_close(WININET_NETCONNECTION *connection)
result = closesocket(connection->socketFD); result = closesocket(connection->socketFD);
connection->socketFD = -1; connection->socketFD = -1;
if (0 != result) if (result == -1)
{ {
INTERNET_SetLastError(WSAGetLastError()); INTERNET_SetLastError(sock_get_error(errno));
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
static BOOL check_hostname(X509 *cert, char *hostname) static BOOL check_hostname(X509 *cert, char *hostname)
{ {
/* FIXME: implement */ /* FIXME: implement */
@ -273,7 +338,7 @@ static BOOL check_hostname(X509 *cert, char *hostname)
*/ */
BOOL NETCON_secure_connect(WININET_NETCONNECTION *connection, LPCWSTR hostname) BOOL NETCON_secure_connect(WININET_NETCONNECTION *connection, LPCWSTR hostname)
{ {
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
long verify_res; long verify_res;
X509 *cert; X509 *cert;
int len; int len;
@ -334,14 +399,14 @@ BOOL NETCON_secure_connect(WININET_NETCONNECTION *connection, LPCWSTR hostname)
* the moment */ * the moment */
} }
len = WideCharToMultiByte(CP_THREAD_ACP, 0, hostname, -1, NULL, 0, NULL, NULL); len = WideCharToMultiByte(CP_UNIXCP, 0, hostname, -1, NULL, 0, NULL, NULL);
hostname_unix = HeapAlloc(GetProcessHeap(), 0, len); hostname_unix = HeapAlloc(GetProcessHeap(), 0, len);
if (!hostname_unix) if (!hostname_unix)
{ {
INTERNET_SetLastError(ERROR_OUTOFMEMORY); INTERNET_SetLastError(ERROR_OUTOFMEMORY);
goto fail; goto fail;
} }
WideCharToMultiByte(CP_THREAD_ACP, 0, hostname, -1, hostname_unix, len, NULL, NULL); WideCharToMultiByte(CP_UNIXCP, 0, hostname, -1, hostname_unix, len, NULL, NULL);
if (!check_hostname(cert, hostname_unix)) if (!check_hostname(cert, hostname_unix))
{ {
@ -377,10 +442,10 @@ BOOL NETCON_connect(WININET_NETCONNECTION *connection, const struct sockaddr *se
if (!NETCON_connected(connection)) return FALSE; if (!NETCON_connected(connection)) return FALSE;
result = connect(connection->socketFD, serv_addr, addrlen); result = connect(connection->socketFD, serv_addr, addrlen);
if (SOCKET_ERROR == result) if (result == -1)
{ {
WARN("Unable to connect to host (%s)\n", strerror(errno)); WARN("Unable to connect to host (%s)\n", strerror(errno));
INTERNET_SetLastError(WSAGetLastError()); INTERNET_SetLastError(sock_get_error(errno));
closesocket(connection->socketFD); closesocket(connection->socketFD);
connection->socketFD = -1; connection->socketFD = -1;
@ -402,16 +467,16 @@ BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len,
if (!connection->useSSL) if (!connection->useSSL)
{ {
*sent = send(connection->socketFD, msg, len, flags); *sent = send(connection->socketFD, msg, len, flags);
if (SOCKET_ERROR == *sent) if (*sent == -1)
{ {
INTERNET_SetLastError(WSAGetLastError()); INTERNET_SetLastError(sock_get_error(errno));
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
else else
{ {
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
if (flags) if (flags)
FIXME("SSL_write doesn't support any flags (%08x)\n", flags); FIXME("SSL_write doesn't support any flags (%08x)\n", flags);
*sent = pSSL_write(connection->ssl_s, msg, len); *sent = pSSL_write(connection->ssl_s, msg, len);
@ -432,21 +497,24 @@ BOOL NETCON_send(WININET_NETCONNECTION *connection, const void *msg, size_t len,
BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags, BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int flags,
int *recvd /* out */) int *recvd /* out */)
{ {
*recvd = 0;
if (!NETCON_connected(connection)) return FALSE; if (!NETCON_connected(connection)) return FALSE;
if (!len)
return TRUE;
if (!connection->useSSL) if (!connection->useSSL)
{ {
*recvd = recv(connection->socketFD, buf, len, flags); *recvd = recv(connection->socketFD, buf, len, flags);
if (SOCKET_ERROR == *recvd) if (*recvd == -1)
{ {
INTERNET_SetLastError(WSAGetLastError()); INTERNET_SetLastError(sock_get_error(errno));
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
else else
{ {
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
if (flags & (~MSG_PEEK)) if (flags & ~(MSG_PEEK|MSG_WAITALL))
FIXME("SSL_read does not support the following flag: %08x\n", flags); FIXME("SSL_read does not support the following flag: %08x\n", flags);
/* this ugly hack is all for MSG_PEEK. eww gross */ /* this ugly hack is all for MSG_PEEK. eww gross */
@ -456,29 +524,33 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f
} }
else if (flags & MSG_PEEK && connection->peek_msg) else if (flags & MSG_PEEK && connection->peek_msg)
{ {
size_t peek_msg_len = strlen(connection->peek_msg); if (len < connection->peek_len)
if (len < peek_msg_len)
FIXME("buffer isn't big enough. Do the expect us to wrap?\n"); FIXME("buffer isn't big enough. Do the expect us to wrap?\n");
memcpy(buf, connection->peek_msg, min(len,peek_msg_len+1)); *recvd = min(len, connection->peek_len);
*recvd = min(len, peek_msg_len); memcpy(buf, connection->peek_msg, *recvd);
return TRUE; return TRUE;
} }
else if (connection->peek_msg) else if (connection->peek_msg)
{ {
size_t peek_msg_len = strlen(connection->peek_msg); *recvd = min(len, connection->peek_len);
memcpy(buf, connection->peek_msg, min(len,peek_msg_len+1)); memcpy(buf, connection->peek_msg, *recvd);
connection->peek_msg += *recvd = min(len, peek_msg_len); connection->peek_len -= *recvd;
if (*connection->peek_msg == '\0' || *(connection->peek_msg - 1) == '\0') connection->peek_msg += *recvd;
if (connection->peek_len == 0)
{ {
HeapFree(GetProcessHeap(), 0, connection->peek_msg_mem); HeapFree(GetProcessHeap(), 0, connection->peek_msg_mem);
connection->peek_msg_mem = NULL; connection->peek_msg_mem = NULL;
connection->peek_msg = NULL; connection->peek_msg = NULL;
} }
/* check if we got enough data from the peek buffer */
if (!(flags & MSG_WAITALL) || (*recvd == len))
return TRUE; return TRUE;
/* otherwise, fall through */
} }
*recvd = pSSL_read(connection->ssl_s, buf, len); *recvd += pSSL_read(connection->ssl_s, (char*)buf + *recvd, len - *recvd);
if (flags & MSG_PEEK) /* must copy stuff into buffer */ if (flags & MSG_PEEK) /* must copy stuff into buffer */
{ {
connection->peek_len = *recvd;
if (!*recvd) if (!*recvd)
{ {
HeapFree(GetProcessHeap(), 0, connection->peek_msg_mem); HeapFree(GetProcessHeap(), 0, connection->peek_msg_mem);
@ -486,10 +558,7 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f
connection->peek_msg = NULL; connection->peek_msg = NULL;
} }
else else
{
memcpy(connection->peek_msg, buf, *recvd); memcpy(connection->peek_msg, buf, *recvd);
connection->peek_msg[*recvd] = '\0';
}
} }
if (*recvd < 1 && len) if (*recvd < 1 && len)
return FALSE; return FALSE;
@ -500,6 +569,36 @@ BOOL NETCON_recv(WININET_NETCONNECTION *connection, void *buf, size_t len, int f
} }
} }
/******************************************************************************
* NETCON_query_data_available
* Returns the number of bytes of peeked data plus the number of bytes of
* queued, but unread data.
*/
BOOL NETCON_query_data_available(WININET_NETCONNECTION *connection, DWORD *available)
{
*available = 0;
if (!NETCON_connected(connection))
return FALSE;
#ifdef SONAME_LIBSSL
if (connection->peek_msg) *available = connection->peek_len;
#endif
#ifdef FIONREAD
if (!connection->useSSL)
{
int unread;
int retval = ioctl(connection->socketFD, FIONREAD, &unread);
if (!retval)
{
TRACE("%d bytes of queued, but unread data\n", unread);
*available += unread;
}
}
#endif
return TRUE;
}
/****************************************************************************** /******************************************************************************
* NETCON_getNextLine * NETCON_getNextLine
*/ */
@ -516,7 +615,6 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
fd_set infd; fd_set infd;
BOOL bSuccess = FALSE; BOOL bSuccess = FALSE;
DWORD nRecv = 0; DWORD nRecv = 0;
int r;
FD_ZERO(&infd); FD_ZERO(&infd);
FD_SET(connection->socketFD, &infd); FD_SET(connection->socketFD, &infd);
@ -527,10 +625,9 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
{ {
if (select(connection->socketFD+1,&infd,NULL,NULL,&tv) > 0) if (select(connection->socketFD+1,&infd,NULL,NULL,&tv) > 0)
{ {
r = recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0); if (recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0) <= 0)
if (0 == r || SOCKET_ERROR == r)
{ {
INTERNET_SetLastError(WSAGetLastError()); INTERNET_SetLastError(sock_get_error(errno));
goto lend; goto lend;
} }
@ -554,7 +651,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
{ {
lpszBuffer[nRecv++] = '\0'; lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv; *dwBuffer = nRecv;
TRACE(":%lu %s\n", nRecv, lpszBuffer); TRACE(":%u %s\n", nRecv, lpszBuffer);
return TRUE; return TRUE;
} }
else else
@ -564,7 +661,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
} }
else else
{ {
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H #ifdef SONAME_LIBSSL
long prev_timeout; long prev_timeout;
DWORD nRecv = 0; DWORD nRecv = 0;
BOOL success = TRUE; BOOL success = TRUE;
@ -595,7 +692,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
{ {
lpszBuffer[nRecv++] = '\0'; lpszBuffer[nRecv++] = '\0';
*dwBuffer = nRecv; *dwBuffer = nRecv;
TRACE("_SSL:%lu %s\n", nRecv, lpszBuffer); TRACE("_SSL:%u %s\n", nRecv, lpszBuffer);
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
@ -608,8 +705,7 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection) LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection)
{ {
#ifdef SONAME_LIBSSL
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
X509* cert; X509* cert;
unsigned char* buffer,*p; unsigned char* buffer,*p;
INT len; INT len;
@ -674,7 +770,7 @@ BOOL NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value)
if (result == -1) if (result == -1)
{ {
WARN("setsockopt failed (%s)\n", strerror(errno)); WARN("setsockopt failed (%s)\n", strerror(errno));
//INTERNET_SetLastError(sock_get_error(errno)); INTERNET_SetLastError(sock_get_error(errno));
return FALSE; return FALSE;
} }

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define IDD_PROXYDLG 0x400 #define IDD_PROXYDLG 0x400

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "windef.h" #include "windef.h"
@ -44,6 +44,7 @@
#include "wininet_Cs.rc" #include "wininet_Cs.rc"
#include "wininet_De.rc" #include "wininet_De.rc"
#include "wininet_En.rc" #include "wininet_En.rc"
#include "wininet_Eo.rc"
#include "wininet_Es.rc" #include "wininet_Es.rc"
#include "wininet_Fi.rc" #include "wininet_Fi.rc"
#include "wininet_Fr.rc" #include "wininet_Fr.rc"
@ -57,5 +58,6 @@
#include "wininet_Pt.rc" #include "wininet_Pt.rc"
#include "wininet_Ru.rc" #include "wininet_Ru.rc"
#include "wininet_Si.rc" #include "wininet_Si.rc"
#include "wininet_Sv.rc"
#include "wininet_Tr.rc" #include "wininet_Tr.rc"
#include "wininet_Uk.rc" #include "wininet_Uk.rc"

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h" #include "config.h"
@ -33,11 +33,11 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "wininet.h" #include "wininet.h"
#include "winerror.h"
#include "winnls.h" #include "winnls.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "internet.h" #include "internet.h"
#define CP_UNIXCP CP_THREAD_ACP
WINE_DEFAULT_DEBUG_CHANNEL(wininet); WINE_DEFAULT_DEBUG_CHANNEL(wininet);
@ -50,7 +50,7 @@ time_t ConvertTimeString(LPCWSTR asctime)
struct tm t; struct tm t;
int timelen = strlenW(asctime); int timelen = strlenW(asctime);
if(!asctime || !timelen) if(!timelen)
return 0; return 0;
/* FIXME: the atoiWs below rely on that tmpChar is \0 padded */ /* FIXME: the atoiWs below rely on that tmpChar is \0 padded */
@ -147,9 +147,9 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
else else
len = strlenW(lpszServerName); len = strlenW(lpszServerName);
sz = WideCharToMultiByte( CP_THREAD_ACP, 0, lpszServerName, len, NULL, 0, NULL, NULL ); sz = WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, NULL, 0, NULL, NULL );
name = HeapAlloc(GetProcessHeap(), 0, sz+1); name = HeapAlloc(GetProcessHeap(), 0, sz+1);
WideCharToMultiByte( CP_THREAD_ACP, 0, lpszServerName, len, name, sz, NULL, NULL ); WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, name, sz, NULL, NULL );
name[sz] = 0; name[sz] = 0;
phe = gethostbyname(name); phe = gethostbyname(name);
HeapFree( GetProcessHeap(), 0, name ); HeapFree( GetProcessHeap(), 0, name );
@ -210,11 +210,10 @@ static const char *get_callback_name(DWORD dwInternetStatus) {
return "Unknown"; return "Unknown";
} }
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext, VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength) DWORD dwStatusInfoLength)
{ {
HINTERNET hHttpSession;
LPVOID lpvNewInfo = NULL; LPVOID lpvNewInfo = NULL;
if( !hdr->lpfnStatusCB ) if( !hdr->lpfnStatusCB )
@ -225,12 +224,6 @@ VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
if( !dwContext ) if( !dwContext )
return; return;
hHttpSession = WININET_FindHandle( hdr );
if( !hHttpSession ) {
TRACE(" Could not convert header '%p' into a handle !\n", hdr);
return;
}
lpvNewInfo = lpvStatusInfo; lpvNewInfo = lpvStatusInfo;
if(hdr->dwInternalFlags & INET_CALLBACKW) { if(hdr->dwInternalFlags & INET_CALLBACKW) {
switch(dwInternetStatus) { switch(dwInternetStatus) {
@ -238,38 +231,60 @@ VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
case INTERNET_STATUS_CONNECTING_TO_SERVER: case INTERNET_STATUS_CONNECTING_TO_SERVER:
case INTERNET_STATUS_CONNECTED_TO_SERVER: case INTERNET_STATUS_CONNECTED_TO_SERVER:
lpvNewInfo = WININET_strdup_AtoW(lpvStatusInfo); lpvNewInfo = WININET_strdup_AtoW(lpvStatusInfo);
break;
case INTERNET_STATUS_RESOLVING_NAME:
case INTERNET_STATUS_REDIRECT:
lpvNewInfo = WININET_strdupW(lpvStatusInfo);
break;
} }
}else { }else {
switch(dwInternetStatus) switch(dwInternetStatus)
{ {
case INTERNET_STATUS_NAME_RESOLVED:
case INTERNET_STATUS_CONNECTING_TO_SERVER:
case INTERNET_STATUS_CONNECTED_TO_SERVER:
lpvNewInfo = HeapAlloc(GetProcessHeap(), 0, strlen(lpvStatusInfo) + 1);
if (lpvNewInfo) strcpy(lpvNewInfo, lpvStatusInfo);
break;
case INTERNET_STATUS_RESOLVING_NAME: case INTERNET_STATUS_RESOLVING_NAME:
case INTERNET_STATUS_REDIRECT: case INTERNET_STATUS_REDIRECT:
lpvNewInfo = WININET_strdup_WtoA(lpvStatusInfo); lpvNewInfo = WININET_strdup_WtoA(lpvStatusInfo);
break;
} }
} }
TRACE(" callback(%p) (%p (%p), %08lx, %ld (%s), %p, %ld)\n", TRACE(" callback(%p) (%p (%p), %08lx, %d (%s), %p, %d)\n",
hdr->lpfnStatusCB, hHttpSession, hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus), hdr->lpfnStatusCB, hdr->hInternet, hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
lpvNewInfo, dwStatusInfoLength); lpvNewInfo, dwStatusInfoLength);
hdr->lpfnStatusCB(hHttpSession, dwContext, dwInternetStatus, hdr->lpfnStatusCB(hdr->hInternet, dwContext, dwInternetStatus,
lpvNewInfo, dwStatusInfoLength); lpvNewInfo, dwStatusInfoLength);
TRACE(" end callback().\n"); TRACE(" end callback().\n");
if(lpvNewInfo != lpvStatusInfo) if(lpvNewInfo != lpvStatusInfo)
HeapFree(GetProcessHeap(), 0, lpvNewInfo); HeapFree(GetProcessHeap(), 0, lpvNewInfo);
WININET_Release( hdr );
} }
static void SendAsyncCallbackProc(WORKREQUEST *workRequest)
{
struct WORKREQ_SENDCALLBACK const *req = &workRequest->u.SendCallback;
TRACE("%p\n", workRequest->hdr);
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext, INTERNET_SendCallback(workRequest->hdr,
req->dwContext, req->dwInternetStatus, req->lpvStatusInfo,
req->dwStatusInfoLength);
/* And frees the copy of the status info */
HeapFree(GetProcessHeap(), 0, req->lpvStatusInfo);
}
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo, DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength) DWORD dwStatusInfoLength)
{ {
TRACE("(%p, %08lx, %ld (%s), %p, %ld): %sasync call with callback %p\n", TRACE("(%p, %08lx, %d (%s), %p, %d): %sasync call with callback %p\n",
hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus), hdr, dwContext, dwInternetStatus, get_callback_name(dwInternetStatus),
lpvStatusInfo, dwStatusInfoLength, lpvStatusInfo, dwStatusInfoLength,
hdr->dwFlags & INTERNET_FLAG_ASYNC ? "" : "non ", hdr->dwFlags & INTERNET_FLAG_ASYNC ? "" : "non ",
@ -290,7 +305,7 @@ VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD dwContext,
memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength); memcpy(lpvStatusInfo_copy, lpvStatusInfo, dwStatusInfoLength);
} }
workRequest.asyncall = SENDCALLBACK; workRequest.asyncproc = SendAsyncCallbackProc;
workRequest.hdr = WININET_AddRef( hdr ); workRequest.hdr = WININET_AddRef( hdr );
req = &workRequest.u.SendCallback; req = &workRequest.u.SendCallback;
req->dwContext = dwContext; req->dwContext = dwContext;

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define WINE_FILEDESCRIPTION_STR "Wine Internet Connectivity" #define WINE_FILEDESCRIPTION_STR "Wine Internet Connectivity"

View file

@ -1,23 +1,24 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="wininet" type="win32dll" baseaddress="${BASEADDRESS_WININET}" installbase="system32" installname="wininet.dll" allowwarnings="true"> <module name="wininet" type="win32dll" baseaddress="${BASEADDRESS_WININET}" installbase="system32" installname="wininet.dll" allowwarnings="true">
<autoregister infsection="OleControlDlls" type="DllInstall" /> <autoregister infsection="OleControlDlls" type="DllInstall" />
<importlibrary definition="wininet.spec.def" /> <importlibrary definition="wininet.spec.def" />
<include base="wininet">.</include> <include base="wininet">.</include>
<include base="ReactOS">include/reactos/wine</include> <include base="ReactOS">include/reactos/wine</include>
<define name="__REACTOS__" /> <define name="__WINESRC__" />
<define name="_WIN32_IE">0x600</define> <define name="WINVER">0x600</define>
<define name="_WIN32_WINNT">0x501</define> <define name="_WIN32_WINNT">0x600</define>
<define name="WINVER">0x501</define>
<library>wine</library> <library>wine</library>
<library>ntdll</library> <library>mpr</library>
<library>kernel32</library> <library>shlwapi</library>
<library>shell32</library>
<library>user32</library> <library>user32</library>
<library>advapi32</library> <library>advapi32</library>
<library>shell32</library> <library>kernel32</library>
<library>shlwapi</library> <library>ntdll</library>
<library>mpr</library>
<library>ws2_32</library>
<library>crypt32</library>
<library>secur32</library> <library>secur32</library>
<library>crypt32</library>
<library>ws2_32</library>
<file>cookie.c</file> <file>cookie.c</file>
<file>dialogs.c</file> <file>dialogs.c</file>
<file>ftp.c</file> <file>ftp.c</file>

View file

@ -169,7 +169,7 @@
@ stdcall InternetOpenUrlW(ptr wstr wstr long long long) @ stdcall InternetOpenUrlW(ptr wstr wstr long long long)
@ stdcall InternetOpenW(wstr long wstr wstr long) @ stdcall InternetOpenW(wstr long wstr wstr long)
@ stdcall InternetQueryDataAvailable(ptr ptr long long) @ stdcall InternetQueryDataAvailable(ptr ptr long long)
@ stub InternetQueryFortezzaStatus @ stdcall InternetQueryFortezzaStatus(ptr long)
@ stdcall InternetQueryOptionA(ptr long ptr ptr) @ stdcall InternetQueryOptionA(ptr long ptr ptr)
@ stdcall InternetQueryOptionW(ptr long ptr ptr) @ stdcall InternetQueryOptionW(ptr long ptr ptr)
@ stdcall InternetReadFile(ptr ptr long ptr) @ stdcall InternetReadFile(ptr ptr long ptr)
@ -209,8 +209,8 @@
@ stub InternetWriteFileExA @ stub InternetWriteFileExA
@ stub InternetWriteFileExW @ stub InternetWriteFileExW
@ stdcall IsHostInProxyBypassList(long str long) @ stdcall IsHostInProxyBypassList(long str long)
@ stub IsUrlCacheEntryExpiredA @ stdcall IsUrlCacheEntryExpiredA(str long ptr)
@ stub IsUrlCacheEntryExpiredW @ stdcall IsUrlCacheEntryExpiredW(wstr long ptr)
@ stub LoadUrlCacheContent @ stub LoadUrlCacheContent
@ stub ParseX509EncodedCertificateForListBoxEntry @ stub ParseX509EncodedCertificateForListBoxEntry
@ stub PrivacyGetZonePreferenceW # (long long ptr ptr ptr) @ stub PrivacyGetZonePreferenceW # (long long ptr ptr ptr)

View file

@ -13,7 +13,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT

View file

@ -16,7 +16,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT LANGUAGE LANG_CZECH, SUBLANG_DEFAULT

View file

@ -13,7 +13,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL

View file

@ -13,10 +13,10 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU

View file

@ -0,0 +1,46 @@
/*
* Wininet Resources - Esperanto Language Support
*
* Copyright 2006 Antonio Codazzi
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Enmetu Retan Pasvorton"
FONT 8, "MS Shell Dlg"
{
LTEXT "Enmetu uzantonomon kaj pasvorton:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Uzanto", -1, 40, 66, 50, 10
LTEXT "Pasvorto", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Storu pasvorton ( RISKE! )", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "Bone", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Rezigni", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "LAN Interkonekto"
}

View file

@ -13,7 +13,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL

View file

@ -13,7 +13,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT

View file

@ -18,7 +18,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL

View file

@ -13,7 +13,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT

View file

@ -1,6 +1,7 @@
/* /*
* Copyright 2003 Mike McCormack for CodeWeavers * Copyright 2003 Mike McCormack for CodeWeavers
* Copyright 2003 Ivan Leo Puoti * Copyright 2003 Ivan Leo Puoti
* Copyright 2006 Antonio Codazzi
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -14,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
@ -33,8 +34,13 @@ FONT 8, "MS Shell Dlg"
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Salva questa password (insicuro)", IDC_SAVEPASSWORD, CHECKBOX "&Memorizza la password ( RISCHIOSO )", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annulla", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "Annulla", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
} }
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Connessione LAN"
}

View file

@ -13,7 +13,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2005 YunSong Hwang * Copyright 2005,2007 YunSong Hwang
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -13,17 +13,17 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "네트워크 암호 입력" CAPTION "네트워크 암호 입력"
FONT 8, "MS Shell Dlg" FONT 8, "MS Shell Dlg"
{ {
LTEXT "당신이 사용자이름과 암호를 입력하시오:", -1, 40, 6, 150, 15 LTEXT "당신의 사용자 이름과 암호를 입력하시오:", -1, 40, 6, 150, 15
LTEXT "프록시", -1, 40, 26, 50, 10 LTEXT "프록시", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10 LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "사용자", -1, 40, 66, 50, 10 LTEXT "사용자", -1, 40, 66, 50, 10

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
@ -39,3 +39,8 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Annuleren", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "Annuleren", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
} }
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "LAN Verbinding"
}

View file

@ -13,10 +13,10 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU

View file

@ -1,27 +1,39 @@
/* /*
* translated by TestamenT * Copyright 2003 Mike McCormack for CodeWeavers
* testament@users.sourceforge.net * Copyright 2006 Mikolaj Zalewski
* https://sourceforge.net/projects/reactospl
* *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Wpisz has³o sieci" CAPTION "WprowadŸ has³o do sieci"
FONT 8, "MS Shell Dlg" FONT 8, "MS Shell Dlg"
{ {
LTEXT "Proszê wpisaæ swoj¹ nazwê u¿ytkownika i has³o:", -1, 40, 6, 150, 15 LTEXT "Proszê wprowadziæ nazwê u¿ytkownika i has³o:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10 LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Domena", -1, 40, 46, 50, 10 LTEXT "Obszar", -1, 40, 46, 50, 10
LTEXT "U¿ytkownik", -1, 40, 66, 50, 10 LTEXT "U¿ytkonik", -1, 40, 66, 50, 10
LTEXT "Has³o", -1, 40, 86, 50, 10 LTEXT "Has³o", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Zapisz to has³o (niebezpieczne)", IDC_SAVEPASSWORD, CHECKBOX "&Zapamiêtaj to has³o (nie bezpieczne)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Anuluj", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "Anuluj", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP

View file

@ -1,5 +1,6 @@
/* /*
* Copyright 2003 Marcelo Duarte * Copyright 2003 Marcelo Duarte
* Copyright 2006-2007 Américo José Melo
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -13,10 +14,10 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
@ -38,7 +39,39 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
} }
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Indicar Senha da Rede"
FONT 8, "MS Shell Dlg"
{
LTEXT "Por favor, indique o nome de utilizador e a senha:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Realm", -1, 40, 46, 50, 10
LTEXT "Utilizador", -1, 40, 66, 50, 10
LTEXT "Senha", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Gravar esta senha (inseguro)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Cancelar", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE
{ {
IDS_LANCONNECTION "Conexão LAN" IDS_LANCONNECTION "Conexão LAN"
} }
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "Ligação LAN"
}

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT

View file

@ -13,7 +13,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT

View file

@ -0,0 +1,44 @@
/*
* Copyright 2007 Daniel Nylander
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Ange nätverkslösenord"
FONT 8, "MS Shell Dlg"
{
LTEXT "Ange ditt användarnamn och lösenord:", -1, 40, 6, 150, 15
LTEXT "Proxy", -1, 40, 26, 50, 10
LTEXT "Domän", -1, 40, 46, 50, 10
LTEXT "Användarnamn", -1, 40, 66, 50, 10
LTEXT "Lösenord", -1, 40, 86, 50, 10
LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
CHECKBOX "&Spara detta lösenord (osäkert)", IDC_SAVEPASSWORD,
80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
PUSHBUTTON "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
}
STRINGTABLE DISCARDABLE
{
IDS_LANCONNECTION "LAN-anslutning"
}

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT

View file

@ -15,7 +15,7 @@
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <stdarg.h> #include <stdarg.h>
@ -23,6 +23,8 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "winerror.h" #include "winerror.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/debug.h" #include "wine/debug.h"

View file

@ -0,0 +1,344 @@
Index: ftp.c
===================================================================
--- ftp.c (revision 30893)
+++ ftp.c (working copy)
@@ -58,6 +58,7 @@
#include "wine/debug.h"
#include "internet.h"
+typedef size_t socklen_t;
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
Index: http.c
===================================================================
--- http.c (revision 30893)
+++ http.c (working copy)
@@ -60,6 +60,8 @@
#include "wine/debug.h"
#include "wine/unicode.h"
+#include "inet_ntop.c"
+
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
static const WCHAR g_szHttp1_0[] = {' ','H','T','T','P','/','1','.','0',0 };
Index: inet_ntop.c
===================================================================
--- inet_ntop.c (revision 30893)
+++ inet_ntop.c (working copy)
@@ -0,0 +1,189 @@
+/* from NetBSD: inet_ntop.c,v 1.9 2000/01/22 22:19:16 mycroft Exp */
+
+/* Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#define ENOSPC 28
+#define EAFNOSUPPORT 52
+
+#ifndef IN6ADDRSZ
+#define IN6ADDRSZ 16
+#endif
+
+#ifndef INT16SZ
+#define INT16SZ 2
+#endif
+
+#ifdef SPRINTF_CHAR
+# define SPRINTF(x) strlen(sprintf/**/x)
+#else
+# define SPRINTF(x) ((size_t)sprintf x)
+#endif
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static const char *inet_ntop4(const u_char *src, char *dst, size_t size);
+static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
+
+/* char *
+ * inet_ntop(af, src, dst, size)
+ * convert a network format address to presentation format.
+ * return:
+ * pointer to presentation format address (`dst'), or NULL (see errno).
+ * author:
+ * Paul Vixie, 1996.
+ */
+const char *
+inet_ntop(int af, const void *src, char *dst, size_t size)
+{
+
+ switch (af) {
+ case AF_INET:
+ return (inet_ntop4(src, dst, size));
+#ifdef INET6
+ case AF_INET6:
+ return (inet_ntop6(src, dst, size));
+#endif
+ default:
+ errno = EAFNOSUPPORT;
+ return (NULL);
+ }
+ /* NOTREACHED */
+}
+
+/* const char *
+ * inet_ntop4(src, dst, size)
+ * format an IPv4 address, more or less like inet_ntoa()
+ * return:
+ * `dst' (as a const)
+ * notes:
+ * (1) uses no statics
+ * (2) takes a u_char* not an in_addr as input
+ * author:
+ * Paul Vixie, 1996.
+ */
+static const char *
+inet_ntop4(const u_char *src, char *dst, size_t size)
+{
+ static const char fmt[] = "%u.%u.%u.%u";
+ char tmp[sizeof "255.255.255.255"];
+
+ if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
+ errno = ENOSPC;
+ return (NULL);
+ }
+ strcpy(dst, tmp);
+ return (dst);
+}
+
+#ifdef INET6
+/* const char *
+ * inet_ntop6(src, dst, size)
+ * convert IPv6 binary address into presentation (printable) format
+ * author:
+ * Paul Vixie, 1996.
+ */
+static const char *
+inet_ntop6(const u_char *src, char *dst, size_t size)
+{
+ /*
+ * Note that int32_t and int16_t need only be "at least" large enough
+ * to contain a value of the specified size. On some systems, like
+ * Crays, there is no such thing as an integer variable with 16 bits.
+ * Keep this in mind if you think this function should have been coded
+ * to use pointer overlays. All the world's not a VAX.
+ */
+ char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
+ struct { int base, len; } best, cur;
+ u_int words[IN6ADDRSZ / INT16SZ];
+ int i;
+
+ /*
+ * Preprocess:
+ * Copy the input (bytewise) array into a wordwise array.
+ * Find the longest run of 0x00's in src[] for :: shorthanding.
+ */
+ memset(words, '\0', sizeof words);
+ for (i = 0; i < IN6ADDRSZ; i++)
+ words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
+ best.base = -1;
+ cur.base = -1;
+ for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+ if (words[i] == 0) {
+ if (cur.base == -1)
+ cur.base = i, cur.len = 1;
+ else
+ cur.len++;
+ } else {
+ if (cur.base != -1) {
+ if (best.base == -1 || cur.len > best.len)
+ best = cur;
+ cur.base = -1;
+ }
+ }
+ }
+ if (cur.base != -1) {
+ if (best.base == -1 || cur.len > best.len)
+ best = cur;
+ }
+ if (best.base != -1 && best.len < 2)
+ best.base = -1;
+
+ /*
+ * Format the result.
+ */
+ tp = tmp;
+ for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+ /* Are we inside the best run of 0x00's? */
+ if (best.base != -1 && i >= best.base &&
+ i < (best.base + best.len)) {
+ if (i == best.base)
+ *tp++ = ':';
+ continue;
+ }
+ /* Are we following an initial run of 0x00s or any real hex? */
+ if (i != 0)
+ *tp++ = ':';
+ /* Is this address an encapsulated IPv4? */
+ if (i == 6 && best.base == 0 &&
+ (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+ if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
+ return (NULL);
+ tp += strlen(tp);
+ break;
+ }
+ tp += SPRINTF((tp, "%x", words[i]));
+ }
+ /* Was it a trailing run of 0x00's? */
+ if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
+ *tp++ = ':';
+ *tp++ = '\0';
+
+ /*
+ * Check for overflow, copy, and we're done.
+ */
+ if ((size_t)(tp - tmp) > size) {
+ errno = ENOSPC;
+ return (NULL);
+ }
+ strcpy(dst, tmp);
+ return (dst);
+}
+#endif
+
Index: internet.c
===================================================================
--- internet.c (revision 30893)
+++ internet.c (working copy)
@@ -67,6 +67,7 @@
#include "resource.h"
#include "wine/unicode.h"
+#define CP_UNIXCP CP_THREAD_ACP
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
Index: netconnection.c
===================================================================
--- netconnection.c (revision 30893)
+++ netconnection.c (working copy)
@@ -58,6 +58,8 @@
#include "internet.h"
#define RESPONSE_TIMEOUT 30 /* FROM internet.c */
+#define sock_get_error(x) WSAGetLastError()
+#undef FIONREAD
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
@@ -200,6 +202,7 @@
return TRUE;
}
+#ifndef __REACTOS__
/* translate a unix error code into a winsock one */
static int sock_get_error( int err )
{
@@ -263,6 +266,7 @@
default: errno=err; perror("sock_set_error"); return WSAEFAULT;
}
}
+#endif
/******************************************************************************
* NETCON_create
Index: rsrc.rc
===================================================================
--- rsrc.rc (revision 30893)
+++ rsrc.rc (working copy)
@@ -60,3 +60,4 @@
#include "wininet_Si.rc"
#include "wininet_Sv.rc"
#include "wininet_Tr.rc"
+#include "wininet_Uk.rc"
Index: utility.c
===================================================================
--- utility.c (revision 30893)
+++ utility.c (working copy)
@@ -37,6 +37,7 @@
#include "wine/debug.h"
#include "internet.h"
+#define CP_UNIXCP CP_THREAD_ACP
WINE_DEFAULT_DEBUG_CHANNEL(wininet);
Index: wininet.rbuild
===================================================================
--- wininet.rbuild (revision 30893)
+++ wininet.rbuild (working copy)
@@ -18,6 +18,7 @@
<library>ntdll</library>
<library>secur32</library>
<library>crypt32</library>
+ <library>ws2_32</library>
<file>cookie.c</file>
<file>dialogs.c</file>
<file>ftp.c</file>
Index: wininet_Uk.rc
===================================================================
--- wininet_Uk.rc (revision 30893)
+++ wininet_Uk.rc (working copy)
@@ -0,0 +1,46 @@
+/*
+ * wininet.dll (Ukrainian resources)
+ *
+ * Copyright 2006 Artem Reznikov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
+
+IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Ââåä³òü Ìåðåæíèé Ïàðîëü"
+FONT 8, "MS Shell Dlg"
+{
+ LTEXT "Áóäü ëàñêà, ââåä³òü Âàø³ ³ì'ÿ òà ïàðîëü:", -1, 40, 6, 150, 15
+ LTEXT "Ïðîêñ³", -1, 40, 26, 50, 10
+ LTEXT "Îáëàñòü", -1, 40, 46, 50, 10
+ LTEXT "Êîðèñòóâà÷", -1, 40, 66, 50, 10
+ LTEXT "Ïàðîëü", -1, 40, 86, 50, 10
+ LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0
+ LTEXT "" IDC_REALM, 80, 46, 150, 14, 0
+ EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
+ EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD
+ CHECKBOX "&Çáåðåãòè öåé ïàðîëü (íåáåçïå÷íî)", IDC_SAVEPASSWORD,
+ 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
+ PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON
+ PUSHBUTTON "Ñêàñóâàòè", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE DISCARDABLE
+{
+ IDS_LANCONNECTION "ϳäêëþ÷åííÿ ïî ëîêàëüí³é ìåðåæ³"
+}