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