Alistair Leslie-Hughes : include: Add IXMLHTTPRequest2/3 interfaces.

Alexandre Julliard julliard at winehq.org
Wed May 12 15:44:31 CDT 2021


Module: wine
Branch: master
Commit: 0a50674c6aabb0368811ece4078a2bb69d7ea1bb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0a50674c6aabb0368811ece4078a2bb69d7ea1bb

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Fri May  7 18:40:50 2021 +1000

include: Add IXMLHTTPRequest2/3 interfaces.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/msxml6.idl | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)

diff --git a/include/msxml6.idl b/include/msxml6.idl
index 5bfb21d04ae..4948de39f1f 100644
--- a/include/msxml6.idl
+++ b/include/msxml6.idl
@@ -52,6 +52,8 @@ interface IXMLDOMEntity;
 interface IXMLDOMEntityReference;
 interface IXMLDOMParseError;
 interface IXMLDOMParseErrorCollection;
+interface IXMLHTTPRequest2Callback;
+interface IXMLHTTPRequest3Callback;
 interface IXTLRuntime;
 interface IXSLTemplate;
 interface IXSLProcessor;
@@ -254,6 +256,35 @@ typedef enum _SCHEMATYPEVARIETY
 } SCHEMATYPEVARIETY;
 cpp_quote("#endif /* __msxml_som_enums__ */")
 
+typedef [v1_enum] enum _XHR_PROPERTY
+{
+    XHR_PROP_NO_CRED_PROMPT,
+    XHR_PROP_NO_AUTH,
+    XHR_PROP_TIMEOUT,
+    XHR_PROP_NO_DEFAULT_HEADERS,
+    XHR_PROP_REPORT_REDIRECT_STATUS,
+    XHR_PROP_NO_CACHE,
+    XHR_PROP_EXTENDED_ERROR,
+    XHR_PROP_QUERY_STRING_UTF8,
+    XHR_PROP_IGNORE_CERT_ERRORS,
+} XHR_PROPERTY;
+
+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 struct tagXHR_CERT
+{
+    DWORD cbCert;
+    [ref, size_is(cbCert)] BYTE *pbCert;
+} XHR_CERT;
+
 [
 local,
 object,
@@ -1309,6 +1340,66 @@ interface IServerXMLHTTPRequest : IXMLHTTPRequest
         [in] VARIANT value);
 }
 
+[
+    object,
+    uuid(e5d37dc0-552a-4d52-9cc0-a14d546fbd04),
+]
+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 *proxyuser, [in, string, unique] const WCHAR *proxypassword);
+
+    HRESULT Send([in, unique] ISequentialStream *body, [in] ULONGLONG length);
+    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 flags, [out] ULONG *cookies_cnt, [out, size_is(,*cookies_cnt)] XHR_COOKIE **cookies);
+    HRESULT GetResponseHeader([in, string, ref] const WCHAR *header, [out, string] WCHAR **value);
+};
+
+[
+    object,
+    uuid(a1c9feee-0617-4f23-9d58-8961ea43567c)
+]
+interface IXMLHTTPRequest3 : IXMLHTTPRequest2
+{
+    HRESULT SetClientCertificate([in] DWORD count, [in, unique, size_is(count)] const BYTE *hashes,
+        [in, string, unique] const WCHAR *pin);
+};
+
+[
+    object,
+    uuid(a44a9299-e321-40de-8866-341b41669162),
+    pointer_default(ref)
+]
+interface IXMLHTTPRequest2Callback : IUnknown
+{
+    HRESULT OnRedirect([in] IXMLHTTPRequest2 *xhr, [in, string] const WCHAR *url);
+    HRESULT OnHeadersAvailable([in] IXMLHTTPRequest2 *xhr, [in] DWORD status, [in, string] const WCHAR *msg);
+    HRESULT OnDataAvailable([in] IXMLHTTPRequest2 *xhr, [in] ISequentialStream *stream);
+    HRESULT OnResponseReceived([in] IXMLHTTPRequest2 *xhr, [in] ISequentialStream *stream);
+    HRESULT OnError([in] IXMLHTTPRequest2 *xhr, [in] HRESULT error);
+};
+
+[
+    object,
+    uuid(b9e57830-8c6c-4a6f-9c13-47772bb047bb)
+]
+interface IXMLHTTPRequest3Callback : IXMLHTTPRequest2Callback
+{
+    HRESULT OnServerCertificateReceived([in] IXMLHTTPRequest3 *xhr, [in] DWORD errors,
+        [in] DWORD count, [in, unique, size_is(count)] const XHR_CERT *certificates);
+
+    HRESULT OnClientCertificateRequested([in] IXMLHTTPRequest3 *xhr,
+        [in] DWORD count, [in, string, unique, size_is(count)] const WCHAR **list);
+};
+
 [
 object,
 dual,
@@ -1607,6 +1698,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
+{
+    [default] interface IXMLHTTPRequest2;
+}
+
 [
     object,
     local,




More information about the wine-cvs mailing list