Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5db4caee
Commit
5db4caee
authored
Jan 04, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Don't use DEFINE_THIS2 for the Protocol vtbl functions.
parent
51d05e24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
ftp.c
dlls/urlmon/ftp.c
+6
-5
gopher.c
dlls/urlmon/gopher.c
+5
-4
http.c
dlls/urlmon/http.c
+7
-6
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-2
No files found.
dlls/urlmon/ftp.c
View file @
5db4caee
...
...
@@ -50,12 +50,15 @@ static inline FtpProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface)
return
CONTAINING_RECORD
(
iface
,
FtpProtocol
,
IWinInetHttpInfo_iface
);
}
#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(FtpProtocol, base, iface)
static
inline
FtpProtocol
*
impl_from_Protocol
(
Protocol
*
prot
)
{
return
CONTAINING_RECORD
(
prot
,
FtpProtocol
,
base
);
}
static
HRESULT
FtpProtocol_open_request
(
Protocol
*
prot
,
IUri
*
uri
,
DWORD
request_flags
,
HINTERNET
internet_session
,
IInternetBindInfo
*
bind_info
)
{
FtpProtocol
*
This
=
ASYNCPROTOCOL_THIS
(
prot
);
FtpProtocol
*
This
=
impl_from_Protocol
(
prot
);
BSTR
url
;
HRESULT
hres
;
...
...
@@ -82,7 +85,7 @@ static HRESULT FtpProtocol_end_request(Protocol *prot)
static
HRESULT
FtpProtocol_start_downloading
(
Protocol
*
prot
)
{
FtpProtocol
*
This
=
ASYNCPROTOCOL_THIS
(
prot
);
FtpProtocol
*
This
=
impl_from_Protocol
(
prot
);
DWORD
size
;
BOOL
res
;
...
...
@@ -104,8 +107,6 @@ static void FtpProtocol_on_error(Protocol *prot, DWORD error)
FIXME
(
"(%p) %d - stub
\n
"
,
prot
,
error
);
}
#undef ASYNCPROTOCOL_THIS
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
FtpProtocol_open_request
,
FtpProtocol_end_request
,
...
...
dlls/urlmon/gopher.c
View file @
5db4caee
...
...
@@ -32,12 +32,15 @@ typedef struct {
#define PRIORITY(x) ((IInternetPriority*) &(x)->lpInternetPriorityVtbl)
#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(GopherProtocol, base, iface)
static
inline
GopherProtocol
*
impl_from_Protocol
(
Protocol
*
prot
)
{
return
CONTAINING_RECORD
(
prot
,
GopherProtocol
,
base
);
}
static
HRESULT
GopherProtocol_open_request
(
Protocol
*
prot
,
IUri
*
uri
,
DWORD
request_flags
,
HINTERNET
internet_session
,
IInternetBindInfo
*
bind_info
)
{
GopherProtocol
*
This
=
ASYNCPROTOCOL_THIS
(
prot
);
GopherProtocol
*
This
=
impl_from_Protocol
(
prot
);
BSTR
url
;
HRESULT
hres
;
...
...
@@ -75,8 +78,6 @@ static void GopherProtocol_on_error(Protocol *prot, DWORD error)
FIXME
(
"(%p) %d - stub
\n
"
,
prot
,
error
);
}
#undef ASYNCPROTOCOL_THIS
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
GopherProtocol_open_request
,
GopherProtocol_end_request
,
...
...
dlls/urlmon/http.c
View file @
5db4caee
...
...
@@ -122,12 +122,15 @@ static ULONG send_http_request(HttpProtocol *This)
return
res
?
0
:
GetLastError
();
}
#define ASYNCPROTOCOL_THIS(iface) DEFINE_THIS2(HttpProtocol, base, iface)
static
inline
HttpProtocol
*
impl_from_Protocol
(
Protocol
*
prot
)
{
return
CONTAINING_RECORD
(
prot
,
HttpProtocol
,
base
);
}
static
HRESULT
HttpProtocol_open_request
(
Protocol
*
prot
,
IUri
*
uri
,
DWORD
request_flags
,
HINTERNET
internet_session
,
IInternetBindInfo
*
bind_info
)
{
HttpProtocol
*
This
=
ASYNCPROTOCOL_THIS
(
prot
);
HttpProtocol
*
This
=
impl_from_Protocol
(
prot
);
LPWSTR
addl_header
=
NULL
,
post_cookie
=
NULL
;
IServiceProvider
*
service_provider
=
NULL
;
IHttpNegotiate2
*
http_negotiate2
=
NULL
;
...
...
@@ -306,7 +309,7 @@ static HRESULT HttpProtocol_end_request(Protocol *protocol)
static
HRESULT
HttpProtocol_start_downloading
(
Protocol
*
prot
)
{
HttpProtocol
*
This
=
ASYNCPROTOCOL_THIS
(
prot
);
HttpProtocol
*
This
=
impl_from_Protocol
(
prot
);
LPWSTR
content_type
,
content_length
,
ranges
;
DWORD
len
=
sizeof
(
DWORD
);
DWORD
status_code
;
...
...
@@ -374,7 +377,7 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
static
void
HttpProtocol_close_connection
(
Protocol
*
prot
)
{
HttpProtocol
*
This
=
ASYNCPROTOCOL_THIS
(
prot
);
HttpProtocol
*
This
=
impl_from_Protocol
(
prot
);
if
(
This
->
http_negotiate
)
{
IHttpNegotiate_Release
(
This
->
http_negotiate
);
...
...
@@ -393,8 +396,6 @@ static void HttpProtocol_on_error(Protocol *prot, DWORD error)
FIXME
(
"(%p) %d - stub
\n
"
,
prot
,
error
);
}
#undef ASYNCPROTOCOL_THIS
static
const
ProtocolVtbl
AsyncProtocolVtbl
=
{
HttpProtocol_open_request
,
HttpProtocol_end_request
,
...
...
dlls/urlmon/urlmon_main.h
View file @
5db4caee
...
...
@@ -62,8 +62,7 @@ extern LONG URLMON_refCount;
static
inline
void
URLMON_LockModule
(
void
)
{
InterlockedIncrement
(
&
URLMON_refCount
);
}
static
inline
void
URLMON_UnlockModule
(
void
)
{
InterlockedDecrement
(
&
URLMON_refCount
);
}
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
IInternetProtocolInfo
*
get_protocol_info
(
LPCWSTR
);
HRESULT
get_protocol_handler
(
IUri
*
,
CLSID
*
,
BOOL
*
,
IClassFactory
**
);
...
...
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