[PATCH v2 4/4] include: Add IXMLHTTPRequest2/3 interfaces
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Thu Sep 3 05:28:34 CDT 2020
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
include/msxml6.idl | 104 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/include/msxml6.idl b/include/msxml6.idl
index 1f657a8cde..8fd58cc98e 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -109,6 +109,8 @@ interface ISchemaAny;
interface ISchemaIdentityConstraint;
interface ISchemaNotation;
+interface IXMLHTTPRequest2Callback;
+interface IXMLHTTPRequest3Callback;
cpp_quote("#define DOMDocument DOMDocument2")
cpp_quote("#define CLSID_DOMDocument CLSID_DOMDocument2")
@@ -261,6 +263,35 @@ typedef enum _SCHEMATYPEVARIETY
SCHEMATYPEVARIETY_UNION = 2,
} SCHEMATYPEVARIETY;
+typedef struct tagXHR_COOKIE
+{
+ [ref, string] WCHAR *url;
+ [ref, string] WCHAR *name;
+ [unique, string] WCHAR *value;
+ [unique, string] WCHAR *p3_policy;
+ FILETIME expire_time;
+ DWORD flags;
+} 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,
@@ -1265,6 +1296,68 @@ interface IXMLHTTPRequest : IDispatch
HRESULT onreadystatechange([in] IDispatch *pReadyStateSink);
}
+[
+ object,
+ uuid(e5d37dc0-552a-4d52-9cc0-a14d546fbd04),
+ helpstring("IXMLHTTPRequest2 Interface")
+]
+interface IXMLHTTPRequest2 : IUnknown
+{
+ HRESULT Open([in] const WCHAR *method, [in] const WCHAR *url,
+ [in] IXMLHTTPRequest2Callback *callback,
+ [in] const WCHAR *username, [in] const WCHAR *password,
+ [in] const WCHAR *proxy_username, [in] const WCHAR *proxy_password);
+ HRESULT Send([in] ISequentialStream *body, [in] ULONGLONG body_size);
+ HRESULT Abort();
+ HRESULT SetCookie([in] const XHR_COOKIE *cookie, [out] DWORD *state);
+ HRESULT SetCustomResponseStream([in] ISequentialStream *stream);
+ HRESULT SetProperty([in] XHR_PROPERTY property, [in] ULONGLONG value);
+ HRESULT SetRequestHeader([in] const WCHAR *header, [in] const WCHAR *value);
+ HRESULT GetAllResponseHeaders([out] WCHAR **headers);
+ HRESULT GetCookie([in] const WCHAR *url, [in] const WCHAR *name, [in] DWORD dwFlags,
+ [out] ULONG *cookies_count, [out, retval] XHR_COOKIE **cookies);
+ HRESULT GetResponseHeader([in] const WCHAR *header, [out, retval] WCHAR **value);
+}
+
+[
+ object,
+ uuid(a1c9feee-0617-4f23-9d58-8961ea43567c),
+ helpstring("IXMLHttpRequest3 Interface")
+]
+interface IXMLHTTPRequest3 : IXMLHTTPRequest2
+{
+ HRESULT SetClientCertificate([in] DWORD hash_size, [in] const BYTE *hash, [in] 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] const WCHAR* redirect_url);
+ HRESULT OnHeadersAvailable([in] IXMLHTTPRequest2 *request, [in] DWORD status, [in] 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] const XHR_CERT *chain);
+ HRESULT OnClientCertificateRequested([in] IXMLHTTPRequest3 *request, [in] DWORD issuers_size,
+ [in] const WCHAR **issuers);
+};
+
+
[
object,
dual,
@@ -1554,6 +1647,17 @@ coclass XMLHTTP60
[default] interface IXMLHTTPRequest;
}
+[
+ helpstring("Free Threaded XML HTTP Request class 6.0"),
+ progid("Msxml2.FreeThreadedXMLHTTP60.6.0"),
+ threading(both),
+ uuid(88d96a09-f192-11d4-a65f-0040963251e5)
+]
+coclass FreeThreadedXMLHTTP60
+{
+ [default] interface IXMLHTTPRequest2;
+}
+
[
uuid(afba6b42-5692-48ea-8141-dc517dcf0ef1)
]
--
2.28.0
More information about the wine-devel
mailing list