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