Fix the defintion of {,LP}NM_TREEVIEW{A,W}.
[wine] / include / urlmon.h
1 /*
2  * Copyright (C) 2000 Ulrich Czekalla
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #ifndef __WINE__
20 #include "rpc.h"
21 #include "rpcndr.h"
22 #ifndef COM_NO_WINDOWS_H
23 #include "windows.h"
24 #include "ole2.h"
25 #endif
26 #endif
27
28 #ifndef __WINE_URLMON_H
29 #define __WINE_URLMON_H
30
31 #include "winbase.h"
32 #include "objbase.h"
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* defined(__cplusplus) */
37
38 DEFINE_GUID(IID_IBinding, 0x79EAC9C0, 0xBAF9, 0x11CE,
39         0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
40 typedef struct IBinding IBinding,*LPBINDING;
41
42 DEFINE_GUID(IID_IBindStatusCallback, 0x79EAC9C1, 0xBAF9, 0x11CE,
43         0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
44 typedef struct IBindStatusCallback IBindStatusCallback,*LPBINDSTATUSCALLBACK;
45
46 DEFINE_GUID(IID_IBindHost, 0XFC4801A1, 0X2BA9, 0X11CF,
47     0XA2, 0X29, 0X00, 0XAA, 0X00, 0X3D, 0X73, 0X52);
48 typedef struct IBindHost IBindHost,*LPBINDHOST;
49
50 DEFINE_GUID(IID_IWinInetInfo, 0x79EAC9D6, 0xBAFA, 0x11CE,
51     0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
52 typedef struct IWinInetInfo IWinInetInfo,*LPWININETINFO;
53
54 DEFINE_GUID(IID_IWinInetHttpInfo, 0x79EAC9D8, 0xBAFA, 0x11CE,
55     0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
56 typedef struct IWinInetHttpInfo IWinInetHttpInfo,*LPWININETHTTPINFO;
57
58 typedef enum {
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
83 } BINDF;
84
85 typedef struct _tagBINDINFO {
86     ULONG cbSize;
87     LPWSTR szExtraInfo;
88     STGMEDIUM stgmedData;
89     DWORD grfBindInfoF;
90     DWORD dwBindVerb;
91     LPWSTR szCustomVerb;
92     DWORD cbStgmedData;
93     DWORD dwOptions;
94     DWORD dwOptionsFlags;
95     DWORD dwCodePage;
96     SECURITY_ATTRIBUTES securityAttributes;
97     IID iid;
98     IUnknown *pUnk;
99     DWORD dwReserved;
100 } BINDINFO;
101
102 typedef enum {
103     BSCF_FIRSTDATANOTIFICATION = 0x01,
104     BSCF_INTERMEDIATEDATANOTIFICATION = 0x02,
105     BSCF_LASTDATANOTIFICATION = 0x04,
106     BSCF_DATAFULLYAVAILABLE = 0x08,
107     BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10
108 } BSCF;
109
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,
131         BINDSTATUS_ENCODING,
132         BINDSTATUS_VERFIEDMIMETYPEAVAILABLE,
133         BINDSTATUS_CLASSINSTALLLOCATION,
134         BINDSTATUS_DECODING,
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
144 } BINDSTATUS;
145
146 #define MK_S_ASYNCHRONOUS 0x000401E8
147 #define S_ASYNCHRONOUS    MK_S_ASYNCHRONOUS
148
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
170
171
172 /*****************************************************************************
173  * IBinding interface
174  */
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 \
184     IUnknown_IMETHODS \
185     IBinding_METHODS
186 ICOM_DEFINE(IBinding,IUnknown)
187 #undef ICOM_INTERFACE
188
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)
200
201 /*****************************************************************************
202  * IBindStatusCallback interface
203  */
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 \
215     IUnknown_IMETHODS \
216     IBindStatusCallback_METHODS
217 ICOM_DEFINE(IBindStatusCallback,IUnknown)
218 #undef ICOM_INTERFACE
219
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)
233
234 /*****************************************************************************
235  * IBindHost interface
236  */
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 \
243     IUnknown_IMETHODS \
244     IBindHost_METHODS
245 ICOM_DEFINE(IBindHost,IUnknown)
246 #undef ICOM_INTERFACE
247
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)
256
257 /*** IUnknown methods ***/
258 typedef enum _tagQUERYOPTION {
259     QUERY_EXPIRATION_DATE = 1,
260     QUERY_TIME_OF_LAST_CHANGE,
261     QUERY_CONTENT_ENCODING,
262     QUERY_CONTENT_TYPE,
263     QUERY_REFRESH,
264     QUERY_RECOMBINE,
265     QUERY_CAN_NAVIGATE,
266     QUERY_USES_NETWORK,
267     QUERY_IS_CACHED,
268     QUERY_IS_INSTALLEDENTRY,
269     QUERY_IS_CACHED_OR_MAPPED,
270     QUERY_USES_CACHE,
271     QUERY_IS_SECURE,
272     QUERY_IS_SAFE
273 } QUERYOPTION;
274
275 /*****************************************************************************
276  * IWinInetInfo interface
277  */
278 #define ICOM_INTERFACE IWinInetInfo
279 #define IWinInetInfo_METHODS \
280     ICOM_METHOD3 (HRESULT,QueryOption,       DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf)
281 #define IWinInetInfo_IMETHODS \
282     IUnknown_IMETHODS \
283     IWinInetInfo_METHODS
284 ICOM_DEFINE(IWinInetInfo,IUnknown)
285 #undef ICOM_INTERFACE
286
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)
293
294 /*****************************************************************************
295  * IWinInetHttpInfo interface
296  */
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
305
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)
312
313 HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk);
314 HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbsc, DWORD dwReserved);
315
316 #ifdef __cplusplus
317 }      /* extern "C" */
318 #endif /* defined(__cplusplus) */
319
320 #endif /* __WINE_URLMON_H */