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 /*****************************************************************************
152 #define ICOM_INTERFACE IBinding
153 #define IBinding_METHODS \
154 ICOM_METHOD (HRESULT,Abort) \
155 ICOM_METHOD (HRESULT,Suspend) \
156 ICOM_METHOD (HRESULT,Resume) \
157 ICOM_METHOD1 (HRESULT,SetPriority, LONG,nPriority) \
158 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
159 ICOM_METHOD4 (HRESULT,GetBindResult, CLSID*,pclsidProtocol, DWORD*,pdwResult, LPOLESTR*,pszResult, DWORD*,pdwReserved)
160 #define IBinding_IMETHODS \
163 ICOM_DEFINE(IBinding
,IUnknown
)
164 #undef ICOM_INTERFACE
166 /*** IUnknown methods ***/
167 #define IBinding_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
168 #define IBinding_AddRef(p) ICOM_CALL (AddRef,p)
169 #define IBinding_Release(p) ICOM_CALL (Release,p)
170 /*** IBinding methods ***/
171 #define IBinding_Abort(p) ICOM_CALL (Abort,p)
172 #define IBinding_Suspend(p) ICOM_CALL (Suspend,p)
173 #define IBinding_Resume(p) ICOM_CALL (Resume,p)
174 #define IBinding_SetPriority(p,a) ICOM_CALL2(SetPriority,p,a)
175 #define IBinding_GetPriority(p,a) ICOM_CALL2(GetPriority,p,a)
176 #define IBinding_GetBindResult(p,a,b,c,d) ICOM_CALL4(GetBindResult,p,a,b,c,d)
178 /*****************************************************************************
179 * IBindStatusCallback interface
181 #define ICOM_INTERFACE IBindStatusCallback
182 #define IBindStatusCallback_METHODS \
183 ICOM_METHOD2 (HRESULT,OnStartBinding, DWORD,dwReserved, IBinding*,pib) \
184 ICOM_METHOD1 (HRESULT,GetPriority, LONG*,pnPriority) \
185 ICOM_METHOD (HRESULT,OnLowResource) \
186 ICOM_METHOD4 (HRESULT,OnProgress, ULONG,ulProgress, ULONG,ulProgressMax, ULONG,ulStatusCode, LPCWSTR,szStatusText) \
187 ICOM_METHOD2 (HRESULT,OnStopBinding, HRESULT,hresult, LPCWSTR,szError) \
188 ICOM_METHOD2 (HRESULT,GetBindInfo, DWORD*,grfBINDF, BINDINFO*,pbindinfo) \
189 ICOM_METHOD4 (HRESULT,OnDataAvailable, DWORD,grfBSCF, DWORD,dwSize, FORMATETC*,pformatetc, STGMEDIUM*,pstgmed) \
190 ICOM_METHOD2 (HRESULT,OnObjectAvailable, REFIID,iid, IUnknown*,punk)
191 #define IBindStatusCallback_IMETHODS \
193 IBindStatusCallback_METHODS
194 ICOM_DEFINE(IBindStatusCallback
,IUnknown
)
195 #undef ICOM_INTERFACE
197 /*** IUnknown methods ***/
198 #define IBindStatusCallback_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
199 #define IBindStatusCallback_AddRef(p) ICOM_CALL (AddRef,p)
200 #define IBindStatusCallback_Release(p) ICOM_CALL (Release,p)
201 /*** IBindStatusCallback methods ***/
202 #define IBindStatusCallback_OnStartBinding(p,a,b) ICOM_CALL2(OnStartBinding,p,a,b)
203 #define IBindStatusCallback_GetPriority(p,a) ICOM_CALL1(GetPriority,p,a)
204 #define IBindStatusCallback_OnLowResource(p) ICOM_CALL (OnLowResource,p)
205 #define IBindStatusCallback_OnProgress(p,a,b,c,d) ICOM_CALL4(OnProgress,p,a,b,c,d)
206 #define IBindStatusCallback_OnStopBinding(p,a,b) ICOM_CALL2(OnStopBinding,p,a,b)
207 #define IBindStatusCallback_GetBindInfo(p,a,b) ICOM_CALL2(GetBindInfo,p,a,b)
208 #define IBindStatusCallback_OnDataAvailable(p,a,b,c,d) ICOM_CALL4(OnDataAvailable,p,a,b,c,d)
209 #define IBindStatusCallback_OnObjectAvailable(p,a,b) ICOM_CALL2(OnObjectAvailable,p,a,b)
211 /*****************************************************************************
212 * IBindHost interface
214 #define ICOM_INTERFACE IBindHost
215 #define IBindHost_METHODS \
216 ICOM_METHOD4 (HRESULT,CreateMoniker, LPOLESTR,szName, IBindCtx*,pBC, IMoniker**,ppmk, DWORD,dwReserved) \
217 ICOM_METHOD5 (HRESULT,MonikerBindToStorage, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj) \
218 ICOM_METHOD5 (HRESULT,MonikerBindToObject, IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj)
219 #define IBindHost_IMETHODS \
222 ICOM_DEFINE(IBindHost
,IUnknown
)
223 #undef ICOM_INTERFACE
225 /*** IUnknown methods ***/
226 #define IBindHost_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
227 #define IBindHost_AddRef(p) ICOM_CALL (AddRef,p)
228 #define IBindHost_Release(p) ICOM_CALL (Release,p)
229 /*** IBindHost methods ***/
230 #define IBindHost_CreateMoniker(p,a,b,c,d) ICOM_CALL4(CreateMoniker,p,a,b,c,d)
231 #define IBindHost_MonikerBindToStorage(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToStorage,p,a,b,c,d,e)
232 #define IBindHost_MonikerBindToObject(p,a,b,c,d,e) ICOM_CALL5(MonikerBindToObject,p,a,b,c,d,e)
234 /*** IUnknown methods ***/
235 typedef enum _tagQUERYOPTION
{
236 QUERY_EXPIRATION_DATE
= 1,
237 QUERY_TIME_OF_LAST_CHANGE
,
238 QUERY_CONTENT_ENCODING
,
245 QUERY_IS_INSTALLEDENTRY
,
246 QUERY_IS_CACHED_OR_MAPPED
,
252 /*****************************************************************************
253 * IWinInetInfo interface
255 #define ICOM_INTERFACE IWinInetInfo
256 #define IWinInetInfo_METHODS \
257 ICOM_METHOD3 (HRESULT,QueryOption, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf)
258 #define IWinInetInfo_IMETHODS \
261 ICOM_DEFINE(IWinInetInfo
,IUnknown
)
262 #undef ICOM_INTERFACE
264 /*** IUnknown methods ***/
265 #define IWinInetInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
266 #define IWinInetInfo_AddRef(p) ICOM_CALL (AddRef,p)
267 #define IWinInetInfo_Release(p) ICOM_CALL (Release,p)
268 /*** IWinInetInfo methods ***/
269 #define IWinInetInfo_QueryOption(p,a,b,c) ICOM_CALL3(QueryOption,p,a,b,c)
271 /*****************************************************************************
272 * IWinInetHttpInfo interface
274 #define ICOM_INTERFACE IWinInetHttpInfo
275 #define IWinInetHttpInfo_METHODS \
276 ICOM_METHOD5 (HRESULT,QueryInfo, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf, DWORD*,pdwFlags, DWORD*,pdwReserved)
277 #define IWinInetHttpInfo_IMETHODS \
278 IWinInetInfo_IMETHODS \
279 IWinInetHttpInfo_METHODS
280 ICOM_DEFINE(IWinInetHttpInfo
,IWinInetInfo
)
281 #undef ICOM_INTERFACE
283 /*** IUnknown methods ***/
284 #define IWinInetHttpInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
285 #define IWinInetHttpInfo_AddRef(p) ICOM_CALL (AddRef,p)
286 #define IWinInetHttpInfo_Release(p) ICOM_CALL (Release,p)
287 /*** IWinInetHttpInfo methods ***/
288 #define IWinInetHttpInfo_QueryInfo(p,a,b,c,d,e) ICOM_CALL5(QueryInfo,p,a,b,c,d,e)
290 HRESULT WINAPI
CreateURLMoniker(IMoniker
*pmkContext
, LPCWSTR szURL
, IMoniker
**ppmk
);
291 HRESULT WINAPI
RegisterBindStatusCallback(IBindCtx
*pbc
, IBindStatusCallback
*pbsc
, IBindStatusCallback
**ppbsc
, DWORD dwReserved
);
295 #endif /* defined(__cplusplus) */
297 #endif /* __WINE_URLMON_H */