Get rid of the ICOM_CALL macros.
[wine] / include / wine / obj_cache.h
1 /*
2  * Defines the COM interfaces and APIs related to structured data storage.
3  *
4  * Depends on 'obj_base.h'.
5  *
6  * Copyright (C) 1999 Paul Quinn
7  *
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.
12  *
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.
17  *
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
21  */
22
23 #ifndef __WINE_WINE_OBJ_CACHE_H
24 #define __WINE_WINE_OBJ_CACHE_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* defined(__cplusplus) */
29
30 /*****************************************************************************
31  * Declare the structures
32  */
33
34
35 /*****************************************************************************
36  * Predeclare the interfaces
37  */
38
39 DEFINE_OLEGUID(IID_IOleCache,  0x0000011eL, 0, 0);
40 typedef struct IOleCache IOleCache, *LPOLECACHE;
41
42 DEFINE_OLEGUID(IID_IOleCache2,  0x00000128L, 0, 0);
43 typedef struct IOleCache2 IOleCache2, *LPOLECACHE2;
44
45 DEFINE_OLEGUID(IID_IOleCacheControl,  0x00000129L, 0, 0);
46 typedef struct IOleCacheControl IOleCacheControl, *LPOLECACHECONTROL;
47
48 /*****************************************************************************
49  * IOleCache interface
50  */
51 #define INTERFACE IOleCache
52 #define IOleCache_METHODS \
53         STDMETHOD(Cache)(THIS_ FORMATETC *pformatetc, DWORD advf, DWORD * pdwConnection) PURE; \
54         STDMETHOD(Uncache)(THIS_ DWORD dwConnection) PURE; \
55         STDMETHOD(EnumCache)(THIS_ IEnumSTATDATA **ppenumSTATDATA) PURE; \
56         STDMETHOD(InitCache)(THIS_ IDataObject *pDataObject) PURE; \
57         STDMETHOD(SetData)(THIS_ FORMATETC *pformatetc, STGMEDIUM *pmedium, BOOL fRelease) PURE;
58 #define IOleCache_IMETHODS \
59         IUnknown_IMETHODS \
60         IOleCache_METHODS
61 ICOM_DEFINE(IOleCache,IUnknown)
62 #undef INTERFACE
63
64 #ifdef COBJMACROS
65 /*** IUnknown methods ***/
66 #define IOleCache_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
67 #define IOleCache_AddRef(p)                  (p)->lpVtbl->AddRef(p)
68 #define IOleCache_Release(p)                 (p)->lpVtbl->Release(p)
69 /*** IOleCache methods ***/
70 #define IOleCache_Cache(p,a,b,c)             (p)->lpVtbl->Cache(p,a,b,c)
71 #define IOleCache_Uncache(p,a)               (p)->lpVtbl->Uncache(p,a)
72 #define IOleCache_EnumCache(p,a)             (p)->lpVtbl->EnumCache(p,a)
73 #define IOleCache_InitCache(p,a)             (p)->lpVtbl->InitCache(p,a)
74 #define IOleCache_SetData(p,a,b,c)           (p)->lpVtbl->SetData(p,a,b,c)
75 #endif
76
77
78 /*****************************************************************************
79  * IOleCache2 interface
80  */
81 #define INTERFACE IOleCache2
82 #define IOleCache2_METHODS \
83         STDMETHOD(UpdateCache)(THIS_ LPDATAOBJECT pDataObject, DWORD grfUpdf, LPVOID pReserved) PURE; \
84         STDMETHOD(DiscardCache)(THIS_ DWORD dwDiscardOptions) PURE;
85 #define IOleCache2_IMETHODS \
86         IOleCache_IMETHODS \
87         IOleCache2_METHODS
88 ICOM_DEFINE(IOleCache2,IOleCache)
89 #undef INTERFACE
90
91 #ifdef COBJMACROS
92 /*** IUnknown methods ***/
93 #define IOleCache2_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
94 #define IOleCache2_AddRef(p)                  (p)->lpVtbl->AddRef(p)
95 #define IOleCache2_Release(p)                 (p)->lpVtbl->Release(p)
96 /*** IOleCache methods ***/
97 #define IOleCache2_Cache(p,a,b,c)             (p)->lpVtbl->Cache(p,a,b,c)
98 #define IOleCache2_Uncache(p,a)               (p)->lpVtbl->Uncache(p,a)
99 #define IOleCache2_EnumCache(p,a)             (p)->lpVtbl->EnumCache(p,a)
100 #define IOleCache2_InitCache(p,a)             (p)->lpVtbl->InitCache(p,a)
101 #define IOleCache2_SetData(p,a,b,c)           (p)->lpVtbl->SetData(p,a,b,c)
102 /*** IOleCache2 methods ***/
103 #define IOleCache2_UpdateCache(p,a,b,c)       (p)->lpVtbl->UpdateCache(p,a,b,c)
104 #define IOleCache2_DiscardCache(p,a)          (p)->lpVtbl->DiscardCache(p,a)
105 #endif
106
107
108 /*****************************************************************************
109  * IOleCacheControl interface
110  */
111 #define INTERFACE IOleCacheControl
112 #define IOleCacheControl_METHODS \
113         STDMETHOD(OnRun)(THIS_ LPDATAOBJECT pDataObject) PURE; \
114         STDMETHOD(OnStop)(THIS) PURE;
115 #define IOleCacheControl_IMETHODS \
116         IUnknown_IMETHODS \
117         IOleCacheControl_METHODS
118 ICOM_DEFINE(IOleCacheControl,IUnknown)
119 #undef INTERFACE
120
121 #ifdef COBJMACROS
122 /*** IUnknown methods ***/
123 #define IOleCacheControl_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
124 #define IOleCacheControl_AddRef(p)                  (p)->lpVtbl->AddRef(p)
125 #define IOleCacheControl_Release(p)                 (p)->lpVtbl->Release(p)
126 /*** IOleCacheControl methods ***/
127 #define IOleCacheControl_OnRun(p,a)                 (p)->lpVtbl->UpdateCache(p,a)
128 #define IOleCacheControl_OnStop(p)                  (p)->lpVtbl->OnStop(p)
129 #endif
130
131
132 #ifdef __cplusplus
133 } /* extern "C" */
134 #endif /* defined(__cplusplus) */
135
136 #endif /* __WINE_WINE_OBJ_CONTROL_H */