wine-staging/patches/msxml3-FreeThreadedXMLHTTP60/0002-include-Add-IXMLHTTPRequest2-3-interfaces.patch
2020-09-15 11:25:35 +10:00

152 lines
5.2 KiB
Diff

From cf32f7460fe0df6bb9dfb80c5a55473246ff4018 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 3 Sep 2020 17:59:10 +1000
Subject: [PATCH 2/3] include: Add IXMLHTTPRequest2/3 interfaces
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
include/msxml6.idl | 106 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
diff --git a/include/msxml6.idl b/include/msxml6.idl
index 5bfb21d04a..5473fa0bd9 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -244,6 +244,8 @@ typedef enum _SCHEMAWHITESPACE
SCHEMAWHITESPACE_COLLAPSE = 2,
} SCHEMAWHITESPACE;
+interface IXMLHTTPRequest2Callback;
+interface IXMLHTTPRequest3Callback;
typedef enum _SCHEMATYPEVARIETY
{
@@ -393,6 +395,35 @@ interface IXMLDOMNode : IDispatch
[in] VARIANT var1);
}
+typedef struct tagXHR_COOKIE
+{
+ [ref, string] WCHAR *pwszUrl;
+ [ref, string] WCHAR *pwszName;
+ [unique, string] WCHAR *pwszValue;
+ [unique, string] WCHAR *pwszP3PPolicy;
+ FILETIME ftExpires;
+ DWORD dwFlags;
+} XHR_COOKIE;
+
+typedef [v1_enum] enum _XHR_PROPERTY
+{
+ XHR_PROP_NO_CRED_PROMPT = 0x0,
+ XHR_PROP_NO_AUTH = 0x1,
+ XHR_PROP_TIMEOUT = 0x2,
+ XHR_PROP_NO_DEFAULT_HEADERS = 0x3,
+ XHR_PROP_REPORT_REDIRECT_STATUS = 0x4,
+ XHR_PROP_NO_CACHE = 0x5,
+ XHR_PROP_EXTENDED_ERROR = 0x6,
+ XHR_PROP_QUERY_STRING_UTF8 = 0x7,
+ XHR_PROP_IGNORE_CERT_ERRORS = 0x8,
+} XHR_PROPERTY;
+
+typedef struct tagXHR_CERT
+{
+ DWORD cbCert;
+ [ref, size_is(cbCert)] BYTE *pbCert;
+} XHR_CERT;
+
[
local,
object,
@@ -1309,6 +1340,70 @@ interface IServerXMLHTTPRequest : IXMLHTTPRequest
[in] VARIANT value);
}
+[
+ object,
+ uuid(e5d37dc0-552a-4d52-9cc0-a14d546fbd04),
+ helpstring("IXMLHTTPRequest2 Interface")
+]
+interface IXMLHTTPRequest2 : IUnknown
+{
+ HRESULT Open([in, string, ref] const WCHAR *method, [in, string, ref] const WCHAR *url,
+ [in] IXMLHTTPRequest2Callback *callback,
+ [in, string, unique] const WCHAR *username, [in, string, unique] const WCHAR *password,
+ [in, string, unique] const WCHAR *proxy_username, [in, string, unique] const WCHAR *proxy_password);
+ HRESULT Send([in] ISequentialStream *body, [in] ULONGLONG body_size);
+ HRESULT Abort();
+ HRESULT SetCookie([in, ref] const XHR_COOKIE *cookie, [out] DWORD *state);
+ HRESULT SetCustomResponseStream([in] ISequentialStream *stream);
+ HRESULT SetProperty([in] XHR_PROPERTY property, [in] ULONGLONG value);
+ HRESULT SetRequestHeader([in, string, ref] const WCHAR *header, [in, string, unique] const WCHAR *value);
+ HRESULT GetAllResponseHeaders([out, string] WCHAR **headers);
+ HRESULT GetCookie([in, ref, string] const WCHAR *url, [in, unique, string] const WCHAR *name, [in] DWORD dwFlags,
+ [out] ULONG *cookies_count, [out, size_is(,*cookies_count)] XHR_COOKIE **cookies);
+ HRESULT GetResponseHeader([in, string, ref] const WCHAR *header, [out, string] WCHAR **value);
+}
+
+[
+ object,
+ uuid(a1c9feee-0617-4f23-9d58-8961ea43567c),
+ helpstring("IXMLHttpRequest3 Interface")
+]
+interface IXMLHTTPRequest3 : IXMLHTTPRequest2
+{
+ HRESULT SetClientCertificate([in] DWORD hash_size, [in, unique, size_is(hash_size)] const BYTE *hash,
+ [in, string, unique] const WCHAR *pin);
+}
+
+[
+ object,
+ uuid(a44a9299-e321-40de-8866-341b41669162),
+ helpstring("IXMLHTTPRequest2Callback Interface"),
+ pointer_default(ref)
+]
+interface IXMLHTTPRequest2Callback : IUnknown
+{
+ HRESULT OnRedirect([in] IXMLHTTPRequest2 *request, [in, string] const WCHAR* redirect_url);
+ HRESULT OnHeadersAvailable([in] IXMLHTTPRequest2 *request, [in] DWORD status, [in, string] const WCHAR *status_str);
+ HRESULT OnDataAvailable([in] IXMLHTTPRequest2 *request, [in] ISequentialStream *response);
+ HRESULT OnResponseReceived([in] IXMLHTTPRequest2 *request, [in] ISequentialStream *response);
+ HRESULT OnError([in] IXMLHTTPRequest2 *request, [in] HRESULT error);
+}
+
+[
+ object,
+ uuid(b9e57830-8c6c-4a6f-9c13-47772bb047bb),
+ helpstring("IXMLHttpRequest3Callback Interface")
+]
+interface IXMLHTTPRequest3Callback : IXMLHTTPRequest2Callback
+{
+ HRESULT OnServerCertificateReceived([in] IXMLHTTPRequest3 *request, [in] DWORD errors,
+ [in] DWORD chain_size,
+ [in, unique,size_is(chain_size)] const XHR_CERT *chain);
+ HRESULT OnClientCertificateRequested([in] IXMLHTTPRequest3 *request, [in] DWORD issuers_size,
+ [in, string, unique, size_is(issuers_size)] const WCHAR **issuers);
+};
+
+
[
object,
dual,
@@ -1607,6 +1702,17 @@ interface ISAXDeclHandler : IUnknown
[in] int nSystemId);
}
+[
+ helpstring("Free Threaded XML HTTP Request class 6.0"),
+ progid("Msxml2.FreeThreadedXMLHTTP60.6.0"),
+ threading(both),
+ uuid(88d96a09-f192-11d4-a65f-0040963251e5)
+]
+coclass FreeThreadedXMLHTTP60
+{
+ interface IXMLHTTPRequest2;
+}
+
[
object,
local,
--
2.28.0