advapi32/tests: Fix invalid read in test.
[wine/multimedia.git] / include / httprequest.idl
blobcaa123827fba26f16ed7b51015f359225cb9d399
1 /*
2 * Copyright 2011 Hans Leidekker 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 #include "httprequestid.h"
21 import "oaidl.idl";
24 uuid(662901fc-6951-4854-9eb2-d9a2570f2b2e),
25 helpstring("Microsoft WinHTTP Services, version 5.1"),
26 lcid(0x0000),
27 version(5.1)
29 library WinHttp {
31 importlib ("stdole2.tlb");
33 typedef [public] LONG HTTPREQUEST_PROXY_SETTING;
34 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DEFAULT = 0x00000000;
35 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PRECONFIG = 0x00000000;
36 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DIRECT = 0x00000001;
37 const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PROXY = 0x00000002;
39 typedef [public] LONG HTTPREQUEST_SETCREDENTIALS_FLAGS;
40 const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0x00000000;
41 const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_PROXY = 0x00000001;
43 typedef
44 [uuid(12782009-fe90-4877-9730-e5e183669b19)]
45 enum WinHttpRequestOption
47 WinHttpRequestOption_UserAgentString,
48 WinHttpRequestOption_URL,
49 WinHttpRequestOption_URLCodePage,
50 WinHttpRequestOption_EscapePercentInURL,
51 WinHttpRequestOption_SslErrorIgnoreFlags,
52 WinHttpRequestOption_SelectCertificate,
53 WinHttpRequestOption_EnableRedirects,
54 WinHttpRequestOption_UrlEscapeDisable,
55 WinHttpRequestOption_UrlEscapeDisableQuery,
56 WinHttpRequestOption_SecureProtocols,
57 WinHttpRequestOption_EnableTracing,
58 WinHttpRequestOption_RevertImpersonationOverSsl,
59 WinHttpRequestOption_EnableHttpsToHttpRedirects,
60 WinHttpRequestOption_EnablePassportAuthentication,
61 WinHttpRequestOption_MaxAutomaticRedirects,
62 WinHttpRequestOption_MaxResponseHeaderSize,
63 WinHttpRequestOption_MaxResponseDrainSize,
64 WinHttpRequestOption_EnableHttp1_1,
65 WinHttpRequestOption_EnableCertificateRevocationCheck,
66 WinHttpRequestOption_RejectUserpwd
67 } WinHttpRequestOption;
69 typedef
70 [uuid(9d8a6df8-13de-4b1f-a330-67c719d62514)]
71 enum WinHttpRequestAutoLogonPolicy
73 AutoLogonPolicy_Always,
74 AutoLogonPolicy_OnlyIfBypassProxy,
75 AutoLogonPolicy_Never
76 } WinHttpRequestAutoLogonPolicy;
79 object,
80 uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396b),
81 odl,
82 dual,
83 oleautomation,
84 nonextensible,
85 pointer_default(unique)
87 interface IWinHttpRequest : IDispatch
89 [id(DISPID_HTTPREQUEST_SETPROXY)]
90 HRESULT SetProxy(
91 [in] HTTPREQUEST_PROXY_SETTING proxy_setting,
92 [in, optional] VARIANT proxy_server,
93 [in, optional] VARIANT bypass_list);
95 [id(DISPID_HTTPREQUEST_SETCREDENTIALS)]
96 HRESULT SetCredentials(
97 [in] BSTR username,
98 [in] BSTR password,
99 [in] HTTPREQUEST_SETCREDENTIALS_FLAGS flags);
101 [id(DISPID_HTTPREQUEST_OPEN)]
102 HRESULT Open(
103 [in] BSTR method,
104 [in] BSTR url,
105 [in, optional] VARIANT async);
107 [id(DISPID_HTTPREQUEST_SETREQUESTHEADER)]
108 HRESULT SetRequestHeader(
109 [in] BSTR header,
110 [in] BSTR value);
112 [id(DISPID_HTTPREQUEST_GETRESPONSEHEADER)]
113 HRESULT GetResponseHeader(
114 [in] BSTR header,
115 [out, retval] BSTR *value);
117 [id(DISPID_HTTPREQUEST_GETALLRESPONSEHEADERS)]
118 HRESULT GetAllResponseHeaders(
119 [out, retval] BSTR *headers);
121 [id(DISPID_HTTPREQUEST_SEND)]
122 HRESULT Send(
123 [in, optional] VARIANT body);
125 [propget, id(DISPID_HTTPREQUEST_STATUS)]
126 HRESULT Status(
127 [out, retval] LONG *status);
129 [propget, id(DISPID_HTTPREQUEST_STATUSTEXT)]
130 HRESULT StatusText(
131 [out, retval] BSTR *status);
133 [propget, id(DISPID_HTTPREQUEST_RESPONSETEXT)]
134 HRESULT ResponseText(
135 [out, retval] BSTR *body);
137 [propget, id(DISPID_HTTPREQUEST_RESPONSEBODY)]
138 HRESULT ResponseBody(
139 [out, retval] VARIANT *body);
141 [propget, id(DISPID_HTTPREQUEST_RESPONSESTREAM)]
142 HRESULT ResponseStream(
143 [out, retval] VARIANT *body);
145 [propget, id(DISPID_HTTPREQUEST_OPTION)]
146 HRESULT Option(
147 [in] WinHttpRequestOption option,
148 [out, retval] VARIANT *value);
150 [propput, id(DISPID_HTTPREQUEST_OPTION)]
151 HRESULT Option(
152 [in] WinHttpRequestOption option,
153 [in] VARIANT value);
155 [id(DISPID_HTTPREQUEST_WAITFORRESPONSE)]
156 HRESULT WaitForResponse(
157 [in, optional] VARIANT timeout,
158 [out, retval] VARIANT_BOOL *succeeded);
160 [id(DISPID_HTTPREQUEST_ABORT)]
161 HRESULT Abort();
163 [id(DISPID_HTTPREQUEST_SETTIMEOUTS)]
164 HRESULT SetTimeouts(
165 [in] LONG resolve_timeout,
166 [in] LONG connect_timeout,
167 [in] LONG send_timeout,
168 [in] LONG receive_timeout);
170 [id(DISPID_HTTPREQUEST_SETCLIENTCERTIFICATE)]
171 HRESULT SetClientCertificate(
172 [in] BSTR certificate);
174 [id(DISPID_HTTPREQUEST_SETAUTOLOGONPOLICY)]
175 HRESULT SetAutoLogonPolicy(
176 [in] WinHttpRequestAutoLogonPolicy policy);
179 helpstring("WinHttpRequest Component version 5.1"),
180 threading(apartment),
181 progid("WinHttp.WinHttpRequest.5.1"),
182 uuid(2087c2f4-2cef-4953-a8ab-66779b670495)
184 coclass WinHttpRequest { interface IWinHttpRequest; }
186 } /* WinHttp */