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