1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _OCONNECTIONPOINTCONTAINERHELPER_HXX
29*cdf0e10cSrcweir #define _OCONNECTIONPOINTCONTAINERHELPER_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir //______________________________________________________________________________________________________________
32*cdf0e10cSrcweir //	includes of other projects
33*cdf0e10cSrcweir //______________________________________________________________________________________________________________
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir #include <com/sun/star/lang/XConnectionPointContainer.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/lang/XConnectionPoint.hpp>
37*cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
38*cdf0e10cSrcweir #include <cppuhelper/propshlp.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir //______________________________________________________________________________________________________________
41*cdf0e10cSrcweir //	includes of my own project
42*cdf0e10cSrcweir //______________________________________________________________________________________________________________
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir //______________________________________________________________________________________________________________
45*cdf0e10cSrcweir //	namespaces
46*cdf0e10cSrcweir //______________________________________________________________________________________________________________
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir namespace unocontrols{
49*cdf0e10cSrcweir 
50*cdf0e10cSrcweir #define	UNO3_ANY										::com::sun::star::uno::Any
51*cdf0e10cSrcweir #define	UNO3_SEQUENCE									::com::sun::star::uno::Sequence
52*cdf0e10cSrcweir #define	UNO3_TYPE										::com::sun::star::uno::Type
53*cdf0e10cSrcweir #define	UNO3_REFERENCE									::com::sun::star::uno::Reference
54*cdf0e10cSrcweir #define	UNO3_XCONNECTIONPOINTCONTAINER					::com::sun::star::lang::XConnectionPointContainer
55*cdf0e10cSrcweir #define	UNO3_XCONNECTIONPOINT							::com::sun::star::lang::XConnectionPoint
56*cdf0e10cSrcweir #define	UNO3_MUTEX										::osl::Mutex
57*cdf0e10cSrcweir #define	UNO3_RUNTIMEEXCEPTION							::com::sun::star::uno::RuntimeException
58*cdf0e10cSrcweir #define	UNO3_XINTERFACE									::com::sun::star::uno::XInterface
59*cdf0e10cSrcweir #define	UNO3_OMULTITYPEINTERFACECONTAINERHELPER			::cppu::OMultiTypeInterfaceContainerHelper
60*cdf0e10cSrcweir #define	UNO3_LISTENEREXISTEXCEPTION						::com::sun::star::lang::ListenerExistException
61*cdf0e10cSrcweir #define	UNO3_INVALIDLISTENEREXCEPTION					::com::sun::star::lang::InvalidListenerException
62*cdf0e10cSrcweir #define	UNO3_WEAKREFERENCE								::com::sun::star::uno::WeakReference
63*cdf0e10cSrcweir #define	UNO3_OWEAKOBJECT								::cppu::OWeakObject
64*cdf0e10cSrcweir 
65*cdf0e10cSrcweir //______________________________________________________________________________________________________________
66*cdf0e10cSrcweir //	defines
67*cdf0e10cSrcweir //______________________________________________________________________________________________________________
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir //______________________________________________________________________________________________________________
70*cdf0e10cSrcweir //	class declaration OConnectionPointContainerHelper
71*cdf0e10cSrcweir //______________________________________________________________________________________________________________
72*cdf0e10cSrcweir 
73*cdf0e10cSrcweir class OConnectionPointContainerHelper	:	public	UNO3_XCONNECTIONPOINTCONTAINER
74*cdf0e10cSrcweir 										,	public	UNO3_OWEAKOBJECT
75*cdf0e10cSrcweir {
76*cdf0e10cSrcweir 
77*cdf0e10cSrcweir //______________________________________________________________________________________________________________
78*cdf0e10cSrcweir //	public methods
79*cdf0e10cSrcweir //______________________________________________________________________________________________________________
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir public:
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir 	//__________________________________________________________________________________________________________
84*cdf0e10cSrcweir 	//	construct/destruct
85*cdf0e10cSrcweir 	//__________________________________________________________________________________________________________
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir 	/**_________________________________________________________________________________________________________
88*cdf0e10cSrcweir 		@short
89*cdf0e10cSrcweir 		@descr
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir 		@seealso
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir 		@param
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir 		@return
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir 		@onerror
98*cdf0e10cSrcweir 	*/
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir 	OConnectionPointContainerHelper( UNO3_MUTEX& aMutex );
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir 	/**_________________________________________________________________________________________________________
103*cdf0e10cSrcweir 		@short
104*cdf0e10cSrcweir 		@descr
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir 		@seealso
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir 		@param
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir 		@return
111*cdf0e10cSrcweir 
112*cdf0e10cSrcweir 		@onerror
113*cdf0e10cSrcweir 	*/
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir 	virtual	~OConnectionPointContainerHelper();
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir 	//________________________________________________________________________________________________________
118*cdf0e10cSrcweir 	//	XInterface
119*cdf0e10cSrcweir 	//________________________________________________________________________________________________________
120*cdf0e10cSrcweir 
121*cdf0e10cSrcweir 	/**_______________________________________________________________________________________________________
122*cdf0e10cSrcweir 		@short		give answer, if interface is supported
123*cdf0e10cSrcweir 		@descr		The interfaces are searched by type.
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir 		@seealso	XInterface
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir 		@param      "rType" is the type of searched interface.
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir 		@return		Any		information about found interface
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir 		@onerror	A RuntimeException is thrown.
132*cdf0e10cSrcweir 	*/
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir 	virtual UNO3_ANY SAL_CALL queryInterface( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION );
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir 	/**_______________________________________________________________________________________________________
137*cdf0e10cSrcweir 		@short		increment refcount
138*cdf0e10cSrcweir 		@descr		-
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 		@seealso	XInterface
141*cdf0e10cSrcweir 		@seealso	release()
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir 		@param		-
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir 		@return		-
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir 		@onerror	A RuntimeException is thrown.
148*cdf0e10cSrcweir 	*/
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir     virtual void SAL_CALL acquire() throw();
151*cdf0e10cSrcweir 
152*cdf0e10cSrcweir 	/**_______________________________________________________________________________________________________
153*cdf0e10cSrcweir 		@short		decrement refcount
154*cdf0e10cSrcweir 		@descr		-
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir 		@seealso	XInterface
157*cdf0e10cSrcweir 		@seealso	acquire()
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir 		@param		-
160*cdf0e10cSrcweir 
161*cdf0e10cSrcweir 		@return		-
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir 		@onerror	A RuntimeException is thrown.
164*cdf0e10cSrcweir 	*/
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir     virtual void SAL_CALL release() throw();
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir 	//__________________________________________________________________________________________________________
169*cdf0e10cSrcweir 	//	XConnectionPointContainer
170*cdf0e10cSrcweir 	//__________________________________________________________________________________________________________
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir 	/**_________________________________________________________________________________________________________
173*cdf0e10cSrcweir 		@short
174*cdf0e10cSrcweir 		@descr
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 		@seealso
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir 		@param
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir 		@return
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir 		@onerror
183*cdf0e10cSrcweir 	*/
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir     virtual UNO3_SEQUENCE< UNO3_TYPE > SAL_CALL getConnectionPointTypes() throw( UNO3_RUNTIMEEXCEPTION );
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir 	/**_________________________________________________________________________________________________________
188*cdf0e10cSrcweir 		@short
189*cdf0e10cSrcweir 		@descr
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir 		@seealso
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir 		@param
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 		@return
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir 		@onerror
198*cdf0e10cSrcweir 	*/
199*cdf0e10cSrcweir 
200*cdf0e10cSrcweir     virtual UNO3_REFERENCE< UNO3_XCONNECTIONPOINT > SAL_CALL queryConnectionPoint( const UNO3_TYPE& aType ) throw( UNO3_RUNTIMEEXCEPTION );
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 	/**_________________________________________________________________________________________________________
203*cdf0e10cSrcweir 		@short
204*cdf0e10cSrcweir 		@descr
205*cdf0e10cSrcweir 
206*cdf0e10cSrcweir 		@seealso
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir 		@param
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 		@return
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir 		@onerror
213*cdf0e10cSrcweir 	*/
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir     virtual void SAL_CALL advise(	const	UNO3_TYPE&							aType		,
216*cdf0e10cSrcweir 									const	UNO3_REFERENCE< UNO3_XINTERFACE >&	xListener	) throw( UNO3_RUNTIMEEXCEPTION );
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir 	/**_________________________________________________________________________________________________________
219*cdf0e10cSrcweir 		@short
220*cdf0e10cSrcweir 		@descr
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 		@seealso
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir 		@param
225*cdf0e10cSrcweir 
226*cdf0e10cSrcweir 		@return
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir 		@onerror
229*cdf0e10cSrcweir 	*/
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir     virtual void SAL_CALL unadvise(	const	UNO3_TYPE&							aType		,
232*cdf0e10cSrcweir 									const	UNO3_REFERENCE< UNO3_XINTERFACE >&	xListener	) throw( UNO3_RUNTIMEEXCEPTION );
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir 	/**_________________________________________________________________________________________________________
235*cdf0e10cSrcweir 		@short
236*cdf0e10cSrcweir 		@descr
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 		@seealso
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir 		@param
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir 		@return
243*cdf0e10cSrcweir 
244*cdf0e10cSrcweir 		@onerror
245*cdf0e10cSrcweir 	*/
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir 	UNO3_OMULTITYPEINTERFACECONTAINERHELPER& impl_getMultiTypeContainer();
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir //______________________________________________________________________________________________________________
250*cdf0e10cSrcweir //	private variables
251*cdf0e10cSrcweir //______________________________________________________________________________________________________________
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir private:
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir 	UNO3_MUTEX&									m_aSharedMutex			;
256*cdf0e10cSrcweir 	UNO3_OMULTITYPEINTERFACECONTAINERHELPER		m_aMultiTypeContainer	;	// Container to hold listener
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir };	// class OConnectionPointContainerHelper
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir }	// namespace unocontrols
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir #endif	// #ifndef _OCONNECTIONPOINTCONTAINERHELPER_HXX
263