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
22 #ifndef COM_NO_WINDOWS_H
28 #ifndef __WINE_URLMON_H
29 #define __WINE_URLMON_H
32 #include "wine/obj_base.h"
36 #endif /* defined(__cplusplus) */
38 DEFINE_GUID(IID_IBinding
, 0x79EAC9C0, 0xBAF9, 0x11CE,
39 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
40 typedef struct IBinding IBinding
,*LPBINDING
;
42 DEFINE_GUID(IID_IBindStatusCallback
, 0x79EAC9C1, 0xBAF9, 0x11CE,
43 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
44 typedef struct IBindStatusCallback IBindStatusCallback
,*LPBINDSTATUSCALLBACK
;
46 DEFINE_GUID(IID_IBindHost
, 0XFC4801A1, 0X2BA9, 0X11CF,
47 0XA2, 0X29, 0X00, 0XAA, 0X00, 0X3D, 0X73, 0X52);
48 typedef struct IBindHost IBindHost
,*LPBINDHOST
;
50 DEFINE_GUID(IID_IWinInetInfo
, 0x79EAC9D6, 0xBAFA, 0x11CE,
51 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
52 typedef struct IWinInetInfo IWinInetInfo
,*LPWININETINFO
;
54 DEFINE_GUID(IID_IWinInetHttpInfo
, 0x79EAC9D8, 0xBAFA, 0x11CE,
55 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
56 typedef struct IWinInetHttpInfo IWinInetHttpInfo
,*LPWININETHTTPINFO
;
59 BINDF_ASYNCHRONOUS
= 0x00000001,
60 BINDF_ASYNCSTORAGE
= 0x00000002,
61 BINDF_NOPROGRESSIVERENDERING
= 0x00000004,
62 BINDF_OFFLINEOPERATION
= 0x00000008,
63 BINDF_GETNEWESTVERSION
= 0x00000010,
64 BINDF_NOWRITECACHE
= 0x00000020,
65 BINDF_NEEDFILE
= 0x00000040,
66 BINDF_PULLDATA
= 0x00000080,
67 BINDF_IGNORESECURITYPROBLEM
= 0x00000100,
68 BINDF_RESYNCHRONIZE
= 0x00000200,
69 BINDF_HYPERLINK
= 0x00000400,
70 BINDF_NO_UI
= 0x00000800,
71 BINDF_SILENTOPERATION
= 0x00001000,
72 BINDF_PRAGMA_NO_CACHE
= 0x00002000,
73 BINDF_GETCLASSOBJECT
= 0x00004000,
74 BINDF_RESERVED_1
= 0x00008000,
75 BINDF_FREE_THREADED
= 0x00010000,
76 BINDF_DIRECT_READ
= 0x00020000,
77 BINDF_FORMS_SUBMIT
= 0x00040000,
78 BINDF_GETFROMCACHE_IF_NET_FAIL
= 0x00080000,
79 BINDF_FROMURLMON
= 0x00100000,
80 BINDF_FWD_BACK
= 0x00200000,
81 BINDF_PREFERDEFAULTHANDLER
= 0x00400000,
82 BINDF_RESERVED_3
= 0x00800000
85 typedef struct _tagBINDINFO
{
96 SECURITY_ATTRIBUTES securityAttributes
;
103 BSCF_FIRSTDATANOTIFICATION
= 0x01,
104 BSCF_INTERMEDIATEDATANOTIFICATION
= 0x02,
105 BSCF_LASTDATANOTIFICATION
= 0x04,
106 BSCF_DATAFULLYAVAILABLE
= 0x08,
107 BSCF_AVAILABLEDATASIZEUNKNOWN
= 0x10
110 typedef enum BINDSTATUS
{
111 BINDSTATUS_FINDINGRESOURCE
,
112 BINDSTATUS_CONNECTING
,
113 BINDSTATUS_REDIRECTING
,
114 BINDSTATUS_BEGINDOWNLOADDATA
,
115 BINDSTATUS_DOWNLOADINGDATA
,
116 BINDSTATUS_ENDDOWNLOADDATA
,
117 BINDSTATUS_BEGINDOWNLOADCOMPONENTS
,
118 BINDSTATUS_INSTALLINGCOMPONENTS
,
119 BINDSTATUS_ENDDOWNLOADCOMPONENTS
,
120 BINDSTATUS_USINGCACHEDCOPY
,
121 BINDSTATUS_SENDINGREQUEST
,
122 BINDSTATUS_CLASSIDAVAILABLE
,
123 BINDSTATUS_MIMETYPEAVAILABLE
,
124 BINDSTATUS_CACHEFILENAMEAVAILABLE
,
125 BINDSTATUS_BEGINSYNCOPERATION
,
126 BINDSTATUS_ENDSYNCOPERATION
,
127 BINDSTATUS_BEGINUPLOADDATA
,
128 BINDSTATUS_UPLOADINGDATA
,
129 BINDSTATUS_ENDUPLOADINGDATA
,
130 BINDSTATUS_PROTOCOLCLASSID
,
132 BINDSTATUS_VERFIEDMIMETYPEAVAILABLE
,
133 BINDSTATUS_CLASSINSTALLLOCATION
,
135 BINDSTATUS_LOADINGMIMEHANDLER
,
136 BINDSTATUS_CONTENTDISPOSITIONATTACH
,
137 BINDSTATUS_FILTERREPORTMIMETYPE
,
138 BINDSTATUS_CLSIDCANINSTANTIATE
,
139 BINDSTATUS_IUNKNOWNAVAILABLE
,
140 BINDSTATUS_DIRECTBIND
,
141 BINDSTATUS_RAWMIMETYPE
,
142 BINDSTATUS_PROXYDETECTING
,
143 BINDSTATUS_ACCEPTRANGES
146 #define MK_S_ASYNCHRONOUS 0x000401E8
147 #define S_ASYNCHRONOUS MK_S_ASYNCHRONOUS
149 #define INET_E_ERROR_FIRST 0x800C0002L
150 #define INET_E_INVALID_URL 0x800C0002L
151 #define INET_E_NO_SESSION 0x800C0003L
152 #define INET_E_CANNOT_CONNECT 0x800C0004L
153 #define INET_E_RESOURCE_NOT_FOUND 0x800C0005L
154 #define INET_E_OBJECT_NOT_FOUND 0x800C0006L
155 #define INET_E_DATA_NOT_AVAILABLE 0x800C0007L
156 #define INET_E_DOWNLOAD_FAILURE 0x800C0008L
157 #define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L
158 #define INET_E_NO_VALID_MEDIA 0x800C000AL
159 #define INET_E_CONNECTION_TIMEOUT 0x800C000BL
160 #define INET_E_INVALID_REQUEST 0x800C000CL
161 #define INET_E_UNKNOWN_PROTOCOL 0x800C000DL
162 #define INET_E_SECURITY_PROBLEM 0x800C000EL
163 #define INET_E_CANNOT_LOAD_DATA 0x800C000FL
164 #define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
165 #define INET_E_REDIRECT_FAILED 0x800C0014L
166 #define INET_E_REDIRECT_TO_DIR 0x800C0015L
167 #define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
168 #define INET_E_ERROR_LAST INET_E_REDIRECT_TO_DIR
171 /*****************************************************************************
174 #define ICOM_INTERFACE IBinding
175 #define IBinding_METHODS \
176 ICOM_METHOD (HRESULT,Abort) \
177 ICOM_METHOD (HRESULT,Suspend) \
178 ICOM_METHOD (HRESULT,Resume) \
179 ICOM_METHOD1 (HRESULT,SetPriority, LONG,nPriority) \
180 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
181 ICOM_METHOD4 (HRESULT,GetBindResult, CLSID*,pclsidProtocol, DWORD*,pdwResult, LPOLESTR*,pszResult, DWORD*,pdwReserved)
182 #define IBinding_IMETHODS \
185 ICOM_DEFINE(IBinding
,IUnknown
)
186 #undef ICOM_INTERFACE
188 /*** IUnknown methods ***/
189 #define IBinding_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
190 #define IBinding_AddRef(p) ICOM_CALL (AddRef,p)
191 #define IBinding_Release(p) ICOM_CALL (Release,p)
192 /*** IBinding methods ***/
193 #define IBinding_Abort(p) ICOM_CALL (Abort,p)
194 #define IBinding_Suspend(p) ICOM_CALL (Suspend,p)
195 #define IBinding_Resume(p) ICOM_CALL (Resume,p)
196 #define IBinding_SetPriority(p,a) ICOM_CALL2(SetPriority,p,a)
197 #define IBinding_GetPriority(p,a) ICOM_CALL2(GetPriority,p,a)
198 #define IBinding_GetBindResult(p,a,b,c,d) ICOM_CALL4(GetBindResult,p,a,b,c,d)
200 /*****************************************************************************
201 * IBindStatusCallback interface
203 #define ICOM_INTERFACE IBindStatusCallback
204 #define IBindStatusCallback_METHODS \
205 ICOM_METHOD2 (HRESULT,OnStartBinding, DWORD,dwReserved, IBinding*,pib) \
206 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
207 ICOM_METHOD (HRESULT,OnLowResource) \
208 ICOM_METHOD4 (HRESULT,OnProgress, ULONG,ulProgress, ULONG,ulProgressMax, ULONG,ulStatusCode, LPCWSTR,szStatusText) \
209 ICOM_METHOD2 (HRESULT,OnStopBinding, HRESULT,hresult, LPCWSTR,szError) \
210 ICOM_METHOD2 (HRESULT,GetBindInfo, DWORD*,grfBINDF, BINDINFO*,pbindinfo) \
211 ICOM_METHOD4 (HRESULT,OnDataAvailable, DWORD,grfBSCF, DWORD,dwSize, FORMATETC*,pformatetc, STGMEDIUM*,pstgmed) \
212 ICOM_METHOD2 (HRESULT,OnObjectAvailable, REFIID,iid, IUnknown*,punk)
213 #define IBindStatusCallback_IMETHODS \
215 IBindStatusCallback_METHODS
216 ICOM_DEFINE(IBindStatusCallback
,IUnknown
)
217 #undef ICOM_INTERFACE
219 /*** IUnknown methods ***/
220 #define IBindStatusCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
221 #define IBindStatusCallback_AddRef(p) ICOM_CALL (AddRef,p)
222 #define IBindStatusCallback_Release(p) ICOM_CALL (Release,p)
223 /*** IBindStatusCallback methods ***/
224 #define IBindStatusCallback_OnStartBinding(p,a,b) ICOM_CALL2(OnStartBinding,p,a,b)
225 #define IBindStatusCallback_GetPriority(p,a) ICOM_CALL1(GetPriority,p,a)
226 #define IBindStatusCallback_OnLowResource(p) ICOM_CALL (OnLowResource,p)
227 #define IBindStatusCallback_OnProgress(p,a,b,c,d) ICOM_CALL4(OnProgress,p,a,b,c,d)
228 #define IBindStatusCallback_OnStopBinding(p,a,b) ICOM_CALL2(OnStopBinding,p,a,b)
229 #define IBindStatusCallback_GetBindInfo(p,a,b) ICOM_CALL2(GetBindInfo,p,a,b)
230 #define IBindStatusCallback_OnDataAvailable(p,a,b,c,d) ICOM_CALL4(OnDataAvailable,p,a,b,c,d)
231 #define IBindStatusCallback_OnObjectAvailable(p,a,b) ICOM_CALL2(OnObjectAvailable,p,a,b)
233 /*****************************************************************************
234 * IBindHost interface
236 #define ICOM_INTERFACE IBindHost
237 #define IBindHost_METHODS \
238 ICOM_METHOD4 (HRESULT,CreateMoniker, LPOLESTR,szName, IBindCtx*,pBC, IMoniker**,ppmk, DWORD,dwReserved) \
239 ICOM_METHOD5 (HRESULT,MonikerBindToStorage, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj) \
240 ICOM_METHOD5 (HRESULT,MonikerBindToObject, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj)
241 #define IBindHost_IMETHODS \
244 ICOM_DEFINE(IBindHost
,IUnknown
)
245 #undef ICOM_INTERFACE
247 /*** IUnknown methods ***/
248 #define IBindHost_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
249 #define IBindHost_AddRef(p) ICOM_CALL (AddRef,p)
250 #define IBindHost_Release(p) ICOM_CALL (Release,p)
251 /*** IBindHost methods ***/
252 #define IBindHost_CreateMoniker(p,a,b,c,d) ICOM_CALL4(CreateMoniker,p,a,b,c,d)
253 #define IBindHost_MonikerBindToStorage(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToStorage,p,a,b,c,d,e)
254 #define IBindHost_MonikerBindToObject(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToObject,p,a,b,c,d,e)
256 /*** IUnknown methods ***/
257 typedef enum _tagQUERYOPTION
{
258 QUERY_EXPIRATION_DATE
= 1,
259 QUERY_TIME_OF_LAST_CHANGE
,
260 QUERY_CONTENT_ENCODING
,
267 QUERY_IS_INSTALLEDENTRY
,
268 QUERY_IS_CACHED_OR_MAPPED
,
274 /*****************************************************************************
275 * IWinInetInfo interface
277 #define ICOM_INTERFACE IWinInetInfo
278 #define IWinInetInfo_METHODS \
279 ICOM_METHOD3 (HRESULT,QueryOption, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf)
280 #define IWinInetInfo_IMETHODS \
283 ICOM_DEFINE(IWinInetInfo
,IUnknown
)
284 #undef ICOM_INTERFACE
286 /*** IUnknown methods ***/
287 #define IWinInetInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
288 #define IWinInetInfo_AddRef(p) ICOM_CALL (AddRef,p)
289 #define IWinInetInfo_Release(p) ICOM_CALL (Release,p)
290 /*** IWinInetInfo methods ***/
291 #define IWinInetInfo_QueryOption(p,a,b,c) ICOM_CALL3(QueryOption,p,a,b,c)
293 /*****************************************************************************
294 * IWinInetHttpInfo interface
296 #define ICOM_INTERFACE IWinInetHttpInfo
297 #define IWinInetHttpInfo_METHODS \
298 ICOM_METHOD5 (HRESULT,QueryInfo, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf, DWORD*,pdwFlags, DWORD*,pdwReserved)
299 #define IWinInetHttpInfo_IMETHODS \
300 IWinInetInfo_IMETHODS \
301 IWinInetHttpInfo_METHODS
302 ICOM_DEFINE(IWinInetHttpInfo
,IWinInetInfo
)
303 #undef ICOM_INTERFACE
305 /*** IUnknown methods ***/
306 #define IWinInetHttpInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
307 #define IWinInetHttpInfo_AddRef(p) ICOM_CALL (AddRef,p)
308 #define IWinInetHttpInfo_Release(p) ICOM_CALL (Release,p)
309 /*** IWinInetHttpInfo methods ***/
310 #define IWinInetHttpInfo_QueryInfo(p,a,b,c,d,e) ICOM_CALL5(QueryInfo,p,a,b,c,d,e)
312 HRESULT WINAPI
CreateURLMoniker(IMoniker
*pmkContext
, LPCWSTR szURL
, IMoniker
**ppmk
);
313 HRESULT WINAPI
RegisterBindStatusCallback(IBindCtx
*pbc
, IBindStatusCallback
*pbsc
, IBindStatusCallback
**ppbsc
, DWORD dwReserved
);
317 #endif /* defined(__cplusplus) */
319 #endif /* __WINE_URLMON_H */