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
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_QUERYOPTION_UNKNOWN 0x800C0013L
166 #define INET_E_REDIRECT_FAILED 0x800C0014L
167 #define INET_E_REDIRECT_TO_DIR 0x800C0015L
168 #define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
169 #define INET_E_ERROR_LAST INET_E_REDIRECT_TO_DIR
172 /*****************************************************************************
175 #define ICOM_INTERFACE IBinding
176 #define IBinding_METHODS \
177 ICOM_METHOD (HRESULT,Abort) \
178 ICOM_METHOD (HRESULT,Suspend) \
179 ICOM_METHOD (HRESULT,Resume) \
180 ICOM_METHOD1 (HRESULT,SetPriority, LONG,nPriority) \
181 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
182 ICOM_METHOD4 (HRESULT,GetBindResult, CLSID*,pclsidProtocol, DWORD*,pdwResult, LPOLESTR*,pszResult, DWORD*,pdwReserved)
183 #define IBinding_IMETHODS \
186 ICOM_DEFINE(IBinding
,IUnknown
)
187 #undef ICOM_INTERFACE
189 /*** IUnknown methods ***/
190 #define IBinding_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
191 #define IBinding_AddRef(p) ICOM_CALL (AddRef,p)
192 #define IBinding_Release(p) ICOM_CALL (Release,p)
193 /*** IBinding methods ***/
194 #define IBinding_Abort(p) ICOM_CALL (Abort,p)
195 #define IBinding_Suspend(p) ICOM_CALL (Suspend,p)
196 #define IBinding_Resume(p) ICOM_CALL (Resume,p)
197 #define IBinding_SetPriority(p,a) ICOM_CALL2(SetPriority,p,a)
198 #define IBinding_GetPriority(p,a) ICOM_CALL2(GetPriority,p,a)
199 #define IBinding_GetBindResult(p,a,b,c,d) ICOM_CALL4(GetBindResult,p,a,b,c,d)
201 /*****************************************************************************
202 * IBindStatusCallback interface
204 #define ICOM_INTERFACE IBindStatusCallback
205 #define IBindStatusCallback_METHODS \
206 ICOM_METHOD2 (HRESULT,OnStartBinding, DWORD,dwReserved, IBinding*,pib) \
207 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
208 ICOM_METHOD (HRESULT,OnLowResource) \
209 ICOM_METHOD4 (HRESULT,OnProgress, ULONG,ulProgress, ULONG,ulProgressMax, ULONG,ulStatusCode, LPCWSTR,szStatusText) \
210 ICOM_METHOD2 (HRESULT,OnStopBinding, HRESULT,hresult, LPCWSTR,szError) \
211 ICOM_METHOD2 (HRESULT,GetBindInfo, DWORD*,grfBINDF, BINDINFO*,pbindinfo) \
212 ICOM_METHOD4 (HRESULT,OnDataAvailable, DWORD,grfBSCF, DWORD,dwSize, FORMATETC*,pformatetc, STGMEDIUM*,pstgmed) \
213 ICOM_METHOD2 (HRESULT,OnObjectAvailable, REFIID,iid, IUnknown*,punk)
214 #define IBindStatusCallback_IMETHODS \
216 IBindStatusCallback_METHODS
217 ICOM_DEFINE(IBindStatusCallback
,IUnknown
)
218 #undef ICOM_INTERFACE
220 /*** IUnknown methods ***/
221 #define IBindStatusCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
222 #define IBindStatusCallback_AddRef(p) ICOM_CALL (AddRef,p)
223 #define IBindStatusCallback_Release(p) ICOM_CALL (Release,p)
224 /*** IBindStatusCallback methods ***/
225 #define IBindStatusCallback_OnStartBinding(p,a,b) ICOM_CALL2(OnStartBinding,p,a,b)
226 #define IBindStatusCallback_GetPriority(p,a) ICOM_CALL1(GetPriority,p,a)
227 #define IBindStatusCallback_OnLowResource(p) ICOM_CALL (OnLowResource,p)
228 #define IBindStatusCallback_OnProgress(p,a,b,c,d) ICOM_CALL4(OnProgress,p,a,b,c,d)
229 #define IBindStatusCallback_OnStopBinding(p,a,b) ICOM_CALL2(OnStopBinding,p,a,b)
230 #define IBindStatusCallback_GetBindInfo(p,a,b) ICOM_CALL2(GetBindInfo,p,a,b)
231 #define IBindStatusCallback_OnDataAvailable(p,a,b,c,d) ICOM_CALL4(OnDataAvailable,p,a,b,c,d)
232 #define IBindStatusCallback_OnObjectAvailable(p,a,b) ICOM_CALL2(OnObjectAvailable,p,a,b)
234 /*****************************************************************************
235 * IBindHost interface
237 #define ICOM_INTERFACE IBindHost
238 #define IBindHost_METHODS \
239 ICOM_METHOD4 (HRESULT,CreateMoniker, LPOLESTR,szName, IBindCtx*,pBC, IMoniker**,ppmk, DWORD,dwReserved) \
240 ICOM_METHOD5 (HRESULT,MonikerBindToStorage, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj) \
241 ICOM_METHOD5 (HRESULT,MonikerBindToObject, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj)
242 #define IBindHost_IMETHODS \
245 ICOM_DEFINE(IBindHost
,IUnknown
)
246 #undef ICOM_INTERFACE
248 /*** IUnknown methods ***/
249 #define IBindHost_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
250 #define IBindHost_AddRef(p) ICOM_CALL (AddRef,p)
251 #define IBindHost_Release(p) ICOM_CALL (Release,p)
252 /*** IBindHost methods ***/
253 #define IBindHost_CreateMoniker(p,a,b,c,d) ICOM_CALL4(CreateMoniker,p,a,b,c,d)
254 #define IBindHost_MonikerBindToStorage(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToStorage,p,a,b,c,d,e)
255 #define IBindHost_MonikerBindToObject(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToObject,p,a,b,c,d,e)
257 /*** IUnknown methods ***/
258 typedef enum _tagQUERYOPTION
{
259 QUERY_EXPIRATION_DATE
= 1,
260 QUERY_TIME_OF_LAST_CHANGE
,
261 QUERY_CONTENT_ENCODING
,
268 QUERY_IS_INSTALLEDENTRY
,
269 QUERY_IS_CACHED_OR_MAPPED
,
275 /*****************************************************************************
276 * IWinInetInfo interface
278 #define ICOM_INTERFACE IWinInetInfo
279 #define IWinInetInfo_METHODS \
280 ICOM_METHOD3 (HRESULT,QueryOption, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf)
281 #define IWinInetInfo_IMETHODS \
284 ICOM_DEFINE(IWinInetInfo
,IUnknown
)
285 #undef ICOM_INTERFACE
287 /*** IUnknown methods ***/
288 #define IWinInetInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
289 #define IWinInetInfo_AddRef(p) ICOM_CALL (AddRef,p)
290 #define IWinInetInfo_Release(p) ICOM_CALL (Release,p)
291 /*** IWinInetInfo methods ***/
292 #define IWinInetInfo_QueryOption(p,a,b,c) ICOM_CALL3(QueryOption,p,a,b,c)
294 /*****************************************************************************
295 * IWinInetHttpInfo interface
297 #define ICOM_INTERFACE IWinInetHttpInfo
298 #define IWinInetHttpInfo_METHODS \
299 ICOM_METHOD5 (HRESULT,QueryInfo, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf, DWORD*,pdwFlags, DWORD*,pdwReserved)
300 #define IWinInetHttpInfo_IMETHODS \
301 IWinInetInfo_IMETHODS \
302 IWinInetHttpInfo_METHODS
303 ICOM_DEFINE(IWinInetHttpInfo
,IWinInetInfo
)
304 #undef ICOM_INTERFACE
306 /*** IUnknown methods ***/
307 #define IWinInetHttpInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
308 #define IWinInetHttpInfo_AddRef(p) ICOM_CALL (AddRef,p)
309 #define IWinInetHttpInfo_Release(p) ICOM_CALL (Release,p)
310 /*** IWinInetHttpInfo methods ***/
311 #define IWinInetHttpInfo_QueryInfo(p,a,b,c,d,e) ICOM_CALL5(QueryInfo,p,a,b,c,d,e)
313 HRESULT WINAPI
CreateURLMoniker(IMoniker
*pmkContext
, LPCWSTR szURL
, IMoniker
**ppmk
);
314 HRESULT WINAPI
RegisterBindStatusCallback(IBindCtx
*pbc
, IBindStatusCallback
*pbsc
, IBindStatusCallback
**ppbsc
, DWORD dwReserved
);
318 #endif /* defined(__cplusplus) */
320 #endif /* __WINE_URLMON_H */