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
813e82f2
Commit
813e82f2
authored
Jun 03, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add create_nscallback function to allow using BSCallback out of navigate.c.
parent
beb5366e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
33 deletions
+34
-33
mshtml_private.h
dlls/mshtml/mshtml_private.h
+19
-0
navigate.c
dlls/mshtml/navigate.c
+15
-33
No files found.
dlls/mshtml/mshtml_private.h
View file @
813e82f2
...
...
@@ -45,6 +45,7 @@
typedef
struct
HTMLDOMNode
HTMLDOMNode
;
typedef
struct
ConnectionPoint
ConnectionPoint
;
typedef
struct
BSCallback
BSCallback
;
typedef
struct
{
const
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
...
...
@@ -114,6 +115,19 @@ struct NSContainer {
BOOL
load_call
;
/* hack */
};
struct
BSCallback
{
const
IBindStatusCallbackVtbl
*
lpBindStatusCallbackVtbl
;
const
IServiceProviderVtbl
*
lpServiceProviderVtbl
;
const
IHttpNegotiate2Vtbl
*
lpHttpNegotiate2Vtbl
;
const
IInternetBindInfoVtbl
*
lpInternetBindInfoVtbl
;
LONG
ref
;
LPWSTR
headers
;
HGLOBAL
post_data
;
ULONG
post_data_len
;
};
struct
HTMLDOMNode
{
const
IHTMLDOMNodeVtbl
*
lpHTMLDOMNodeVtbl
;
...
...
@@ -185,6 +199,10 @@ typedef struct {
#define NSWEAKREF(x) ((nsIWeakReference*) &(x)->lpWeakReferenceVtbl)
#define NSSUPWEAKREF(x) ((nsISupportsWeakReference*) &(x)->lpSupportsWeakReferenceVtbl)
#define HTTPNEG(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl)
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
#define HTMLELEM(x) ((IHTMLElement*) &(x)->lpHTMLElementVtbl)
#define HTMLELEM2(x) ((IHTMLElement2*) &(x)->lpHTMLElement2Vtbl)
#define HTMLDOMNODE(x) ((IHTMLDOMNode*) &(x)->lpHTMLDOMNodeVtbl)
...
...
@@ -235,6 +253,7 @@ PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**,PRBool*);
void
nsAString_Finish
(
nsAString
*
);
nsIInputStream
*
create_nsstream
(
const
char
*
,
PRInt32
);
BSCallback
*
create_bscallback
(
HTMLDocument
*
,
LPCOLESTR
);
IHlink
*
Hlink_Create
(
void
);
...
...
dlls/mshtml/navigate.c
View file @
813e82f2
...
...
@@ -41,22 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define STATUSCLB_THIS(iface) DEFINE_THIS(BSCallback, BindStatusCallback, iface)
typedef
struct
{
const
IBindStatusCallbackVtbl
*
lpBindStatusCallbackVtbl
;
const
IServiceProviderVtbl
*
lpServiceProviderVtbl
;
const
IHttpNegotiate2Vtbl
*
lpHttpNegotiate2Vtbl
;
const
IInternetBindInfoVtbl
*
lpInternetBindInfoVtbl
;
LONG
ref
;
LPWSTR
headers
;
HGLOBAL
post_data
;
ULONG
post_data_len
;
}
BSCallback
;
#define HTTPNEG(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl)
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
static
HRESULT
WINAPI
BindStatusCallback_QueryInterface
(
IBindStatusCallback
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
...
...
@@ -375,8 +359,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
BSCServiceProvider_QueryService
};
static
IBindStatusCallback
*
BSCallback_Create
(
HTMLDocument
*
doc
,
LPCOLESTR
url
,
HGLOBAL
post_data
,
ULONG
post_data_len
,
LPWSTR
headers
)
BSCallback
*
create_bscallback
(
HTMLDocument
*
doc
,
LPCOLESTR
url
)
{
BSCallback
*
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
BSCallback
));
...
...
@@ -385,11 +368,11 @@ static IBindStatusCallback *BSCallback_Create(HTMLDocument *doc, LPCOLESTR url,
ret
->
lpHttpNegotiate2Vtbl
=
&
HttpNegotiate2Vtbl
;
ret
->
lpInternetBindInfoVtbl
=
&
InternetBindInfoVtbl
;
ret
->
ref
=
1
;
ret
->
post_data
=
post_data
;
ret
->
headers
=
headers
;
ret
->
post_data_len
=
post_data_len
;
ret
->
post_data
=
NULL
;
ret
->
headers
=
NULL
;
ret
->
post_data_len
=
0
;
return
STATUSCLB
(
ret
)
;
return
ret
;
}
static
void
parse_post_data
(
nsIInputStream
*
post_data_stream
,
LPWSTR
*
headers_ret
,
...
...
@@ -466,22 +449,21 @@ static void parse_post_data(nsIInputStream *post_data_stream, LPWSTR *headers_re
void
hlink_frame_navigate
(
HTMLDocument
*
doc
,
IHlinkFrame
*
hlink_frame
,
LPCWSTR
uri
,
nsIInputStream
*
post_data_stream
,
DWORD
hlnf
)
{
IBindStatus
Callback
*
callback
;
BS
Callback
*
callback
;
IBindCtx
*
bindctx
;
IMoniker
*
mon
;
IHlink
*
hlink
;
PRUint32
post_data_len
=
0
;
HGLOBAL
post_data
=
NULL
;
LPWSTR
headers
=
NULL
;
callback
=
create_bscallback
(
doc
,
uri
);
if
(
post_data_stream
)
{
parse_post_data
(
post_data_stream
,
&
headers
,
&
post_data
,
&
post_data_len
);
TRACE
(
"headers = %s post_data = %s
\n
"
,
debugstr_w
(
headers
),
debugstr_an
(
post_data
,
post_data_len
));
parse_post_data
(
post_data_stream
,
&
callback
->
headers
,
&
callback
->
post_data
,
&
callback
->
post_data_len
);
TRACE
(
"headers = %s post_data = %s
\n
"
,
debugstr_w
(
callback
->
headers
),
debugstr_an
(
callback
->
post_data
,
callback
->
post_data_len
));
}
callback
=
BSCallback_Create
(
doc
,
uri
,
post_data
,
post_data_len
,
headers
);
CreateAsyncBindCtx
(
0
,
callback
,
NULL
,
&
bindctx
);
CreateAsyncBindCtx
(
0
,
STATUSCLB
(
callback
),
NULL
,
&
bindctx
);
hlink
=
Hlink_Create
();
...
...
@@ -493,10 +475,10 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
IHlink_SetTargetFrameName
(
hlink
,
wszBlank
);
/* FIXME */
}
IHlinkFrame_Navigate
(
hlink_frame
,
hlnf
,
bindctx
,
callback
,
hlink
);
IHlinkFrame_Navigate
(
hlink_frame
,
hlnf
,
bindctx
,
STATUSCLB
(
callback
)
,
hlink
);
IBindCtx_Release
(
bindctx
);
IBindStatusCallback_Release
(
callback
);
IBindStatusCallback_Release
(
STATUSCLB
(
callback
)
);
IMoniker_Release
(
mon
);
}
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