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
e2933c20
Commit
e2933c20
authored
Mar 12, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Move INTERNET_OPTION_HANDLE_TYPE to vtbl.
parent
d4cff191
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
130 additions
and
27 deletions
+130
-27
ftp.c
dlls/wininet/ftp.c
+57
-0
http.c
dlls/wininet/http.c
+37
-0
internet.c
dlls/wininet/internet.c
+35
-27
internet.h
dlls/wininet/internet.h
+1
-0
No files found.
dlls/wininet/ftp.c
View file @
e2933c20
...
...
@@ -1215,6 +1215,24 @@ static void FTPFILE_Destroy(WININETHANDLEHEADER *hdr)
HeapFree
(
GetProcessHeap
(),
0
,
lpwh
);
}
static
DWORD
FTPFILE_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
switch
(
option
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_FTP_FILE
;
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
DWORD
FTPFILE_ReadFile
(
WININETHANDLEHEADER
*
hdr
,
void
*
buffer
,
DWORD
size
,
DWORD
*
read
)
{
WININETFTPFILE
*
file
=
(
WININETFTPFILE
*
)
hdr
;
...
...
@@ -1244,6 +1262,7 @@ static BOOL FTPFILE_WriteFile(WININETHANDLEHEADER *hdr, const void *buffer, DWOR
static
const
HANDLEHEADERVtbl
FTPFILEVtbl
=
{
FTPFILE_Destroy
,
NULL
,
FTPFILE_QueryOption
,
NULL
,
FTPFILE_ReadFile
,
NULL
,
...
...
@@ -2163,9 +2182,28 @@ static void FTPSESSION_CloseConnection(WININETHANDLEHEADER *hdr)
INTERNET_STATUS_CONNECTION_CLOSED
,
0
,
0
);
}
static
DWORD
FTPSESSION_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
switch
(
option
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_CONNECT_FTP
;
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
const
HANDLEHEADERVtbl
FTPSESSIONVtbl
=
{
FTPSESSION_Destroy
,
FTPSESSION_CloseConnection
,
FTPSESSION_QueryOption
,
NULL
,
NULL
,
NULL
,
...
...
@@ -3229,6 +3267,24 @@ static void FTPFINDNEXT_AsyncFindNextFileProc(WORKREQUEST *workRequest)
FTPFINDNEXT_FindNextFileProc
((
WININETFTPFINDNEXTW
*
)
workRequest
->
hdr
,
req
->
lpFindFileData
);
}
static
DWORD
FTPFINDNEXT_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
switch
(
option
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_FTP_FIND
;
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
DWORD
FTPFINDNEXT_FindNextFileW
(
WININETHANDLEHEADER
*
hdr
,
void
*
data
)
{
WININETFTPFINDNEXTW
*
find
=
(
WININETFTPFINDNEXTW
*
)
hdr
;
...
...
@@ -3254,6 +3310,7 @@ static DWORD FTPFINDNEXT_FindNextFileW(WININETHANDLEHEADER *hdr, void *data)
static
const
HANDLEHEADERVtbl
FTPFINDNEXTVtbl
=
{
FTPFINDNEXT_Destroy
,
NULL
,
FTPFINDNEXT_QueryOption
,
NULL
,
NULL
,
NULL
,
...
...
dlls/wininet/http.c
View file @
e2933c20
...
...
@@ -1403,6 +1403,24 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
INTERNET_STATUS_CONNECTION_CLOSED
,
0
,
0
);
}
static
DWORD
HTTPREQ_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
switch
(
option
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_HTTP_REQUEST
;
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
DWORD
HTTPREQ_SetOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
size
)
{
WININETHTTPREQW
*
req
=
(
WININETHTTPREQW
*
)
hdr
;
...
...
@@ -1589,6 +1607,7 @@ static DWORD HTTPREQ_QueryDataAvailable(WININETHANDLEHEADER *hdr, DWORD *availab
static
const
HANDLEHEADERVtbl
HTTPREQVtbl
=
{
HTTPREQ_Destroy
,
HTTPREQ_CloseConnection
,
HTTPREQ_QueryOption
,
HTTPREQ_SetOption
,
HTTPREQ_ReadFile
,
HTTPREQ_ReadFileExA
,
...
...
@@ -3132,10 +3151,28 @@ static void HTTPSESSION_Destroy(WININETHANDLEHEADER *hdr)
HeapFree
(
GetProcessHeap
(),
0
,
lpwhs
);
}
static
DWORD
HTTPSESSION_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
switch
(
option
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_CONNECT_HTTP
;
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
const
HANDLEHEADERVtbl
HTTPSESSIONVtbl
=
{
HTTPSESSION_Destroy
,
NULL
,
HTTPSESSION_QueryOption
,
NULL
,
NULL
,
NULL
,
...
...
dlls/wininet/internet.c
View file @
e2933c20
...
...
@@ -471,9 +471,28 @@ static VOID APPINFO_Destroy(WININETHANDLEHEADER *hdr)
HeapFree
(
GetProcessHeap
(),
0
,
lpwai
);
}
static
DWORD
APPINFO_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
switch
(
option
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_INTERNET
;
return
ERROR_SUCCESS
;
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
const
HANDLEHEADERVtbl
APPINFOVtbl
=
{
APPINFO_Destroy
,
NULL
,
APPINFO_QueryOption
,
NULL
,
NULL
,
NULL
,
...
...
@@ -1834,32 +1853,6 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
switch
(
dwOption
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
{
ULONG
type
;
if
(
!
lpwhh
)
{
WARN
(
"Invalid hInternet handle
\n
"
);
INTERNET_SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
type
=
lpwhh
->
htype
;
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE: %d
\n
"
,
type
);
if
(
*
lpdwBufferLength
<
sizeof
(
ULONG
))
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
{
memcpy
(
lpBuffer
,
&
type
,
sizeof
(
ULONG
));
bSuccess
=
TRUE
;
}
*
lpdwBufferLength
=
sizeof
(
ULONG
);
break
;
}
case
INTERNET_OPTION_REQUEST_FLAGS
:
{
ULONG
flags
=
4
;
...
...
@@ -1923,6 +1916,10 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
break
;
}
case
INTERNET_OPTION_USER_AGENT
:
FIXME
(
"INTERNET_OPTION_USER_AGENT
\n
"
);
break
;
case
INTERNET_OPTION_DATAFILE_NAME
:
{
TRACE
(
"INTERNET_OPTION_DATAFILE_NAME
\n
"
);
...
...
@@ -2272,10 +2269,21 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
FIXME
(
"66
\n
"
);
bSuccess
=
TRUE
;
break
;
default:
default:
{
if
(
lpwhh
)
{
DWORD
res
;
res
=
lpwhh
->
vtbl
->
QueryOption
(
lpwhh
,
dwOption
,
lpBuffer
,
lpdwBufferLength
,
bIsUnicode
);
if
(
res
==
ERROR_SUCCESS
)
bSuccess
=
TRUE
;
else
SetLastError
(
res
);
}
else
{
FIXME
(
"Stub! %d
\n
"
,
dwOption
);
break
;
}
}
}
if
(
lpwhh
)
WININET_Release
(
lpwhh
);
...
...
dlls/wininet/internet.h
View file @
e2933c20
...
...
@@ -139,6 +139,7 @@ typedef struct _WININETHANDLEHEADER WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
typedef
struct
{
void
(
*
Destroy
)(
WININETHANDLEHEADER
*
);
void
(
*
CloseConnection
)(
WININETHANDLEHEADER
*
);
DWORD
(
*
QueryOption
)(
WININETHANDLEHEADER
*
,
DWORD
,
void
*
,
DWORD
*
,
BOOL
);
DWORD
(
*
SetOption
)(
WININETHANDLEHEADER
*
,
DWORD
,
void
*
,
DWORD
);
DWORD
(
*
ReadFile
)(
WININETHANDLEHEADER
*
,
void
*
,
DWORD
,
DWORD
*
);
DWORD
(
*
ReadFileExA
)(
WININETHANDLEHEADER
*
,
INTERNET_BUFFERSA
*
,
DWORD
,
DWORD_PTR
);
...
...
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