2011-07-23 12:50:11 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2011 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct nsWineURI nsWineURI;
|
|
|
|
|
|
|
|
/* Keep sync with request_method_strings in nsio.c */
|
|
|
|
typedef enum {
|
|
|
|
METHOD_GET,
|
|
|
|
METHOD_PUT,
|
|
|
|
METHOD_POST
|
|
|
|
} REQUEST_METHOD;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
nsIHttpChannel nsIHttpChannel_iface;
|
|
|
|
nsIUploadChannel nsIUploadChannel_iface;
|
|
|
|
nsIHttpChannelInternal nsIHttpChannelInternal_iface;
|
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
nsWineURI *uri;
|
|
|
|
nsIInputStream *post_data_stream;
|
|
|
|
BOOL post_data_contains_headers;
|
|
|
|
nsILoadGroup *load_group;
|
|
|
|
nsIInterfaceRequestor *notif_callback;
|
|
|
|
nsISupports *owner;
|
|
|
|
nsLoadFlags load_flags;
|
|
|
|
nsIURI *original_uri;
|
|
|
|
nsIURI *referrer;
|
|
|
|
char *content_type;
|
|
|
|
char *charset;
|
|
|
|
PRUint32 response_status;
|
|
|
|
REQUEST_METHOD request_method;
|
|
|
|
struct list response_headers;
|
|
|
|
struct list request_headers;
|
|
|
|
} nsChannel;
|
|
|
|
|
|
|
|
typedef struct BSCallbackVtbl BSCallbackVtbl;
|
|
|
|
|
|
|
|
struct BSCallback {
|
|
|
|
IBindStatusCallback IBindStatusCallback_iface;
|
|
|
|
IServiceProvider IServiceProvider_iface;
|
|
|
|
IHttpNegotiate2 IHttpNegotiate2_iface;
|
|
|
|
IInternetBindInfo IInternetBindInfo_iface;
|
|
|
|
|
|
|
|
const BSCallbackVtbl *vtbl;
|
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
LPWSTR headers;
|
|
|
|
HGLOBAL post_data;
|
|
|
|
ULONG post_data_len;
|
|
|
|
ULONG readed;
|
|
|
|
DWORD bindf;
|
|
|
|
BOOL bindinfo_ready;
|
2012-07-27 10:51:39 +02:00
|
|
|
int bom;
|
2011-07-23 12:50:11 +02:00
|
|
|
|
|
|
|
IMoniker *mon;
|
|
|
|
IBinding *binding;
|
|
|
|
|
2012-07-11 13:51:00 +02:00
|
|
|
HTMLInnerWindow *window;
|
2011-07-23 12:50:11 +02:00
|
|
|
|
|
|
|
struct list entry;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct nsProtocolStream nsProtocolStream;
|
|
|
|
|
|
|
|
struct nsChannelBSC {
|
|
|
|
BSCallback bsc;
|
|
|
|
|
|
|
|
nsChannel *nschannel;
|
|
|
|
nsIStreamListener *nslistener;
|
|
|
|
nsISupports *nscontext;
|
|
|
|
BOOL is_js;
|
2012-07-12 14:26:13 +02:00
|
|
|
BOOL is_doc_channel;
|
2012-09-13 12:29:30 +02:00
|
|
|
BOOL response_processed;
|
2011-07-23 12:50:11 +02:00
|
|
|
|
|
|
|
nsProtocolStream *nsstream;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
struct list entry;
|
|
|
|
WCHAR *header;
|
|
|
|
WCHAR *data;
|
|
|
|
} http_header_t;
|
|
|
|
|
|
|
|
HRESULT set_http_header(struct list*,const WCHAR*,int,const WCHAR*,int) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT create_redirect_nschannel(const WCHAR*,nsChannel*,nsChannel**) DECLSPEC_HIDDEN;
|
|
|
|
|
2012-03-15 11:55:01 +01:00
|
|
|
nsresult on_start_uri_open(NSContainer*,nsIURI*,cpp_bool*) DECLSPEC_HIDDEN;
|
2011-07-23 12:50:11 +02:00
|
|
|
HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLSPEC_HIDDEN;
|
2012-09-21 12:24:37 +02:00
|
|
|
HRESULT create_doc_uri(HTMLOuterWindow*,const WCHAR*,nsWineURI**) DECLSPEC_HIDDEN;
|
2012-06-25 14:04:59 +02:00
|
|
|
HRESULT load_nsuri(HTMLOuterWindow*,nsWineURI*,nsChannelBSC*,DWORD) DECLSPEC_HIDDEN;
|
2011-07-23 12:50:11 +02:00
|
|
|
HRESULT set_moniker(HTMLDocument*,IMoniker*,IBindCtx*,nsChannelBSC*,BOOL) DECLSPEC_HIDDEN;
|
2011-11-12 14:33:39 +01:00
|
|
|
void prepare_for_binding(HTMLDocument*,IMoniker*,BOOL) DECLSPEC_HIDDEN;
|
2012-06-25 14:04:59 +02:00
|
|
|
HRESULT super_navigate(HTMLOuterWindow*,IUri*,const WCHAR*,BYTE*,DWORD) DECLSPEC_HIDDEN;
|
|
|
|
HRESULT navigate_new_window(HTMLOuterWindow*,IUri*,const WCHAR*,IHTMLWindow2**) DECLSPEC_HIDDEN;
|
2011-07-23 12:50:11 +02:00
|
|
|
|
2012-07-12 14:26:13 +02:00
|
|
|
HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,BOOL,nsChannelBSC**) DECLSPEC_HIDDEN;
|
2012-07-12 14:25:43 +02:00
|
|
|
HRESULT channelbsc_load_stream(HTMLInnerWindow*,IStream*) DECLSPEC_HIDDEN;
|
2011-07-23 12:50:11 +02:00
|
|
|
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN;
|
2012-01-02 21:57:22 +01:00
|
|
|
IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN;
|
2012-06-25 14:04:59 +02:00
|
|
|
HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN;
|
2012-07-27 10:51:24 +02:00
|
|
|
|
|
|
|
HRESULT bind_mon_to_wstr(HTMLInnerWindow*,IMoniker*,WCHAR**) DECLSPEC_HIDDEN;
|