Fix compilation errors on FreeBSD.
[wine] / include / urlmon.h
1 /*
2  * urlmon.h
3  */
4
5 #ifndef __WINE__
6 #include "rpc.h"
7 #include "rpcndr.h"
8 #ifndef COM_NO_WINDOWS_H
9 #include "windows.h"
10 #include "ole2.h"
11 #endif
12 #endif
13
14 #ifndef __WINE_URLMON_H
15 #define __WINE_URLMON_H
16
17 #include "winbase.h"
18 #include "wine/obj_base.h"
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif /* defined(__cplusplus) */
23
24 DEFINE_GUID(IID_IBinding, 0x79EAC9C0, 0xBAF9, 0x11CE,
25         0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
26 typedef struct IBinding IBinding,*LPBINDING;
27
28 DEFINE_GUID(IID_IBindStatusCallback, 0x79EAC9C1, 0xBAF9, 0x11CE,
29         0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);
30 typedef struct IBindStatusCallback IBindStatusCallback,*LPBINDSTATUSCALLBACK;
31
32 DEFINE_GUID(IID_IBindHost, 0XFC4801A1, 0X2BA9, 0X11CF,
33     0XA2, 0X29, 0X00, 0XAA, 0X00, 0X3D, 0X73, 0X52);
34 typedef struct IBindHost IBindHost,*LPBINDHOST;
35
36 DEFINE_GUID(IID_IWinInetInfo, 0x79EAC9D6, 0xBAFA, 0x11CE,
37     0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
38 typedef struct IWinInetInfo IWinInetInfo,*LPWININETINFO;
39
40 DEFINE_GUID(IID_IWinInetHttpInfo, 0x79EAC9D8, 0xBAFA, 0x11CE,
41     0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0X0B);
42 typedef struct IWinInetHttpInfo IWinInetHttpInfo,*LPWININETHTTPINFO;
43
44 typedef enum {
45         BINDF_ASYNCHRONOUS = 0x00000001,
46         BINDF_ASYNCSTORAGE = 0x00000002,
47         BINDF_NOPROGRESSIVERENDERING = 0x00000004,
48         BINDF_OFFLINEOPERATION = 0x00000008,
49         BINDF_GETNEWESTVERSION = 0x00000010,
50         BINDF_NOWRITECACHE = 0x00000020,
51         BINDF_NEEDFILE = 0x00000040,
52         BINDF_PULLDATA = 0x00000080,
53         BINDF_IGNORESECURITYPROBLEM = 0x00000100,
54         BINDF_RESYNCHRONIZE = 0x00000200,
55         BINDF_HYPERLINK = 0x00000400,
56         BINDF_NO_UI = 0x00000800,
57         BINDF_SILENTOPERATION = 0x00001000,
58         BINDF_PRAGMA_NO_CACHE = 0x00002000,
59         BINDF_GETCLASSOBJECT = 0x00004000,
60         BINDF_RESERVED_1 = 0x00008000,
61         BINDF_FREE_THREADED = 0x00010000,
62         BINDF_DIRECT_READ = 0x00020000,
63         BINDF_FORMS_SUBMIT = 0x00040000,
64         BINDF_GETFROMCACHE_IF_NET_FAIL = 0x00080000,
65         BINDF_FROMURLMON = 0x00100000,
66         BINDF_FWD_BACK = 0x00200000,
67         BINDF_PREFERDEFAULTHANDLER = 0x00400000,
68         BINDF_RESERVED_3 = 0x00800000
69 } BINDF;
70
71 typedef struct _tagBINDINFO {
72     ULONG cbSize;
73     LPWSTR szExtraInfo;
74     STGMEDIUM stgmedData;
75     DWORD grfBindInfoF;
76     DWORD dwBindVerb;
77     LPWSTR szCustomVerb;
78     DWORD cbStgmedData;
79     DWORD dwOptions;
80     DWORD dwOptionsFlags;
81     DWORD dwCodePage;
82     SECURITY_ATTRIBUTES securityAttributes;
83     IID iid;
84     IUnknown *pUnk;
85     DWORD dwReserved;
86 } BINDINFO;
87
88 typedef enum {
89     BSCF_FIRSTDATANOTIFICATION = 0x01,
90     BSCF_INTERMEDIATEDATANOTIFICATION = 0x02,
91     BSCF_LASTDATANOTIFICATION = 0x04,
92     BSCF_DATAFULLYAVAILABLE = 0x08,
93     BSCF_AVAILABLEDATASIZEUNKNOWN = 0x10
94 } BSCF;
95
96 typedef enum BINDSTATUS {
97         BINDSTATUS_FINDINGRESOURCE,
98         BINDSTATUS_CONNECTING,
99         BINDSTATUS_REDIRECTING,
100         BINDSTATUS_BEGINDOWNLOADDATA,
101         BINDSTATUS_DOWNLOADINGDATA,
102         BINDSTATUS_ENDDOWNLOADDATA,
103         BINDSTATUS_BEGINDOWNLOADCOMPONENTS,
104         BINDSTATUS_INSTALLINGCOMPONENTS,
105         BINDSTATUS_ENDDOWNLOADCOMPONENTS,
106         BINDSTATUS_USINGCACHEDCOPY,
107         BINDSTATUS_SENDINGREQUEST,
108         BINDSTATUS_CLASSIDAVAILABLE,
109         BINDSTATUS_MIMETYPEAVAILABLE,
110         BINDSTATUS_CACHEFILENAMEAVAILABLE,
111         BINDSTATUS_BEGINSYNCOPERATION,
112         BINDSTATUS_ENDSYNCOPERATION,
113         BINDSTATUS_BEGINUPLOADDATA,
114         BINDSTATUS_UPLOADINGDATA,
115         BINDSTATUS_ENDUPLOADINGDATA,
116         BINDSTATUS_PROTOCOLCLASSID,
117         BINDSTATUS_ENCODING,
118         BINDSTATUS_VERFIEDMIMETYPEAVAILABLE,
119         BINDSTATUS_CLASSINSTALLLOCATION,
120         BINDSTATUS_DECODING,
121         BINDSTATUS_LOADINGMIMEHANDLER,
122         BINDSTATUS_CONTENTDISPOSITIONATTACH,
123         BINDSTATUS_FILTERREPORTMIMETYPE,
124         BINDSTATUS_CLSIDCANINSTANTIATE,
125         BINDSTATUS_IUNKNOWNAVAILABLE,
126         BINDSTATUS_DIRECTBIND,
127         BINDSTATUS_RAWMIMETYPE,
128         BINDSTATUS_PROXYDETECTING,
129         BINDSTATUS_ACCEPTRANGES
130 } BINDSTATUS;
131
132 #define MK_S_ASYNCHRONOUS 0x000401E8
133 #define S_ASYNCHRONOUS    MK_S_ASYNCHRONOUS
134
135 /*****************************************************************************
136  * IBinding interface
137  */
138 #define ICOM_INTERFACE IBinding
139 #define IBinding_METHODS \
140     ICOM_METHOD  (HRESULT,Abort) \
141     ICOM_METHOD  (HRESULT,Suspend) \
142     ICOM_METHOD  (HRESULT,Resume) \
143     ICOM_METHOD1 (HRESULT,SetPriority,       LONG,nPriority) \
144     ICOM_METHOD1 (HRESULT,GetPriority,       LONG*,pnPriority) \
145     ICOM_METHOD4 (HRESULT,GetBindResult,     CLSID*,pclsidProtocol, DWORD*,pdwResult, LPOLESTR*,pszResult, DWORD*,pdwReserved)
146 #define IBinding_IMETHODS \
147     IUnknown_IMETHODS \
148     IBinding_METHODS
149 ICOM_DEFINE(IBinding,IUnknown)
150 #undef ICOM_INTERFACE
151
152 /*** IUnknown methods ***/
153 #define IBinding_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
154 #define IBinding_AddRef(p)                  ICOM_CALL (AddRef,p)
155 #define IBinding_Release(p)                 ICOM_CALL (Release,p)
156 /*** IBinding methods ***/
157 #define IBinding_Abort(p)                   ICOM_CALL (Abort,p)
158 #define IBinding_Suspend(p)                 ICOM_CALL (Suspend,p)
159 #define IBinding_Resume(p)                  ICOM_CALL (Resume,p)
160 #define IBinding_SetPriority(p,a)           ICOM_CALL2(SetPriority,p,a)
161 #define IBinding_GetPriority(p,a)           ICOM_CALL2(GetPriority,p,a)
162 #define IBinding_GetBindResult(p,a,b,c,d)   ICOM_CALL4(GetBindResult,p,a,b,c,d)
163
164 /*****************************************************************************
165  * IBindStatusCallback interface
166  */
167 #define ICOM_INTERFACE IBindStatusCallback
168 #define IBindStatusCallback_METHODS \
169     ICOM_METHOD2 (HRESULT,OnStartBinding,    DWORD,dwReserved, IBinding*,pib) \
170     ICOM_METHOD1 (HRESULT,GetPriority,       LONG*,pnPriority) \
171     ICOM_METHOD  (HRESULT,OnLowResource) \
172     ICOM_METHOD4 (HRESULT,OnProgress,        ULONG,ulProgress, ULONG,ulProgressMax, ULONG,ulStatusCode, LPCWSTR,szStatusText) \
173     ICOM_METHOD2 (HRESULT,OnStopBinding,     HRESULT,hresult, LPCWSTR,szError) \
174     ICOM_METHOD2 (HRESULT,GetBindInfo,       DWORD*,grfBINDF, BINDINFO*,pbindinfo) \
175     ICOM_METHOD4 (HRESULT,OnDataAvailable,   DWORD,grfBSCF, DWORD,dwSize, FORMATETC*,pformatetc, STGMEDIUM*,pstgmed) \
176     ICOM_METHOD2 (HRESULT,OnObjectAvailable, REFIID,iid, IUnknown*,punk)
177 #define IBindStatusCallback_IMETHODS \
178     IUnknown_IMETHODS \
179     IBindStatusCallback_METHODS
180 ICOM_DEFINE(IBindStatusCallback,IUnknown)
181 #undef ICOM_INTERFACE
182
183 /*** IUnknown methods ***/
184 #define IBindStatusCallback_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
185 #define IBindStatusCallback_AddRef(p)                  ICOM_CALL (AddRef,p)
186 #define IBindStatusCallback_Release(p)                 ICOM_CALL (Release,p)
187 /*** IBindStatusCallback methods ***/
188 #define IBindStatusCallback_OnStartBinding(p,a,b)      ICOM_CALL2(OnStartBinding,p,a,b)
189 #define IBindStatusCallback_GetPriority(p,a)           ICOM_CALL1(GetPriority,p,a)
190 #define IBindStatusCallback_OnLowResource(p)           ICOM_CALL (OnLowResource,p)
191 #define IBindStatusCallback_OnProgress(p,a,b,c,d)      ICOM_CALL4(OnProgress,p,a,b,c,d)
192 #define IBindStatusCallback_OnStopBinding(p,a,b)       ICOM_CALL2(OnStopBinding,p,a,b)
193 #define IBindStatusCallback_GetBindInfo(p,a,b)         ICOM_CALL2(GetBindInfo,p,a,b)
194 #define IBindStatusCallback_OnDataAvailable(p,a,b,c,d) ICOM_CALL4(OnDataAvailable,p,a,b,c,d)
195 #define IBindStatusCallback_OnObjectAvailable(p,a,b)   ICOM_CALL2(OnObjectAvailable,p,a,b)
196
197 /*****************************************************************************
198  * IBindHost interface
199  */
200 #define ICOM_INTERFACE IBindHost
201 #define IBindHost_METHODS \
202     ICOM_METHOD4 (HRESULT,CreateMoniker,              LPOLESTR,szName, IBindCtx*,pBC, IMoniker**,ppmk, DWORD,dwReserved) \
203     ICOM_METHOD5 (HRESULT,MonikerBindToStorage,       IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj) \
204     ICOM_METHOD5 (HRESULT,MonikerBindToObject,        IMoniker*,pMk, IBindCtx*,pBC, IBindStatusCallback*,pBSC, REFIID,riid, LPVOID*,ppvObj)
205 #define IBindHost_IMETHODS \
206     IUnknown_IMETHODS \
207     IBindHost_METHODS
208 ICOM_DEFINE(IBindHost,IUnknown)
209 #undef ICOM_INTERFACE
210
211 /*** IUnknown methods ***/
212 #define IBindHost_QueryInterface(p,a,b)                   ICOM_CALL2(QueryInterface,p,a,b)
213 #define IBindHost_AddRef(p)                               ICOM_CALL (AddRef,p)
214 #define IBindHost_Release(p)                              ICOM_CALL (Release,p)
215 /*** IBindHost methods ***/
216 #define IBindHost_CreateMoniker(p,a,b,c,d)                ICOM_CALL4(CreateMoniker,p,a,b,c,d)
217 #define IBindHost_MonikerBindToStorage(p,a,b,c,d,e)       ICOM_CALL5(MonikerBindToStorage,p,a,b,c,d,e)
218 #define IBindHost_MonikerBindToObject(p,a,b,c,d,e)        ICOM_CALL5(MonikerBindToObject,p,a,b,c,d,e)
219
220 /*** IUnknown methods ***/
221 typedef enum _tagQUERYOPTION {
222     QUERY_EXPIRATION_DATE = 1,
223     QUERY_TIME_OF_LAST_CHANGE,
224     QUERY_CONTENT_ENCODING,
225     QUERY_CONTENT_TYPE,
226     QUERY_REFRESH,
227     QUERY_RECOMBINE,
228     QUERY_CAN_NAVIGATE,
229     QUERY_USES_NETWORK,
230     QUERY_IS_CACHED,
231     QUERY_IS_INSTALLEDENTRY,
232     QUERY_IS_CACHED_OR_MAPPED,
233     QUERY_USES_CACHE,
234     QUERY_IS_SECURE,
235     QUERY_IS_SAFE
236 } QUERYOPTION;
237
238 /*****************************************************************************
239  * IWinInetInfo interface
240  */
241 #define ICOM_INTERFACE IWinInetInfo
242 #define IWinInetInfo_METHODS \
243     ICOM_METHOD3 (HRESULT,QueryOption,       DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf)
244 #define IWinInetInfo_IMETHODS \
245     IUnknown_IMETHODS \
246     IWinInetInfo_METHODS
247 ICOM_DEFINE(IWinInetInfo,IUnknown)
248 #undef ICOM_INTERFACE
249
250 /*** IUnknown methods ***/
251 #define IWinInetInfo_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
252 #define IWinInetInfo_AddRef(p)                  ICOM_CALL (AddRef,p)
253 #define IWinInetInfo_Release(p)                 ICOM_CALL (Release,p)
254 /*** IWinInetInfo methods ***/
255 #define IWinInetInfo_QueryOption(p,a,b,c)       ICOM_CALL3(QueryOption,p,a,b,c)
256
257 /*****************************************************************************
258  * IWinInetHttpInfo interface
259  */
260 #define ICOM_INTERFACE IWinInetHttpInfo
261 #define IWinInetHttpInfo_METHODS \
262     ICOM_METHOD5 (HRESULT,QueryInfo, DWORD,dwOption, LPVOID,pBuffer, DWORD*,pcbBuf, DWORD*,pdwFlags, DWORD*,pdwReserved)
263 #define IWinInetHttpInfo_IMETHODS \
264     IWinInetInfo_IMETHODS \
265     IWinInetHttpInfo_METHODS
266 ICOM_DEFINE(IWinInetHttpInfo,IWinInetInfo)
267 #undef ICOM_INTERFACE
268
269 /*** IUnknown methods ***/
270 #define IWinInetHttpInfo_QueryInterface(p,a,b)  ICOM_CALL2(QueryInterface,p,a,b)
271 #define IWinInetHttpInfo_AddRef(p)              ICOM_CALL (AddRef,p)
272 #define IWinInetHttpInfo_Release(p)             ICOM_CALL (Release,p)
273 /*** IWinInetHttpInfo methods ***/
274 #define IWinInetHttpInfo_QueryInfo(p,a,b,c,d,e) ICOM_CALL5(QueryInfo,p,a,b,c,d,e)
275
276 HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk);
277 HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbsc, DWORD dwReserved);
278
279 #ifdef __cplusplus
280 }      /* extern "C" */
281 #endif /* defined(__cplusplus) */
282
283 #endif /* __WINE_URLMON_H */
284