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
e40f814b
Commit
e40f814b
authored
Jan 23, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added IInternetSession::CreateBinding beginning implementation.
parent
1d6132be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
263 additions
and
2 deletions
+263
-2
Makefile.in
dlls/urlmon/Makefile.in
+1
-0
bindprot.c
dlls/urlmon/bindprot.c
+254
-0
session.c
dlls/urlmon/session.c
+6
-2
urlmon_main.h
dlls/urlmon/urlmon_main.h
+2
-0
No files found.
dlls/urlmon/Makefile.in
View file @
e40f814b
...
...
@@ -9,6 +9,7 @@ EXTRALIBS = -luuid
C_SRCS
=
\
binding.c
\
bindprot.c
\
file.c
\
format.c
\
ftp.c
\
...
...
dlls/urlmon/bindprot.c
0 → 100644
View file @
e40f814b
/*
* Copyright 2007 Jacek Caban for CodeWeavers
*
* 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
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "urlmon.h"
#include "urlmon_main.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
urlmon
);
typedef
struct
{
const
IInternetProtocolVtbl
*
lpInternetProtocolVtbl
;
const
IInternetBindInfoVtbl
*
lpInternetBindInfoVtbl
;
LONG
ref
;
}
BindProtocol
;
#define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl)
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl)
#define PROTOCOL_THIS(iface) DEFINE_THIS(BindProtocol, InternetProtocol, iface)
static
HRESULT
WINAPI
BindProtocol_QueryInterface
(
IInternetProtocol
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PROTOCOL
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocolRoot
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocolRoot %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PROTOCOL
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocol
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocol %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PROTOCOL
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IInternetBindInfo
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetBindInfo %p)
\n
"
,
This
,
ppv
);
*
ppv
=
BINDINFO
(
This
);
}
if
(
*
ppv
)
{
IInternetProtocol_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"not supported interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
BindProtocol_AddRef
(
IInternetProtocol
*
iface
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
BindProtocol_Release
(
IInternetProtocol
*
iface
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
URLMON_UnlockModule
();
}
return
ref
;
}
static
HRESULT
WINAPI
BindProtocol_Start
(
IInternetProtocol
*
iface
,
LPCWSTR
szUrl
,
IInternetProtocolSink
*
pOIProtSink
,
IInternetBindInfo
*
pOIBindInfo
,
DWORD
grfPI
,
DWORD
dwReserved
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p %p %08x %d)
\n
"
,
This
,
debugstr_w
(
szUrl
),
pOIProtSink
,
pOIBindInfo
,
grfPI
,
dwReserved
);
if
(
!
szUrl
||
!
pOIProtSink
||
!
pOIBindInfo
)
return
E_INVALIDARG
;
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_Continue
(
IInternetProtocol
*
iface
,
PROTOCOLDATA
*
pProtocolData
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_Abort
(
IInternetProtocol
*
iface
,
HRESULT
hrReason
,
DWORD
dwOptions
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%08x %08x)
\n
"
,
This
,
hrReason
,
dwOptions
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_Terminate
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%08x)
\n
"
,
This
,
dwOptions
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_Suspend
(
IInternetProtocol
*
iface
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_Resume
(
IInternetProtocol
*
iface
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_Read
(
IInternetProtocol
*
iface
,
void
*
pv
,
ULONG
cb
,
ULONG
*
pcbRead
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%p %u %p)
\n
"
,
This
,
pv
,
cb
,
pcbRead
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_Seek
(
IInternetProtocol
*
iface
,
LARGE_INTEGER
dlibMove
,
DWORD
dwOrigin
,
ULARGE_INTEGER
*
plibNewPosition
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%d %d %p)
\n
"
,
This
,
dlibMove
.
u
.
LowPart
,
dwOrigin
,
plibNewPosition
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_LockRequest
(
IInternetProtocol
*
iface
,
DWORD
dwOptions
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)->(%08x)
\n
"
,
This
,
dwOptions
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindProtocol_UnlockRequest
(
IInternetProtocol
*
iface
)
{
BindProtocol
*
This
=
PROTOCOL_THIS
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
#undef PROTOCOL_THIS
static
const
IInternetProtocolVtbl
BindProtocolVtbl
=
{
BindProtocol_QueryInterface
,
BindProtocol_AddRef
,
BindProtocol_Release
,
BindProtocol_Start
,
BindProtocol_Continue
,
BindProtocol_Abort
,
BindProtocol_Terminate
,
BindProtocol_Suspend
,
BindProtocol_Resume
,
BindProtocol_Read
,
BindProtocol_Seek
,
BindProtocol_LockRequest
,
BindProtocol_UnlockRequest
};
#define BINDINFO_THIS(iface) DEFINE_THIS(BindProtocol, InternetBindInfo, iface)
static
HRESULT
WINAPI
BindInfo_QueryInterface
(
IInternetBindInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
BindProtocol
*
This
=
BINDINFO_THIS
(
iface
);
return
IInternetProtocol_QueryInterface
(
PROTOCOL
(
This
),
riid
,
ppv
);
}
static
ULONG
WINAPI
BindInfo_AddRef
(
IInternetBindInfo
*
iface
)
{
BindProtocol
*
This
=
BINDINFO_THIS
(
iface
);
return
IBinding_AddRef
(
PROTOCOL
(
This
));
}
static
ULONG
WINAPI
BindInfo_Release
(
IInternetBindInfo
*
iface
)
{
BindProtocol
*
This
=
BINDINFO_THIS
(
iface
);
return
IBinding_Release
(
PROTOCOL
(
This
));
}
static
HRESULT
WINAPI
BindInfo_GetBindInfo
(
IInternetBindInfo
*
iface
,
DWORD
*
grfBINDF
,
BINDINFO
*
pbindinfo
)
{
BindProtocol
*
This
=
BINDINFO_THIS
(
iface
);
FIXME
(
"(%p)->(%p %p)
\n
"
,
This
,
grfBINDF
,
pbindinfo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
BindInfo_GetBindString
(
IInternetBindInfo
*
iface
,
ULONG
ulStringType
,
LPOLESTR
*
ppwzStr
,
ULONG
cEl
,
ULONG
*
pcElFetched
)
{
BindProtocol
*
This
=
BINDINFO_THIS
(
iface
);
FIXME
(
"(%p)->(%d %p %d %p)
\n
"
,
This
,
ulStringType
,
ppwzStr
,
cEl
,
pcElFetched
);
return
E_NOTIMPL
;
}
#undef BINDFO_THIS
static
const
IInternetBindInfoVtbl
InternetBindInfoVtbl
=
{
BindInfo_QueryInterface
,
BindInfo_AddRef
,
BindInfo_Release
,
BindInfo_GetBindInfo
,
BindInfo_GetBindString
};
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
)
{
BindProtocol
*
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BindProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
BindProtocolVtbl
;
ret
->
lpInternetBindInfoVtbl
=
&
InternetBindInfoVtbl
;
ret
->
ref
=
1
;
*
protocol
=
PROTOCOL
(
ret
);
return
S_OK
;
}
dlls/urlmon/session.c
View file @
e40f814b
...
...
@@ -268,9 +268,13 @@ static HRESULT WINAPI InternetSession_CreateBinding(IInternetSession *iface,
LPBC
pBC
,
LPCWSTR
szUrl
,
IUnknown
*
pUnkOuter
,
IUnknown
**
ppUnk
,
IInternetProtocol
**
ppOInetProt
,
DWORD
dwOption
)
{
FIXM
E
(
"(%p %s %p %p %p %08x)
\n
"
,
pBC
,
debugstr_w
(
szUrl
),
pUnkOuter
,
ppUnk
,
TRAC
E
(
"(%p %s %p %p %p %08x)
\n
"
,
pBC
,
debugstr_w
(
szUrl
),
pUnkOuter
,
ppUnk
,
ppOInetProt
,
dwOption
);
return
E_NOTIMPL
;
if
(
pBC
||
pUnkOuter
||
ppUnk
||
dwOption
)
FIXME
(
"Unsupported arguments
\n
"
);
return
create_binding_protocol
(
szUrl
,
ppOInetProt
);
}
static
HRESULT
WINAPI
InternetSession_SetSessionOption
(
IInternetSession
*
iface
,
...
...
dlls/urlmon/urlmon_main.h
View file @
e40f814b
...
...
@@ -60,4 +60,6 @@ HRESULT get_protocol_handler(LPCWSTR url, IClassFactory **ret);
HRESULT
start_binding
(
LPCWSTR
url
,
IBindCtx
*
pbc
,
REFIID
riid
,
void
**
ppv
);
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
);
#endif
/* __WINE_URLMON_MAIN_H */
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