htiframe.idl: Added ITargetFramePriv and ITargetFramePriv2 declarations.
[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 [
24     uuid(662901fc-6951-4854-9eb2-d9a2570f2b2e),
25     helpstring("Microsoft WinHTTP Services, version 5.1"),
26     lcid(0x0000),
27     version(5.1)
28 ]
29 library WinHttp {
30
31 importlib ("stdole2.tlb");
32
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;
38
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;
42
43 typedef
44 [uuid(12782009-fe90-4877-9730-e5e183669b19)]
45 enum WinHttpRequestOption
46 {
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;
68
69 typedef
70 [uuid(9d8a6df8-13de-4b1f-a330-67c719d62514)]
71 enum WinHttpRequestAutoLogonPolicy
72 {
73     AutoLogonPolicy_Always,
74     AutoLogonPolicy_OnlyIfBypassProxy,
75     AutoLogonPolicy_Never
76 } WinHttpRequestAutoLogonPolicy;
77
78 [
79     object,
80     uuid(016fe2ec-b2c8-45f8-b23b-39e53a75396b),
81     odl,
82     dual,
83     oleautomation,
84     nonextensible,
85     pointer_default(unique)
86 ]
87 interface IWinHttpRequest : IDispatch
88 {
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);
94
95     [id(DISPID_HTTPREQUEST_SETCREDENTIALS)]
96     HRESULT SetCredentials(
97         [in] BSTR username,
98         [in] BSTR password,
99         [in] HTTPREQUEST_SETCREDENTIALS_FLAGS flags);
100
101     [id(DISPID_HTTPREQUEST_OPEN)]
102     HRESULT Open(
103         [in] BSTR method,
104         [in] BSTR url,
105         [in, optional] VARIANT async);
106
107     [id(DISPID_HTTPREQUEST_SETREQUESTHEADER)]
108     HRESULT SetRequestHeader(
109         [in] BSTR header,
110         [in] BSTR value);
111
112     [id(DISPID_HTTPREQUEST_GETRESPONSEHEADER)]
113     HRESULT GetResponseHeader(
114         [in] BSTR header,
115         [out, retval] BSTR *value);
116
117     [id(DISPID_HTTPREQUEST_GETALLRESPONSEHEADERS)]
118     HRESULT GetAllResponseHeaders(
119         [out, retval] BSTR *headers);
120
121     [id(DISPID_HTTPREQUEST_SEND)]
122     HRESULT Send(
123         [in, optional] VARIANT body);
124
125     [propget, id(DISPID_HTTPREQUEST_STATUS)]
126     HRESULT Status(
127         [out, retval] LONG *status);
128
129     [propget, id(DISPID_HTTPREQUEST_STATUSTEXT)]
130     HRESULT StatusText(
131         [out, retval] BSTR *status);
132
133     [propget, id(DISPID_HTTPREQUEST_RESPONSETEXT)]
134     HRESULT ResponseText(
135         [out, retval] BSTR *body);
136
137     [propget, id(DISPID_HTTPREQUEST_RESPONSEBODY)]
138     HRESULT ResponseBody(
139         [out, retval] VARIANT *body);
140
141     [propget, id(DISPID_HTTPREQUEST_RESPONSESTREAM)]
142     HRESULT ResponseStream(
143         [out, retval] VARIANT *body);
144
145     [propget, id(DISPID_HTTPREQUEST_OPTION)]
146     HRESULT Option(
147         [in] WinHttpRequestOption option,
148         [out, retval] VARIANT *value);
149
150     [propput, id(DISPID_HTTPREQUEST_OPTION)]
151     HRESULT Option(
152         [in] WinHttpRequestOption option,
153         [in] VARIANT value);
154
155     [id(DISPID_HTTPREQUEST_WAITFORRESPONSE)]
156     HRESULT WaitForResponse(
157         [in, optional] VARIANT timeout,
158         [out, retval] VARIANT_BOOL *succeeded);
159
160     [id(DISPID_HTTPREQUEST_ABORT)]
161     HRESULT Abort();
162
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);
169
170     [id(DISPID_HTTPREQUEST_SETCLIENTCERTIFICATE)]
171     HRESULT SetClientCertificate(
172         [in] BSTR certificate);
173
174     [id(DISPID_HTTPREQUEST_SETAUTOLOGONPOLICY)]
175     HRESULT SetAutoLogonPolicy(
176         [in] WinHttpRequestAutoLogonPolicy policy);
177 }
178 [
179     helpstring("WinHttpRequest Component version 5.1"),
180     threading(apartment),
181     progid("WinHttp.WinHttpRequest.5.1"),
182     uuid(2087c2f4-2cef-4953-a8ab-66779b670495)
183 ]
184 coclass WinHttpRequest { interface IWinHttpRequest; }
185
186 } /* WinHttp */