Huw D M Davies | 6b97f5e | 2002-08-13 18:20:24 +0000 | [diff] [blame] | 1 | /* |
Francois Gouget | ae50013 | 2003-09-08 19:38:45 +0000 | [diff] [blame] | 2 | * Copyright 2002 Huw D M Davies for CodeWeavers |
Huw D M Davies | 6b97f5e | 2002-08-13 18:20:24 +0000 | [diff] [blame] | 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_URLMON_MAIN_H |
| 20 | #define __WINE_URLMON_MAIN_H |
| 21 | |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 22 | #include <stdarg.h> |
| 23 | |
Huw D M Davies | 6b97f5e | 2002-08-13 18:20:24 +0000 | [diff] [blame] | 24 | #include "windef.h" |
Alexandre Julliard | e37c6e1 | 2003-09-05 23:08:26 +0000 | [diff] [blame] | 25 | #include "winbase.h" |
Huw D M Davies | 6b97f5e | 2002-08-13 18:20:24 +0000 | [diff] [blame] | 26 | |
| 27 | extern HINSTANCE URLMON_hInstance; |
Huw Davies | 076b5b7 | 2004-09-28 19:18:52 +0000 | [diff] [blame] | 28 | extern HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); |
Jacek Caban | d9ce4cd | 2004-11-30 21:14:21 +0000 | [diff] [blame] | 29 | extern HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); |
Jacek Caban | 0d4f07b | 2005-09-06 09:27:04 +0000 | [diff] [blame] | 30 | extern HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); |
Jacek Caban | c54f013 | 2005-09-14 15:38:26 +0000 | [diff] [blame] | 31 | extern HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); |
| 32 | extern HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj); |
Huw D M Davies | 6b97f5e | 2002-08-13 18:20:24 +0000 | [diff] [blame] | 33 | |
James Hawkins | bbc081e | 2005-02-03 19:38:37 +0000 | [diff] [blame] | 34 | /********************************************************************** |
| 35 | * Dll lifetime tracking declaration for urlmon.dll |
| 36 | */ |
| 37 | extern LONG URLMON_refCount; |
Stefan Huehner | 863a4b1 | 2005-06-21 20:53:13 +0000 | [diff] [blame] | 38 | static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); } |
| 39 | static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); } |
James Hawkins | bbc081e | 2005-02-03 19:38:37 +0000 | [diff] [blame] | 40 | |
Alexandre Julliard | 936198c | 2004-08-13 00:44:22 +0000 | [diff] [blame] | 41 | #define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field)) |
Jacek Caban | 0d4f07b | 2005-09-06 09:27:04 +0000 | [diff] [blame] | 42 | #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) |
Alexandre Julliard | 936198c | 2004-08-13 00:44:22 +0000 | [diff] [blame] | 43 | |
Troy Rollo | caf6fa9 | 2005-05-04 10:36:54 +0000 | [diff] [blame] | 44 | typedef struct |
| 45 | { |
| 46 | const IStreamVtbl *lpVtbl; |
Mike McCormack | 058e38a | 2005-07-03 12:05:03 +0000 | [diff] [blame] | 47 | LONG ref; |
Troy Rollo | caf6fa9 | 2005-05-04 10:36:54 +0000 | [diff] [blame] | 48 | HANDLE handle; |
| 49 | BOOL closed; |
| 50 | WCHAR *pszFileName; |
| 51 | WCHAR *pszURL; |
| 52 | } IUMCacheStream; |
| 53 | |
| 54 | HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL, DWORD dwSize, LPWSTR pszFileName, HANDLE *phfile, IUMCacheStream **ppstr); |
| 55 | void UMCloseCacheFileStream(IUMCacheStream *pstr); |
| 56 | |
Jacek Caban | 9630d15 | 2005-11-14 12:28:18 +0000 | [diff] [blame] | 57 | HRESULT get_protocol_iface(LPCWSTR url, IUnknown **ret); |
| 58 | |
Jacek Caban | 0dcf2a4 | 2005-11-14 15:12:43 +0000 | [diff] [blame] | 59 | HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv); |
| 60 | |
Huw D M Davies | 6b97f5e | 2002-08-13 18:20:24 +0000 | [diff] [blame] | 61 | #endif /* __WINE_URLMON_MAIN_H */ |