2 * Defines the COM interfaces and APIs related to structured data storage.
4 * Depends on 'obj_base.h'.
6 * Copyright (C) 1999 Paul Quinn
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_WINE_OBJ_CACHE_H
24 #define __WINE_WINE_OBJ_CACHE_H
28 #endif /* defined(__cplusplus) */
30 /*****************************************************************************
31 * Declare the structures
35 /*****************************************************************************
36 * Predeclare the interfaces
39 DEFINE_OLEGUID(IID_IOleCache, 0x0000011eL, 0, 0);
40 typedef struct IOleCache IOleCache, *LPOLECACHE;
42 DEFINE_OLEGUID(IID_IOleCache2, 0x00000128L, 0, 0);
43 typedef struct IOleCache2 IOleCache2, *LPOLECACHE2;
45 DEFINE_OLEGUID(IID_IOleCacheControl, 0x00000129L, 0, 0);
46 typedef struct IOleCacheControl IOleCacheControl, *LPOLECACHECONTROL;
48 /*****************************************************************************
51 #define ICOM_INTERFACE IOleCache
52 #define IOleCache_METHODS \
53 ICOM_METHOD3(HRESULT,Cache, FORMATETC*,pformatetc, DWORD,advf, DWORD*, pdwConnection) \
54 ICOM_METHOD1(HRESULT,Uncache, DWORD,dwConnection) \
55 ICOM_METHOD1(HRESULT,EnumCache, IEnumSTATDATA**,ppenumSTATDATA) \
56 ICOM_METHOD1(HRESULT,InitCache, IDataObject*,pDataObject) \
57 ICOM_METHOD3(HRESULT,SetData, FORMATETC*,pformatetc, STGMEDIUM*,pmedium, BOOL,fRelease)
58 #define IOleCache_IMETHODS \
61 ICOM_DEFINE(IOleCache,IUnknown)
64 /*** IUnknown methods ***/
65 #define IOleCache_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
66 #define IOleCache_AddRef(p) ICOM_CALL (AddRef,p)
67 #define IOleCache_Release(p) ICOM_CALL (Release,p)
68 /*** IOleCache methods ***/
69 #define IOleCache_Cache(p,a,b,c) ICOM_CALL3(Cache,p,a,b,c)
70 #define IOleCache_Uncache(p,a) ICOM_CALL1(Uncache,p,a)
71 #define IOleCache_EnumCache(p,a) ICOM_CALL1(EnumCache,p,a)
72 #define IOleCache_InitCache(p,a) ICOM_CALL1(InitCache,p,a)
73 #define IOleCache_SetData(p,a,b,c) ICOM_CALL3(SetData,p,a,b,c)
76 /*****************************************************************************
77 * IOleCache2 interface
79 #define ICOM_INTERFACE IOleCache2
80 #define IOleCache2_METHODS \
81 ICOM_METHOD3(HRESULT,UpdateCache, LPDATAOBJECT,pDataObject, DWORD,grfUpdf, LPVOID,pReserved) \
82 ICOM_METHOD1(HRESULT,DiscardCache, DWORD,dwDiscardOptions)
83 #define IOleCache2_IMETHODS \
86 ICOM_DEFINE(IOleCache2,IOleCache)
89 /*** IUnknown methods ***/
90 #define IOleCache2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
91 #define IOleCache2_AddRef(p) ICOM_CALL (AddRef,p)
92 #define IOleCache2_Release(p) ICOM_CALL (Release,p)
93 /*** IOleCache methods ***/
94 #define IOleCache2_Cache(p,a,b,c) ICOM_CALL3(Cache,p,a,b,c)
95 #define IOleCache2_Uncache(p,a) ICOM_CALL1(Uncache,p,a)
96 #define IOleCache2_EnumCache(p,a) ICOM_CALL1(EnumCache,p,a)
97 #define IOleCache2_InitCache(p,a) ICOM_CALL1(InitCache,p,a)
98 #define IOleCache2_SetData(p,a,b,c) ICOM_CALL3(SetData,p,a,b,c)
99 /*** IOleCache2 methods ***/
100 #define IOleCache2_UpdateCache(p,a,b,c) ICOM_CALL3(UpdateCache,p,a,b,c)
101 #define IOleCache2_DiscardCache(p,a) ICOM_CALL1(DiscardCache,p,a)
104 /*****************************************************************************
105 * IOleCacheControl interface
107 #define ICOM_INTERFACE IOleCacheControl
108 #define IOleCacheControl_METHODS \
109 ICOM_METHOD1(HRESULT,OnRun, LPDATAOBJECT,pDataObject) \
110 ICOM_METHOD (HRESULT,OnStop)
111 #define IOleCacheControl_IMETHODS \
113 IOleCacheControl_METHODS
114 ICOM_DEFINE(IOleCacheControl,IUnknown)
115 #undef ICOM_INTERFACE
117 /*** IUnknown methods ***/
118 #define IOleCacheControl_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
119 #define IOleCacheControl_AddRef(p) ICOM_CALL (AddRef,p)
120 #define IOleCacheControl_Release(p) ICOM_CALL (Release,p)
121 /*** IOleCacheControl methods ***/
122 #define IOleCacheControl_OnRun(p,a) ICOM_CALL1(UpdateCache,p,a)
123 #define IOleCacheControl_OnStop(p) ICOM_CALL (OnStop,p)
128 #endif /* defined(__cplusplus) */
130 #endif /* __WINE_WINE_OBJ_CONTROL_H */