2 * Copyright 2011 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 typedef struct nsWineURI nsWineURI
;
21 /* Keep sync with request_method_strings in nsio.c */
35 nsIHttpChannel nsIHttpChannel_iface
;
36 nsIUploadChannel nsIUploadChannel_iface
;
37 nsIHttpChannelInternal nsIHttpChannelInternal_iface
;
38 nsICacheInfoChannel nsICacheInfoChannel_iface
;
43 nsIInputStream
*post_data_stream
;
44 BOOL post_data_contains_headers
;
45 nsILoadGroup
*load_group
;
46 nsIInterfaceRequestor
*notif_callback
;
48 nsILoadInfo
*load_info
;
49 nsLoadFlags load_flags
;
54 UINT32 response_status
;
55 char *response_status_text
;
56 REQUEST_METHOD request_method
;
57 struct list response_headers
;
58 struct list request_headers
;
60 nsChannelBSC
*binding
;
64 nsIInputStream
*post_stream
;
70 typedef struct BSCallbackVtbl BSCallbackVtbl
;
73 IBindStatusCallback IBindStatusCallback_iface
;
74 IServiceProvider IServiceProvider_iface
;
75 IHttpNegotiate2 IHttpNegotiate2_iface
;
76 IInternetBindInfo IInternetBindInfo_iface
;
77 IBindCallbackRedirect IBindCallbackRedirect_iface
;
79 const BSCallbackVtbl
*vtbl
;
83 request_data_t request_data
;
86 DWORD bindinfo_options
;
93 HTMLInnerWindow
*window
;
98 typedef struct nsProtocolStream nsProtocolStream
;
100 struct nsChannelBSC
{
103 nsChannel
*nschannel
;
104 nsIStreamListener
*nslistener
;
105 nsISupports
*nscontext
;
108 BOOL response_processed
;
110 nsProtocolStream
*nsstream
;
113 struct BSCallbackVtbl
{
114 void (*destroy
)(BSCallback
*);
115 HRESULT (*init_bindinfo
)(BSCallback
*);
116 HRESULT (*start_binding
)(BSCallback
*);
117 HRESULT (*stop_binding
)(BSCallback
*,HRESULT
);
118 HRESULT (*read_data
)(BSCallback
*,IStream
*);
119 HRESULT (*on_progress
)(BSCallback
*,ULONG
,LPCWSTR
);
120 HRESULT (*on_response
)(BSCallback
*,DWORD
,LPCWSTR
);
121 HRESULT (*beginning_transaction
)(BSCallback
*,WCHAR
**);
130 #define BINDING_NAVIGATED 0x0001
131 #define BINDING_REPLACE 0x0002
132 #define BINDING_FROMHIST 0x0004
133 #define BINDING_REFRESH 0x0008
134 #define BINDING_SUBMIT 0x0010
135 #define BINDING_NOFRAG 0x0020
137 HRESULT
set_http_header(struct list
*,const WCHAR
*,int,const WCHAR
*,int) DECLSPEC_HIDDEN
;
138 HRESULT
create_redirect_nschannel(const WCHAR
*,nsChannel
*,nsChannel
**) DECLSPEC_HIDDEN
;
140 HRESULT
hlink_frame_navigate(HTMLDocument
*,LPCWSTR
,nsChannel
*,DWORD
,BOOL
*) DECLSPEC_HIDDEN
;
141 HRESULT
create_doc_uri(IUri
*,nsWineURI
**) DECLSPEC_HIDDEN
;
142 HRESULT
load_nsuri(HTMLOuterWindow
*,nsWineURI
*,nsIInputStream
*,nsChannelBSC
*,DWORD
) DECLSPEC_HIDDEN
;
143 HRESULT
set_moniker(HTMLOuterWindow
*,IMoniker
*,IUri
*,IBindCtx
*,nsChannelBSC
*,BOOL
) DECLSPEC_HIDDEN
;
144 void prepare_for_binding(HTMLDocument
*,IMoniker
*,DWORD
) DECLSPEC_HIDDEN
;
145 HRESULT
super_navigate(HTMLOuterWindow
*,IUri
*,DWORD
,const WCHAR
*,BYTE
*,DWORD
) DECLSPEC_HIDDEN
;
146 HRESULT
load_uri(HTMLOuterWindow
*,IUri
*,DWORD
) DECLSPEC_HIDDEN
;
147 HRESULT
navigate_new_window(HTMLOuterWindow
*,IUri
*,const WCHAR
*,request_data_t
*,IHTMLWindow2
**) DECLSPEC_HIDDEN
;
148 HRESULT
navigate_url(HTMLOuterWindow
*,const WCHAR
*,IUri
*,DWORD
) DECLSPEC_HIDDEN
;
149 HRESULT
submit_form(HTMLOuterWindow
*,const WCHAR
*,IUri
*,nsIInputStream
*) DECLSPEC_HIDDEN
;
150 void process_document_response_headers(HTMLDocumentNode
*,IBinding
*) DECLSPEC_HIDDEN
;
152 void init_bscallback(BSCallback
*,const BSCallbackVtbl
*,IMoniker
*,DWORD
) DECLSPEC_HIDDEN
;
153 HRESULT
create_channelbsc(IMoniker
*,const WCHAR
*,BYTE
*,DWORD
,BOOL
,nsChannelBSC
**) DECLSPEC_HIDDEN
;
154 HRESULT
channelbsc_load_stream(HTMLInnerWindow
*,IMoniker
*,IStream
*) DECLSPEC_HIDDEN
;
155 void channelbsc_set_channel(nsChannelBSC
*,nsChannel
*,nsIStreamListener
*,nsISupports
*) DECLSPEC_HIDDEN
;
156 IUri
*nsuri_get_uri(nsWineURI
*) DECLSPEC_HIDDEN
;
157 nsresult
create_onload_blocker_request(nsIRequest
**) DECLSPEC_HIDDEN
;
159 HRESULT
read_stream(BSCallback
*,IStream
*,void*,DWORD
,DWORD
*) DECLSPEC_HIDDEN
;
161 HRESULT
create_relative_uri(HTMLOuterWindow
*,const WCHAR
*,IUri
**) DECLSPEC_HIDDEN
;
162 HRESULT
create_uri(const WCHAR
*,DWORD
,IUri
**) DECLSPEC_HIDDEN
;
163 IUri
*get_uri_nofrag(IUri
*) DECLSPEC_HIDDEN
;
165 void set_current_mon(HTMLOuterWindow
*,IMoniker
*,DWORD
) DECLSPEC_HIDDEN
;
166 void set_current_uri(HTMLOuterWindow
*,IUri
*) DECLSPEC_HIDDEN
;