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
21 #ifndef COM_NO_WINDOWS_H
26 #ifndef __WINE_URLMON_H
27 #define __WINE_URLMON_H
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 DEFINE_GUID(IID_IPersistMoniker
, 0x79eac9c9, 0xbaf9, 0x11ce,
57 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
58 typedef struct IPersistMoniker IPersistMoniker
;
61 BINDF_ASYNCHRONOUS
= 0x00000001,
62 BINDF_ASYNCSTORAGE
= 0x00000002,
63 BINDF_NOPROGRESSIVERENDERING
= 0x00000004,
64 BINDF_OFFLINEOPERATION
= 0x00000008,
65 BINDF_GETNEWESTVERSION
= 0x00000010,
66 BINDF_NOWRITECACHE
= 0x00000020,
67 BINDF_NEEDFILE
= 0x00000040,
68 BINDF_PULLDATA
= 0x00000080,
69 BINDF_IGNORESECURITYPROBLEM
= 0x00000100,
70 BINDF_RESYNCHRONIZE
= 0x00000200,
71 BINDF_HYPERLINK
= 0x00000400,
72 BINDF_NO_UI
= 0x00000800,
73 BINDF_SILENTOPERATION
= 0x00001000,
74 BINDF_PRAGMA_NO_CACHE
= 0x00002000,
75 BINDF_GETCLASSOBJECT
= 0x00004000,
76 BINDF_RESERVED_1
= 0x00008000,
77 BINDF_FREE_THREADED
= 0x00010000,
78 BINDF_DIRECT_READ
= 0x00020000,
79 BINDF_FORMS_SUBMIT
= 0x00040000,
80 BINDF_GETFROMCACHE_IF_NET_FAIL
= 0x00080000,
81 BINDF_FROMURLMON
= 0x00100000,
82 BINDF_FWD_BACK
= 0x00200000,
83 BINDF_PREFERDEFAULTHANDLER
= 0x00400000,
84 BINDF_RESERVED_3
= 0x00800000
87 typedef struct _tagBINDINFO
{
98 SECURITY_ATTRIBUTES securityAttributes
;
105 BSCF_FIRSTDATANOTIFICATION
= 0x01,
106 BSCF_INTERMEDIATEDATANOTIFICATION
= 0x02,
107 BSCF_LASTDATANOTIFICATION
= 0x04,
108 BSCF_DATAFULLYAVAILABLE
= 0x08,
109 BSCF_AVAILABLEDATASIZEUNKNOWN
= 0x10
112 typedef enum BINDSTATUS
{
113 BINDSTATUS_FINDINGRESOURCE
,
114 BINDSTATUS_CONNECTING
,
115 BINDSTATUS_REDIRECTING
,
116 BINDSTATUS_BEGINDOWNLOADDATA
,
117 BINDSTATUS_DOWNLOADINGDATA
,
118 BINDSTATUS_ENDDOWNLOADDATA
,
119 BINDSTATUS_BEGINDOWNLOADCOMPONENTS
,
120 BINDSTATUS_INSTALLINGCOMPONENTS
,
121 BINDSTATUS_ENDDOWNLOADCOMPONENTS
,
122 BINDSTATUS_USINGCACHEDCOPY
,
123 BINDSTATUS_SENDINGREQUEST
,
124 BINDSTATUS_CLASSIDAVAILABLE
,
125 BINDSTATUS_MIMETYPEAVAILABLE
,
126 BINDSTATUS_CACHEFILENAMEAVAILABLE
,
127 BINDSTATUS_BEGINSYNCOPERATION
,
128 BINDSTATUS_ENDSYNCOPERATION
,
129 BINDSTATUS_BEGINUPLOADDATA
,
130 BINDSTATUS_UPLOADINGDATA
,
131 BINDSTATUS_ENDUPLOADINGDATA
,
132 BINDSTATUS_PROTOCOLCLASSID
,
134 BINDSTATUS_VERFIEDMIMETYPEAVAILABLE
,
135 BINDSTATUS_CLASSINSTALLLOCATION
,
137 BINDSTATUS_LOADINGMIMEHANDLER
,
138 BINDSTATUS_CONTENTDISPOSITIONATTACH
,
139 BINDSTATUS_FILTERREPORTMIMETYPE
,
140 BINDSTATUS_CLSIDCANINSTANTIATE
,
141 BINDSTATUS_IUNKNOWNAVAILABLE
,
142 BINDSTATUS_DIRECTBIND
,
143 BINDSTATUS_RAWMIMETYPE
,
144 BINDSTATUS_PROXYDETECTING
,
145 BINDSTATUS_ACCEPTRANGES
148 #define MK_S_ASYNCHRONOUS 0x000401E8
149 #define S_ASYNCHRONOUS MK_S_ASYNCHRONOUS
151 #define INET_E_ERROR_FIRST 0x800C0002L
152 #define INET_E_INVALID_URL 0x800C0002L
153 #define INET_E_NO_SESSION 0x800C0003L
154 #define INET_E_CANNOT_CONNECT 0x800C0004L
155 #define INET_E_RESOURCE_NOT_FOUND 0x800C0005L
156 #define INET_E_OBJECT_NOT_FOUND 0x800C0006L
157 #define INET_E_DATA_NOT_AVAILABLE 0x800C0007L
158 #define INET_E_DOWNLOAD_FAILURE 0x800C0008L
159 #define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L
160 #define INET_E_NO_VALID_MEDIA 0x800C000AL
161 #define INET_E_CONNECTION_TIMEOUT 0x800C000BL
162 #define INET_E_INVALID_REQUEST 0x800C000CL
163 #define INET_E_UNKNOWN_PROTOCOL 0x800C000DL
164 #define INET_E_SECURITY_PROBLEM 0x800C000EL
165 #define INET_E_CANNOT_LOAD_DATA 0x800C000FL
166 #define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
167 #define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
168 #define INET_E_REDIRECT_FAILED 0x800C0014L
169 #define INET_E_REDIRECT_TO_DIR 0x800C0015L
170 #define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
171 #define INET_E_ERROR_LAST INET_E_REDIRECT_TO_DIR
174 /*****************************************************************************
177 #define INTERFACE IBinding
178 #define IBinding_METHODS \
180 STDMETHOD(Abort)(THIS) PURE; \
181 STDMETHOD(Suspend)(THIS) PURE; \
182 STDMETHOD(Resume)(THIS) PURE; \
183 STDMETHOD(SetPriority)(THIS_ LONG nPriority) PURE; \
184 STDMETHOD(GetPriority)(THIS_ LONG *pnPriority) PURE; \
185 STDMETHOD(GetBindResult)(THIS_ CLSID *pclsidProtocol, DWORD *pdwResult, LPOLESTR *pszResult, DWORD *pdwReserved) PURE;
186 ICOM_DEFINE(IBinding
,IUnknown
)
190 /*** IUnknown methods ***/
191 #define IBinding_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
192 #define IBinding_AddRef(p) (p)->lpVtbl->AddRef(p)
193 #define IBinding_Release(p) (p)->lpVtbl->Release(p)
194 /*** IBinding methods ***/
195 #define IBinding_Abort(p) (p)->lpVtbl->Abort(p)
196 #define IBinding_Suspend(p) (p)->lpVtbl->Suspend(p)
197 #define IBinding_Resume(p) (p)->lpVtbl->Resume(p)
198 #define IBinding_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
199 #define IBinding_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
200 #define IBinding_GetBindResult(p,a,b,c,d) (p)->lpVtbl->GetBindResult(p,a,b,c,d)
203 /*****************************************************************************
204 * IBindStatusCallback interface
206 #define INTERFACE IBindStatusCallback
207 #define IBindStatusCallback_METHODS \
209 STDMETHOD(OnStartBinding)(THIS_ DWORD dwReserved, IBinding *pib) PURE; \
210 STDMETHOD(GetPriority)(THIS_ LONG *pnPriority) PURE; \
211 STDMETHOD(OnLowResource)(THIS) PURE; \
212 STDMETHOD(OnProgress)(THIS_ ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) PURE; \
213 STDMETHOD(OnStopBinding)(THIS_ HRESULT hresult, LPCWSTR szError) PURE; \
214 STDMETHOD(GetBindInfo)(THIS_ DWORD *grfBINDF, BINDINFO *pbindinfo) PURE; \
215 STDMETHOD(OnDataAvailable)(THIS_ DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed) PURE; \
216 STDMETHOD(OnObjectAvailable)(THIS_ REFIID iid, IUnknown *punk) PURE;
217 ICOM_DEFINE(IBindStatusCallback
,IUnknown
)
221 /*** IUnknown methods ***/
222 #define IBindStatusCallback_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
223 #define IBindStatusCallback_AddRef(p) (p)->lpVtbl->AddRef(p)
224 #define IBindStatusCallback_Release(p) (p)->lpVtbl->Release(p)
225 /*** IBindStatusCallback methods ***/
226 #define IBindStatusCallback_OnStartBinding(p,a,b) (p)->lpVtbl->OnStartBinding(p,a,b)
227 #define IBindStatusCallback_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a)
228 #define IBindStatusCallback_OnLowResource(p) (p)->lpVtbl->OnLowResource(p)
229 #define IBindStatusCallback_OnProgress(p,a,b,c,d) (p)->lpVtbl->OnProgress(p,a,b,c,d)
230 #define IBindStatusCallback_OnStopBinding(p,a,b) (p)->lpVtbl->OnStopBinding(p,a,b)
231 #define IBindStatusCallback_GetBindInfo(p,a,b) (p)->lpVtbl->GetBindInfo(p,a,b)
232 #define IBindStatusCallback_OnDataAvailable(p,a,b,c,d) (p)->lpVtbl->OnDataAvailable(p,a,b,c,d)
233 #define IBindStatusCallback_OnObjectAvailable(p,a,b) (p)->lpVtbl->OnObjectAvailable(p,a,b)
236 /*****************************************************************************
237 * IBindHost interface
239 #define INTERFACE IBindHost
240 #define IBindHost_METHODS \
242 STDMETHOD(CreateMoniker)(THIS_ LPOLESTR szName, IBindCtx *pBC, IMoniker **ppmk, DWORD dwReserved) PURE; \
243 STDMETHOD(MonikerBindToStorage)(THIS_ IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, LPVOID *ppvObj) PURE; \
244 STDMETHOD(MonikerBindToObject)(THIS_ IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC, REFIID riid, LPVOID *ppvObj) PURE;
245 ICOM_DEFINE(IBindHost
,IUnknown
)
249 /*** IUnknown methods ***/
250 #define IBindHost_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
251 #define IBindHost_AddRef(p) (p)->lpVtbl->AddRef(p)
252 #define IBindHost_Release(p) (p)->lpVtbl->Release(p)
253 /*** IBindHost methods ***/
254 #define IBindHost_CreateMoniker(p,a,b,c,d) (p)->lpVtbl->CreateMoniker(p,a,b,c,d)
255 #define IBindHost_MonikerBindToStorage(p,a,b,c,d,e) (p)->lpVtbl->MonikerBindToStorage(p,a,b,c,d,e)
256 #define IBindHost_MonikerBindToObject(p,a,b,c,d,e) (p)->lpVtbl->MonikerBindToObject(p,a,b,c,d,e)
259 /*** IUnknown methods ***/
260 typedef enum _tagQUERYOPTION
{
261 QUERY_EXPIRATION_DATE
= 1,
262 QUERY_TIME_OF_LAST_CHANGE
,
263 QUERY_CONTENT_ENCODING
,
270 QUERY_IS_INSTALLEDENTRY
,
271 QUERY_IS_CACHED_OR_MAPPED
,
277 /*****************************************************************************
278 * IWinInetInfo interface
280 #define INTERFACE IWinInetInfo
281 #define IWinInetInfo_METHODS \
283 STDMETHOD(QueryOption)(THIS_ DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf) PURE;
284 ICOM_DEFINE(IWinInetInfo
,IUnknown
)
288 /*** IUnknown methods ***/
289 #define IWinInetInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
290 #define IWinInetInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
291 #define IWinInetInfo_Release(p) (p)->lpVtbl->Release(p)
292 /*** IWinInetInfo methods ***/
293 #define IWinInetInfo_QueryOption(p,a,b,c) (p)->lpVtbl->QueryOption(p,a,b,c)
296 /*****************************************************************************
297 * IWinInetHttpInfo interface
299 #define INTERFACE IWinInetHttpInfo
300 #define IWinInetHttpInfo_METHODS \
301 IWinInetInfo_METHODS \
302 STDMETHOD(QueryInfo)(THIS_ DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf, DWORD *pdwFlags, DWORD *pdwReserved) PURE;
303 ICOM_DEFINE(IWinInetHttpInfo
,IWinInetInfo
)
307 /*** IUnknown methods ***/
308 #define IWinInetHttpInfo_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
309 #define IWinInetHttpInfo_AddRef(p) (p)->lpVtbl->AddRef(p)
310 #define IWinInetHttpInfo_Release(p) (p)->lpVtbl->Release(p)
311 /*** IWinInetHttpInfo methods ***/
312 #define IWinInetHttpInfo_QueryInfo(p,a,b,c,d,e) (p)->lpVtbl->QueryInfo(p,a,b,c,d,e)
315 #define INTERFACE IPersistMoniker
316 #define IPersistMoniker_METHODS \
318 STDMETHOD(GetClassID)(THIS_ CLSID *pClassID ) PURE; \
319 STDMETHOD(IsDirty)(THIS ) PURE; \
320 STDMETHOD(Load)(THIS_ BOOL fFullyAvailable, IMoniker *pimkName, LPBC pibc, DWORD grfMode ) PURE; \
321 STDMETHOD(Save)(THIS_ IMoniker *pinkName, LPBC pibc, BOOL fRemember ) PURE; \
322 STDMETHOD(SaveCompleted)(THIS_ IMoniker *pinkName, LPBC pibc ) PURE; \
323 STDMETHOD(GetCurMoniker)(THIS_ IMoniker *pinkName ) PURE;
324 ICOM_DEFINE(IPersistMoniker
,IUnknown
)
328 #define IPersistMoniker_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
329 #define IPersistMoniker_AddRef(p) (p)->lpVtbl->AddRef(p)
330 #define IPersistMoniker_Release(p) (p)->lpVtbl->Release(p)
331 #define IPersistMoniker_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
332 #define IPersistMoniker_IsDirty(p) (p)->lpVtbl->IsDirty(p)
333 #define IPersistMoniker_Load(p,a,b,c,d) (p)->lpVtbl->Load(p,a,b,c,d)
334 #define IPersistMoniker_Save(p,a,b,c) (p)->lpVtbl->Save(p,a,b,c)
335 #define IPersistMoniker_SaveCompleted(p,a,b) (p)->lpVtbl->SaveCompleted(p,a,b)
336 #define IPersistMoniker_GetCurMoniker(p,a) (p)->lpVtbl->GetCurMoniker(p,a)
339 HRESULT WINAPI
CreateURLMoniker(IMoniker
*pmkContext
, LPCWSTR szURL
, IMoniker
**ppmk
);
340 HRESULT WINAPI
RegisterBindStatusCallback(IBindCtx
*pbc
, IBindStatusCallback
*pbsc
, IBindStatusCallback
**ppbsc
, DWORD dwReserved
);
341 HRESULT WINAPI
CompareSecurityIds(BYTE
*,DWORD
,BYTE
*,DWORD
,DWORD
);
343 HRESULT WINAPI
URLDownloadToFileA(LPUNKNOWN pCaller
, LPCSTR szURL
, LPCSTR szFileName
, DWORD dwReserved
, LPBINDSTATUSCALLBACK lpfnCB
);
344 HRESULT WINAPI
URLDownloadToFileW(LPUNKNOWN pCaller
, LPCWSTR szURL
, LPCWSTR szFileName
, DWORD dwReserved
, LPBINDSTATUSCALLBACK lpfnCB
);
349 #endif /* defined(__cplusplus) */
351 #endif /* __WINE_URLMON_H */