Use a more compatible technique to declare COM interfaces methods,
[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 /*** 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)
74
75
76 /*****************************************************************************
77  * IOleCache2 interface
78  */
79 #define INTERFACE IOleCache2
80 #define IOleCache2_METHODS \
81         STDMETHOD(UpdateCache)(THIS_ LPDATAOBJECT pDataObject, DWORD grfUpdf, LPVOID pReserved) PURE; \
82         STDMETHOD(DiscardCache)(THIS_ DWORD dwDiscardOptions) PURE;
83 #define IOleCache2_IMETHODS \
84         IOleCache_IMETHODS \
85         IOleCache2_METHODS
86 ICOM_DEFINE(IOleCache2,IOleCache)
87 #undef INTERFACE
88
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)
102
103
104 /*****************************************************************************
105  * IOleCacheControl interface
106  */
107 #define INTERFACE IOleCacheControl
108 #define IOleCacheControl_METHODS \
109         STDMETHOD(OnRun)(THIS_ LPDATAOBJECT pDataObject) PURE; \
110         STDMETHOD(OnStop)(THIS) PURE;
111 #define IOleCacheControl_IMETHODS \
112         IUnknown_IMETHODS \
113         IOleCacheControl_METHODS
114 ICOM_DEFINE(IOleCacheControl,IUnknown)
115 #undef INTERFACE
116
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)
124
125
126 #ifdef __cplusplus
127 } /* extern "C" */
128 #endif /* defined(__cplusplus) */
129
130 #endif /* __WINE_WINE_OBJ_CONTROL_H */