Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7426e7e0
Commit
7426e7e0
authored
Jul 19, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Moved more InternetQueryOption implementation to vtbl.
parent
13a95f16
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
64 deletions
+55
-64
ftp.c
dlls/wininet/ftp.c
+3
-6
http.c
dlls/wininet/http.c
+2
-4
internet.c
dlls/wininet/internet.c
+48
-54
internet.h
dlls/wininet/internet.h
+2
-0
No files found.
dlls/wininet/ftp.c
View file @
7426e7e0
...
...
@@ -1227,8 +1227,7 @@ static DWORD FTPFILE_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
return
INET_QueryOption
(
option
,
buffer
,
size
,
unicode
);
}
static
DWORD
FTPFILE_ReadFile
(
WININETHANDLEHEADER
*
hdr
,
void
*
buffer
,
DWORD
size
,
DWORD
*
read
)
...
...
@@ -2194,8 +2193,7 @@ static DWORD FTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
return
INET_QueryOption
(
option
,
buffer
,
size
,
unicode
);
}
static
const
HANDLEHEADERVtbl
FTPSESSIONVtbl
=
{
...
...
@@ -3275,8 +3273,7 @@ static DWORD FTPFINDNEXT_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, voi
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
return
INET_QueryOption
(
option
,
buffer
,
size
,
unicode
);
}
static
DWORD
FTPFINDNEXT_FindNextFileW
(
WININETHANDLEHEADER
*
hdr
,
void
*
data
)
...
...
dlls/wininet/http.c
View file @
7426e7e0
...
...
@@ -1579,8 +1579,7 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
}
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
return
INET_QueryOption
(
option
,
buffer
,
size
,
unicode
);
}
static
DWORD
HTTPREQ_SetOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
size
)
...
...
@@ -3472,8 +3471,7 @@ static DWORD HTTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, voi
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
;
return
INET_QueryOption
(
option
,
buffer
,
size
,
unicode
);
}
static
const
HANDLEHEADERVtbl
HTTPSESSIONVtbl
=
{
...
...
dlls/wininet/internet.c
View file @
7426e7e0
...
...
@@ -533,8 +533,7 @@ static DWORD APPINFO_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
}
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
return
INET_QueryOption
(
option
,
buffer
,
size
,
unicode
);
}
static
const
HANDLEHEADERVtbl
APPINFOVtbl
=
{
...
...
@@ -1955,6 +1954,49 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer,
return
FALSE
;
}
DWORD
INET_QueryOption
(
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
switch
(
option
)
{
case
INTERNET_OPTION_REQUEST_FLAGS
:
TRACE
(
"INTERNET_OPTION_REQUEST_FLAGS
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
(
ULONG
*
)
buffer
=
4
;
*
size
=
sizeof
(
ULONG
);
return
ERROR_SUCCESS
;
case
INTERNET_OPTION_HTTP_VERSION
:
if
(
*
size
<
sizeof
(
HTTP_VERSION_INFO
))
return
ERROR_INSUFFICIENT_BUFFER
;
/*
* Presently hardcoded to 1.1
*/
((
HTTP_VERSION_INFO
*
)
buffer
)
->
dwMajorVersion
=
1
;
((
HTTP_VERSION_INFO
*
)
buffer
)
->
dwMinorVersion
=
1
;
*
size
=
sizeof
(
HTTP_VERSION_INFO
);
return
ERROR_SUCCESS
;
case
INTERNET_OPTION_CONNECTED_STATE
:
FIXME
(
"INTERNET_OPTION_CONNECTED_STATE: semi-stub
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
(
ULONG
*
)
buffer
=
INTERNET_STATE_CONNECTED
;
*
size
=
sizeof
(
ULONG
);
return
ERROR_SUCCESS
;
}
FIXME
(
"Stub for %d
\n
"
,
option
);
return
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
;
}
/***********************************************************************
* INET_QueryOptionHelper (internal)
*/
...
...
@@ -1970,52 +2012,6 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
switch
(
dwOption
)
{
case
INTERNET_OPTION_REQUEST_FLAGS
:
{
ULONG
flags
=
4
;
TRACE
(
"INTERNET_OPTION_REQUEST_FLAGS: %d
\n
"
,
flags
);
if
(
*
lpdwBufferLength
<
sizeof
(
ULONG
))
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
{
memcpy
(
lpBuffer
,
&
flags
,
sizeof
(
ULONG
));
bSuccess
=
TRUE
;
}
*
lpdwBufferLength
=
sizeof
(
ULONG
);
break
;
}
case
INTERNET_OPTION_HTTP_VERSION
:
{
if
(
*
lpdwBufferLength
<
sizeof
(
HTTP_VERSION_INFO
))
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
{
/*
* Presently hardcoded to 1.1
*/
((
HTTP_VERSION_INFO
*
)
lpBuffer
)
->
dwMajorVersion
=
1
;
((
HTTP_VERSION_INFO
*
)
lpBuffer
)
->
dwMinorVersion
=
1
;
bSuccess
=
TRUE
;
}
*
lpdwBufferLength
=
sizeof
(
HTTP_VERSION_INFO
);
break
;
}
case
INTERNET_OPTION_CONNECTED_STATE
:
{
DWORD
*
pdwConnectedState
=
(
DWORD
*
)
lpBuffer
;
FIXME
(
"INTERNET_OPTION_CONNECTED_STATE: semi-stub
\n
"
);
if
(
*
lpdwBufferLength
<
sizeof
(
*
pdwConnectedState
))
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
{
*
pdwConnectedState
=
INTERNET_STATE_CONNECTED
;
bSuccess
=
TRUE
;
}
*
lpdwBufferLength
=
sizeof
(
*
pdwConnectedState
);
break
;
}
case
INTERNET_OPTION_PROXY
:
{
LPWININETAPPINFOW
lpwai
=
(
LPWININETAPPINFOW
)
lpwhh
;
...
...
@@ -2209,19 +2205,17 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
bSuccess
=
TRUE
;
break
;
default:
{
if
(
lpwhh
)
{
DWORD
res
;
if
(
lpwhh
)
res
=
lpwhh
->
vtbl
->
QueryOption
(
lpwhh
,
dwOption
,
lpBuffer
,
lpdwBufferLength
,
bIsUnicode
);
else
res
=
INET_QueryOption
(
dwOption
,
lpBuffer
,
lpdwBufferLength
,
bIsUnicode
);
if
(
res
==
ERROR_SUCCESS
)
bSuccess
=
TRUE
;
else
SetLastError
(
res
);
}
else
{
FIXME
(
"Stub! %d
\n
"
,
dwOption
);
SetLastError
(
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
);
break
;
}
}
}
if
(
lpwhh
)
...
...
dlls/wininet/internet.h
View file @
7426e7e0
...
...
@@ -347,6 +347,8 @@ LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info );
BOOL
WININET_Release
(
LPWININETHANDLEHEADER
info
);
BOOL
WININET_FreeHandle
(
HINTERNET
hinternet
);
DWORD
INET_QueryOption
(
DWORD
,
void
*
,
DWORD
*
,
BOOL
);
time_t
ConvertTimeString
(
LPCWSTR
asctime
);
HINTERNET
FTP_Connect
(
LPWININETAPPINFOW
hIC
,
LPCWSTR
lpszServerName
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment