Release 20030408.
[wine/gsoc-2012-control.git] / include / urlmon.h
blob66084498d070c6e0e9dc8fab1227cfdac6407aa3
1 /*
2 * Copyright (C) 2000 Ulrich Czekalla
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #include "rpc.h"
20 #include "rpcndr.h"
21 #ifndef COM_NO_WINDOWS_H
22 #include "windows.h"
23 #include "ole2.h"
24 #endif
26 #ifndef __WINE_URLMON_H
27 #define __WINE_URLMON_H
29 #include "winbase.h"
30 #include "objbase.h"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* defined(__cplusplus) */
36 DEFINE_GUID(IID_IBinding, 0x79EAC9C0, 0xBAF9, 0x11CE,
37 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
38 typedef struct IBinding IBinding,*LPBINDING;
40 DEFINE_GUID(IID_IBindStatusCallback, 0x79EAC9C1, 0xBAF9, 0x11CE,
41 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
42 typedef struct IBindStatusCallback IBindStatusCallback,*LPBINDSTATUSCALLBACK;
44 DEFINE_GUID(IID_IBindHost, 0XFC4801A1, 0X2BA9, 0X11CF,
45 0XA2, 0X29, 0X00, 0XAA, 0X00, 0X3D, 0X73, 0X52);
46 typedef struct IBindHost IBindHost,*LPBINDHOST;
48 DEFINE_GUID(IID_IWinInetInfo, 0x79EAC9D6, 0xBAFA, 0x11CE,
49 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
50 typedef struct IWinInetInfo IWinInetInfo,*LPWININETINFO;
52 DEFINE_GUID(IID_IWinInetHttpInfo, 0x79EAC9D8, 0xBAFA, 0x11CE,
53 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
54 typedef struct IWinInetHttpInfo IWinInetHttpInfo,*LPWININETHTTPINFO;
56 typedef enum {
57 BINDF_ASYNCHRONOUS = 0x00000001,
58 BINDF_ASYNCSTORAGE = 0x00000002,
59 BINDF_NOPROGRESSIVERENDERING = 0x00000004,
60 BINDF_OFFLINEOPERATION = 0x00000008,
61 BINDF_GETNEWESTVERSION = 0x00000010,
62 BINDF_NOWRITECACHE = 0x00000020,
63 BINDF_NEEDFILE = 0x00000040,
64 BINDF_PULLDATA = 0x00000080,
65 BINDF_IGNORESECURITYPROBLEM = 0x00000100,
66 BINDF_RESYNCHRONIZE = 0x00000200,
67 BINDF_HYPERLINK = 0x00000400,
68 BINDF_NO_UI = 0x00000800,
69 BINDF_SILENTOPERATION = 0x00001000,
70 BINDF_PRAGMA_NO_CACHE = 0x00002000,
71 BINDF_GETCLASSOBJECT = 0x00004000,
72 BINDF_RESERVED_1 = 0x00008000,
73 BINDF_FREE_THREADED = 0x00010000,
74 BINDF_DIRECT_READ = 0x00020000,
75 BINDF_FORMS_SUBMIT = 0x00040000,
76 BINDF_GETFROMCACHE_IF_NET_FAIL = 0x00080000,
77 BINDF_FROMURLMON = 0x00100000,
78 BINDF_FWD_BACK = 0x00200000,
79 BINDF_PREFERDEFAULTHANDLER = 0x00400000,
80 BINDF_RESERVED_3 = 0x00800000
81 } BINDF;
83 typedef struct _tagBINDINFO {
84 ULONG cbSize;
85 LPWSTR szExtraInfo;
86 STGMEDIUM stgmedData;
87 DWORD grfBindInfoF;
88 DWORD dwBindVerb;
89 LPWSTR szCustomVerb;
90 DWORD cbStgmedData;
91 DWORD dwOptions;
92 DWORD dwOptionsFlags;
93 DWORD dwCodePage;
94 SECURITY_ATTRIBUTES securityAttributes;
95 IID iid;
96 IUnknown *pUnk;
97 DWORD dwReserved;
98 } BINDINFO;
100 typedef enum {
101 BSCF_FIRSTDATANOTIFICATION = 0x01,
102 BSCF_INTERMEDIATEDATANOTIFICATION = 0x02,
103 BSCF_LASTDATANOTIFICATION = 0x04,
104 BSCF_DATAFULLYAVAILABLE = 0x08,
105 BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10
106 } BSCF;
108 typedef enum BINDSTATUS {
109 BINDSTATUS_FINDINGRESOURCE,
110 BINDSTATUS_CONNECTING,
111 BINDSTATUS_REDIRECTING,
112 BINDSTATUS_BEGINDOWNLOADDATA,
113 BINDSTATUS_DOWNLOADINGDATA,
114 BINDSTATUS_ENDDOWNLOADDATA,
115 BINDSTATUS_BEGINDOWNLOADCOMPONENTS,
116 BINDSTATUS_INSTALLINGCOMPONENTS,
117 BINDSTATUS_ENDDOWNLOADCOMPONENTS,
118 BINDSTATUS_USINGCACHEDCOPY,
119 BINDSTATUS_SENDINGREQUEST,
120 BINDSTATUS_CLASSIDAVAILABLE,
121 BINDSTATUS_MIMETYPEAVAILABLE,
122 BINDSTATUS_CACHEFILENAMEAVAILABLE,
123 BINDSTATUS_BEGINSYNCOPERATION,
124 BINDSTATUS_ENDSYNCOPERATION,
125 BINDSTATUS_BEGINUPLOADDATA,
126 BINDSTATUS_UPLOADINGDATA,
127 BINDSTATUS_ENDUPLOADINGDATA,
128 BINDSTATUS_PROTOCOLCLASSID,
129 BINDSTATUS_ENCODING,
130 BINDSTATUS_VERFIEDMIMETYPEAVAILABLE,
131 BINDSTATUS_CLASSINSTALLLOCATION,
132 BINDSTATUS_DECODING,
133 BINDSTATUS_LOADINGMIMEHANDLER,
134 BINDSTATUS_CONTENTDISPOSITIONATTACH,
135 BINDSTATUS_FILTERREPORTMIMETYPE,
136 BINDSTATUS_CLSIDCANINSTANTIATE,
137 BINDSTATUS_IUNKNOWNAVAILABLE,
138 BINDSTATUS_DIRECTBIND,
139 BINDSTATUS_RAWMIMETYPE,
140 BINDSTATUS_PROXYDETECTING,
141 BINDSTATUS_ACCEPTRANGES
142 } BINDSTATUS;
144 #define MK_S_ASYNCHRONOUS 0x000401E8
145 #define S_ASYNCHRONOUS MK_S_ASYNCHRONOUS
147 #define INET_E_ERROR_FIRST 0x800C0002L
148 #define INET_E_INVALID_URL 0x800C0002L
149 #define INET_E_NO_SESSION 0x800C0003L
150 #define INET_E_CANNOT_CONNECT 0x800C0004L
151 #define INET_E_RESOURCE_NOT_FOUND 0x800C0005L
152 #define INET_E_OBJECT_NOT_FOUND 0x800C0006L
153 #define INET_E_DATA_NOT_AVAILABLE 0x800C0007L
154 #define INET_E_DOWNLOAD_FAILURE 0x800C0008L
155 #define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L
156 #define INET_E_NO_VALID_MEDIA 0x800C000AL
157 #define INET_E_CONNECTION_TIMEOUT 0x800C000BL
158 #define INET_E_INVALID_REQUEST 0x800C000CL
159 #define INET_E_UNKNOWN_PROTOCOL 0x800C000DL
160 #define INET_E_SECURITY_PROBLEM 0x800C000EL
161 #define INET_E_CANNOT_LOAD_DATA 0x800C000FL
162 #define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
163 #define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
164 #define INET_E_REDIRECT_FAILED 0x800C0014L
165 #define INET_E_REDIRECT_TO_DIR 0x800C0015L
166 #define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
167 #define INET_E_ERROR_LAST INET_E_REDIRECT_TO_DIR
170 /*****************************************************************************
171 * IBinding interface
173 #define ICOM_INTERFACE IBinding
174 #define IBinding_METHODS \
175 ICOM_METHOD (HRESULT,Abort) \
176 ICOM_METHOD (HRESULT,Suspend) \
177 ICOM_METHOD (HRESULT,Resume) \
178 ICOM_METHOD1 (HRESULT,SetPriority, LONG,nPriority) \
179 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
180 ICOM_METHOD4 (HRESULT,GetBindResult, CLSID*,pclsidProtocol, DWORD*,pdwResult, LPOLESTR*,pszResult, DWORD*,pdwReserved)
181 #define IBinding_IMETHODS \
182 IUnknown_IMETHODS \
183 IBinding_METHODS
184 ICOM_DEFINE(IBinding,IUnknown)
185 #undef ICOM_INTERFACE
187 /*** IUnknown methods ***/
188 #define IBinding_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
189 #define IBinding_AddRef(p) ICOM_CALL (AddRef,p)
190 #define IBinding_Release(p) ICOM_CALL (Release,p)
191 /*** IBinding methods ***/
192 #define IBinding_Abort(p) ICOM_CALL (Abort,p)
193 #define IBinding_Suspend(p) ICOM_CALL (Suspend,p)
194 #define IBinding_Resume(p) ICOM_CALL (Resume,p)
195 #define IBinding_SetPriority(p,a) ICOM_CALL2(SetPriority,p,a)
196 #define IBinding_GetPriority(p,a) ICOM_CALL2(GetPriority,p,a)
197 #define IBinding_GetBindResult(p,a,b,c,d) ICOM_CALL4(GetBindResult,p,a,b,c,d)
199 /*****************************************************************************
200 * IBindStatusCallback interface
202 #define ICOM_INTERFACE IBindStatusCallback
203 #define IBindStatusCallback_METHODS \
204 ICOM_METHOD2 (HRESULT,OnStartBinding, DWORD,dwReserved, IBinding*,pib) \
205 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
206 ICOM_METHOD (HRESULT,OnLowResource) \
207 ICOM_METHOD4 (HRESULT,OnProgress, ULONG,ulProgress, ULONG,ulProgressMax, ULONG,ulStatusCode, LPCWSTR,szStatusText) \
208 ICOM_METHOD2 (HRESULT,OnStopBinding, HRESULT,hresult, LPCWSTR,szError) \
209 ICOM_METHOD2 (HRESULT,GetBindInfo, DWORD*,grfBINDF, BINDINFO*,pbindinfo) \
210 ICOM_METHOD4 (HRESULT,OnDataAvailable, DWORD,grfBSCF, DWORD,dwSize, FORMATETC*,pformatetc, STGMEDIUM*,pstgmed) \
211 ICOM_METHOD2 (HRESULT,OnObjectAvailable, REFIID,iid, IUnknown*,punk)
212 #define IBindStatusCallback_IMETHODS \
213 IUnknown_IMETHODS \
214 IBindStatusCallback_METHODS
215 ICOM_DEFINE(IBindStatusCallback,IUnknown)
216 #undef ICOM_INTERFACE
218 /*** IUnknown methods ***/
219 #define IBindStatusCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
220 #define IBindStatusCallback_AddRef(p) ICOM_CALL (AddRef,p)
221 #define IBindStatusCallback_Release(p) ICOM_CALL (Release,p)
222 /*** IBindStatusCallback methods ***/
223 #define IBindStatusCallback_OnStartBinding(p,a,b) ICOM_CALL2(OnStartBinding,p,a,b)
224 #define IBindStatusCallback_GetPriority(p,a) ICOM_CALL1(GetPriority,p,a)
225 #define IBindStatusCallback_OnLowResource(p) ICOM_CALL (OnLowResource,p)
226 #define IBindStatusCallback_OnProgress(p,a,b,c,d) ICOM_CALL4(OnProgress,p,a,b,c,d)
227 #define IBindStatusCallback_OnStopBinding(p,a,b) ICOM_CALL2(OnStopBinding,p,a,b)
228 #define IBindStatusCallback_GetBindInfo(p,a,b) ICOM_CALL2(GetBindInfo,p,a,b)
229 #define IBindStatusCallback_OnDataAvailable(p,a,b,c,d) ICOM_CALL4(OnDataAvailable,p,a,b,c,d)
230 #define IBindStatusCallback_OnObjectAvailable(p,a,b) ICOM_CALL2(OnObjectAvailable,p,a,b)
232 /*****************************************************************************
233 * IBindHost interface
235 #define ICOM_INTERFACE IBindHost
236 #define IBindHost_METHODS \
237 ICOM_METHOD4 (HRESULT,CreateMoniker, LPOLESTR,szName, IBindCtx*,pBC, IMoniker**,ppmk, DWORD,dwReserved) \
238 ICOM_METHOD5 (HRESULT,MonikerBindToStorage, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj) \
239 ICOM_METHOD5 (HRESULT,MonikerBindToObject, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj)
240 #define IBindHost_IMETHODS \
241 IUnknown_IMETHODS \
242 IBindHost_METHODS
243 ICOM_DEFINE(IBindHost,IUnknown)
244 #undef ICOM_INTERFACE
246 /*** IUnknown methods ***/
247 #define IBindHost_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
248 #define IBindHost_AddRef(p) ICOM_CALL (AddRef,p)
249 #define IBindHost_Release(p) ICOM_CALL (Release,p)
250 /*** IBindHost methods ***/
251 #define IBindHost_CreateMoniker(p,a,b,c,d) ICOM_CALL4(CreateMoniker,p,a,b,c,d)
252 #define IBindHost_MonikerBindToStorage(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToStorage,p,a,b,c,d,e)
253 #define IBindHost_MonikerBindToObject(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToObject,p,a,b,c,d,e)
255 /*** IUnknown methods ***/
256 typedef enum _tagQUERYOPTION {
257 QUERY_EXPIRATION_DATE = 1,
258 QUERY_TIME_OF_LAST_CHANGE,
259 QUERY_CONTENT_ENCODING,
260 QUERY_CONTENT_TYPE,
261 QUERY_REFRESH,
262 QUERY_RECOMBINE,
263 QUERY_CAN_NAVIGATE,
264 QUERY_USES_NETWORK,
265 QUERY_IS_CACHED,
266 QUERY_IS_INSTALLEDENTRY,
267 QUERY_IS_CACHED_OR_MAPPED,
268 QUERY_USES_CACHE,
269 QUERY_IS_SECURE,
270 QUERY_IS_SAFE
271 } QUERYOPTION;
273 /*****************************************************************************
274 * IWinInetInfo interface
276 #define ICOM_INTERFACE IWinInetInfo
277 #define IWinInetInfo_METHODS \
278 ICOM_METHOD3 (HRESULT,QueryOption, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf)
279 #define IWinInetInfo_IMETHODS \
280 IUnknown_IMETHODS \
281 IWinInetInfo_METHODS
282 ICOM_DEFINE(IWinInetInfo,IUnknown)
283 #undef ICOM_INTERFACE
285 /*** IUnknown methods ***/
286 #define IWinInetInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
287 #define IWinInetInfo_AddRef(p) ICOM_CALL (AddRef,p)
288 #define IWinInetInfo_Release(p) ICOM_CALL (Release,p)
289 /*** IWinInetInfo methods ***/
290 #define IWinInetInfo_QueryOption(p,a,b,c) ICOM_CALL3(QueryOption,p,a,b,c)
292 /*****************************************************************************
293 * IWinInetHttpInfo interface
295 #define ICOM_INTERFACE IWinInetHttpInfo
296 #define IWinInetHttpInfo_METHODS \
297 ICOM_METHOD5 (HRESULT,QueryInfo, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf, DWORD*,pdwFlags, DWORD*,pdwReserved)
298 #define IWinInetHttpInfo_IMETHODS \
299 IWinInetInfo_IMETHODS \
300 IWinInetHttpInfo_METHODS
301 ICOM_DEFINE(IWinInetHttpInfo,IWinInetInfo)
302 #undef ICOM_INTERFACE
304 /*** IUnknown methods ***/
305 #define IWinInetHttpInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
306 #define IWinInetHttpInfo_AddRef(p) ICOM_CALL (AddRef,p)
307 #define IWinInetHttpInfo_Release(p) ICOM_CALL (Release,p)
308 /*** IWinInetHttpInfo methods ***/
309 #define IWinInetHttpInfo_QueryInfo(p,a,b,c,d,e) ICOM_CALL5(QueryInfo,p,a,b,c,d,e)
311 HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk);
312 HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbsc, DWORD dwReserved);
314 #ifdef __cplusplus
315 } /* extern "C" */
316 #endif /* defined(__cplusplus) */
318 #endif /* __WINE_URLMON_H */