Implemented KERNEL.447 (WIN32_OldYield16).
[wine] / include / wine / obj_connection.h
1 /*
2  * Defines the COM interfaces and APIs related to structured data storage.
3  *
4  * Depends on 'obj_base.h'.
5  */
6
7 #ifndef __WINE_WINE_OBJ_CONNECTION_H
8 #define __WINE_WINE_OBJ_CONNECTION_H
9
10
11 #include "winbase.h"
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* defined(__cplusplus) */
16
17 /*****************************************************************************
18  * Declare the structures
19  */
20
21 typedef struct tagCONNECTDATA
22 {
23                                   IUnknown *pUnk;
24                                           DWORD dwCookie;
25 } CONNECTDATA, *LPCONNECTDATA;
26  
27 /*****************************************************************************
28  * Predeclare the interfaces
29  */
30 DEFINE_GUID(IID_IConnectionPoint, 0xb196b286, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
31 typedef struct IConnectionPoint IConnectionPoint, *LPCONNECTIONPOINT;
32
33 DEFINE_GUID(IID_IConnectionPointContainer, 0xb196b284, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
34 typedef struct IConnectionPointContainer IConnectionPointContainer, *LPCONNECTIONPOINTCONTAINER;
35
36 DEFINE_GUID(IID_IEnumConnections, 0xb196b287, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
37 typedef struct IEnumConnections IEnumConnections, *LPENUMCONNECTIONS;
38
39 DEFINE_GUID(IID_IEnumConnectionPoints, 0xb196b285, 0xbab4, 0x101a, 0xb6, 0x9c, 0x00, 0xaa, 0x00, 0x34, 0x1d, 0x07);
40 typedef struct IEnumConnectionPoints IEnumConnectionPoints, *LPENUMCONNECTIONPOINTS;
41
42 /*****************************************************************************
43  * IConnectionPoint interface
44  */
45 #define ICOM_INTERFACE IConnectionPoint
46 #define IConnectionPoint_METHODS \
47         ICOM_METHOD1(HRESULT,GetConnectionInterface, IID*,pIID) \
48         ICOM_METHOD1(HRESULT,GetConnectionPointContainer, IConnectionPointContainer**,ppCPC) \
49         ICOM_METHOD2(HRESULT,Advise, IUnknown*,pUnkSink, DWORD*,pdwCookie) \
50         ICOM_METHOD1(HRESULT,Unadvise, DWORD,dwCookie) \
51         ICOM_METHOD1(HRESULT,EnumConnections, IEnumConnections**,ppEnum)
52 #define IConnectionPoint_IMETHODS \
53         IUnknown_IMETHODS \
54         IConnectionPoint_METHODS
55 ICOM_DEFINE(IConnectionPoint,IUnknown)
56 #undef ICOM_INTERFACE
57
58 #ifdef ICOM_CINTERFACE
59 /*** IUnknwon methods ***/
60 #define IConnectionPoint_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
61 #define IConnectionPoint_AddRef(p)                  ICOM_CALL (AddRef,p)
62 #define IConnectionPoint_Release(p)                 ICOM_CALL (Release,p)
63 /*** IConnectionPointContainer methods ***/
64 #define IConnectionPoint_GetConnectionInterface(p,a)      ICOM_CALL1(GetConnectionInterface,p,a)
65 #define IConnectionPoint_GetConnectionPointContainer(p,a) ICOM_CALL1(GetConnectionPointContainer,p,a)
66 #define IConnectionPoint_Advise(p,a,b)                    ICOM_CALL2(Advise,p,a,b)
67 #define IConnectionPoint_Unadvise(p,a)                    ICOM_CALL1(Unadvise,p,a)
68 #define IConnectionPoint_EnumConnections(p,a)             ICOM_CALL1(EnumConnections,p,a)
69 #endif
70
71
72 /*****************************************************************************
73  * IConnectionPointContainer interface
74  */
75 #define ICOM_INTERFACE IConnectionPointContainer
76 #define IConnectionPointContainer_METHODS \
77         ICOM_METHOD1(HRESULT,EnumConnectionPoints, IEnumConnectionPoints**,ppEnum) \
78         ICOM_METHOD2(HRESULT,FindConnectionPoint, REFIID,riid, IConnectionPoint**,ppCP)
79 #define IConnectionPointContainer_IMETHODS \
80         IUnknown_IMETHODS \
81         IConnectionPointContainer_METHODS
82 ICOM_DEFINE(IConnectionPointContainer,IUnknown)
83 #undef ICOM_INTERFACE
84
85 #ifdef ICOM_CINTERFACE
86 /*** IUnknwon methods ***/
87 #define IConnectionPointContainer_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
88 #define IConnectionPointContainer_AddRef(p)                  ICOM_CALL (AddRef,p)
89 #define IConnectionPointContainer_Release(p)                 ICOM_CALL (Release,p)
90 /*** IConnectionPointContainer methods ***/
91 #define IConnectionPointContainer_EnumConnectionPoints(p,a)  ICOM_CALL1(CreateInstance,p,a)
92 #define IConnectionPointContainer_FindConnectionPoint(p,a,b) ICOM_CALL2(LockServer,p,a,b)
93 #endif
94
95
96 /*****************************************************************************
97  * IEnumConnections interface
98  */
99 #define ICOM_INTERFACE IEnumConnections
100 #define IEnumConnections_METHODS \
101         ICOM_METHOD3(HRESULT,Next, ULONG,cConnections, LPCONNECTDATA,rgcd, ULONG*,pcFectched) \
102         ICOM_METHOD1(HRESULT,Skip, ULONG,cConnections) \
103         ICOM_METHOD (HRESULT,Reset) \
104         ICOM_METHOD1(HRESULT,Clone, IEnumConnections**,ppEnum)
105 #define IEnumConnections_IMETHODS \
106         IUnknown_IMETHODS \
107         IEnumConnections_METHODS
108 ICOM_DEFINE(IEnumConnections,IUnknown)
109 #undef ICOM_INTERFACE
110
111 #ifdef ICOM_CINTERFACE
112 /*** IUnknwon methods ***/
113 #define IEnumConnections_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
114 #define IEnumConnections_AddRef(p)                  ICOM_CALL (AddRef,p)
115 #define IEnumConnections_Release(p)                 ICOM_CALL (Release,p)
116 /*** IConnectionPointContainer methods ***/
117 #define IEnumConnections_Next(p,a,b,c)              ICOM_CALL3(Next,p,a,b,c)
118 #define IEnumConnections_Skip(p,a)                  ICOM_CALL1(Skip,p,a)
119 #define IEnumConnections_Reset(p)                   ICOM_CALL (Reset,p)
120 #define IEnumConnections_Clone(p,a)                 ICOM_CALL1(Clone,p,a)
121 #endif
122
123 /*****************************************************************************
124  * IEnumConnectionPoints interface
125  */
126 #define ICOM_INTERFACE IEnumConnectionPoints
127 #define IEnumConnectionPoints_METHODS \
128         ICOM_METHOD3(HRESULT,Next, ULONG,cConnections, LPCONNECTIONPOINT*,ppCP, ULONG*,pcFectched) \
129         ICOM_METHOD1(HRESULT,Skip, ULONG,cConnections) \
130         ICOM_METHOD (HRESULT,Reset) \
131         ICOM_METHOD1(HRESULT,Clone, IEnumConnections**,ppEnum)
132 #define IEnumConnectionPoints_IMETHODS \
133         IUnknown_IMETHODS \
134         IEnumConnectionPoints_METHODS
135 ICOM_DEFINE(IEnumConnectionPoints,IUnknown)
136 #undef ICOM_INTERFACE
137
138 #ifdef ICOM_CINTERFACE
139 /*** IUnknwon methods ***/
140 #define IEnumConnectionPoints_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
141 #define IEnumConnectionPoints_AddRef(p)                  ICOM_CALL (AddRef,p)
142 #define IEnumConnectionPoints_Release(p)                 ICOM_CALL (Release,p)
143 /*** IConnectionPointContainer methods ***/
144 #define IEnumConnectionPoints_Next(p,a,b,c)              ICOM_CALL3(Next,p,a,b,c)
145 #define IEnumConnectionPoints_Skip(p,a)                  ICOM_CALL1(Skip,p,a)
146 #define IEnumConnectionPoints_Reset(p)                   ICOM_CALL (Reset,p)
147 #define IEnumConnectionPoints_Clone(p,a)                 ICOM_CALL1(Clone,p,a)
148 #endif
149                                 
150 #ifdef __cplusplus
151 } /* extern "C" */
152 #endif /* defined(__cplusplus) */
153
154 #endif /* __WINE_WINE_OBJ_CONTROL_H */
155
156