GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / UnoControls / source / inc / OConnectionPointHelper.hxx
blob2307e1e402d2f765842f8d4e0148f8b67dd0dc8e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _OCONNECTIONPOINTHELPER_HXX
21 #define _OCONNECTIONPOINTHELPER_HXX
23 #include <com/sun/star/lang/XConnectionPointContainer.hpp>
24 #include <com/sun/star/lang/XConnectionPoint.hpp>
25 #include <cppuhelper/weak.hxx>
26 #include <cppuhelper/propshlp.hxx>
28 #include "OConnectionPointContainerHelper.hxx"
30 //______________________________________________________________________________________________________________
31 // namespaces
32 //______________________________________________________________________________________________________________
34 namespace unocontrols{
36 //______________________________________________________________________________________________________________
37 // class declaration OConnectionPointHelper
38 //______________________________________________________________________________________________________________
40 class OConnectionPointHelper : public ::com::sun::star::lang::XConnectionPoint
41 , public ::cppu::OWeakObject
44 //______________________________________________________________________________________________________________
45 // public methods
46 //______________________________________________________________________________________________________________
48 public:
50 //__________________________________________________________________________________________________________
51 // construct/destruct
52 //__________________________________________________________________________________________________________
54 /**_________________________________________________________________________________________________________
55 @short
56 @descr
58 @seealso
60 @param
62 @return
64 @onerror
67 OConnectionPointHelper( ::osl::Mutex& aMutex ,
68 OConnectionPointContainerHelper* pContainerImplementation ,
69 ::com::sun::star::uno::Type aType );
71 /**_________________________________________________________________________________________________________
72 @short
73 @descr
75 @seealso
77 @param
79 @return
81 @onerror
84 virtual ~OConnectionPointHelper();
86 //________________________________________________________________________________________________________
87 // XInterface
88 //________________________________________________________________________________________________________
90 /**_______________________________________________________________________________________________________
91 @short give answer, if interface is supported
92 @descr The interfaces are searched by type.
94 @seealso XInterface
96 @param "rType" is the type of searched interface.
98 @return Any information about found interface
100 @onerror A RuntimeException is thrown.
103 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType )
104 throw( ::com::sun::star::uno::RuntimeException );
106 /**_______________________________________________________________________________________________________
107 @short increment refcount
108 @descr -
110 @seealso XInterface
111 @seealso release()
113 @param -
115 @return -
117 @onerror A RuntimeException is thrown.
120 virtual void SAL_CALL acquire() throw();
122 /**_______________________________________________________________________________________________________
123 @short decrement refcount
124 @descr -
126 @seealso XInterface
127 @seealso acquire()
129 @param -
131 @return -
133 @onerror A RuntimeException is thrown.
136 virtual void SAL_CALL release() throw();
138 //__________________________________________________________________________________________________________
139 // XConnectionPoint
140 //__________________________________________________________________________________________________________
142 /**_________________________________________________________________________________________________________
143 @short
144 @descr
146 @seealso
148 @param
150 @return
152 @onerror
155 virtual ::com::sun::star::uno::Type SAL_CALL getConnectionType()
156 throw( ::com::sun::star::uno::RuntimeException );
158 /**_________________________________________________________________________________________________________
159 @short
160 @descr
162 @seealso
164 @param
166 @return
168 @onerror
171 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XConnectionPointContainer > SAL_CALL getConnectionPointContainer()
172 throw( ::com::sun::star::uno::RuntimeException );
174 /**_________________________________________________________________________________________________________
175 @short
176 @descr
178 @seealso
180 @param
182 @return
184 @onerror
187 virtual void SAL_CALL advise(
188 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xListener
189 ) throw (
190 ::com::sun::star::lang::ListenerExistException,
191 ::com::sun::star::lang::InvalidListenerException ,
192 ::com::sun::star::uno::RuntimeException
195 /**_________________________________________________________________________________________________________
196 @short
197 @descr
199 @seealso
201 @param
203 @return
205 @onerror
208 virtual void SAL_CALL unadvise( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xListener )
209 throw( ::com::sun::star::uno::RuntimeException );
211 /**_________________________________________________________________________________________________________
212 @short
213 @descr
215 @seealso
217 @param
219 @return
221 @onerror
224 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > SAL_CALL getConnections()
225 throw( ::com::sun::star::uno::RuntimeException );
227 //______________________________________________________________________________________________________________
228 // private methods
229 //______________________________________________________________________________________________________________
231 private:
233 /**_________________________________________________________________________________________________________
234 @short
235 @descr
237 @seealso
239 @param
241 @return
243 @onerror
246 sal_Bool impl_LockContainer();
248 /**_________________________________________________________________________________________________________
249 @short
250 @descr
252 @seealso
254 @param
256 @return
258 @onerror
261 void impl_UnlockContainer();
263 //______________________________________________________________________________________________________________
264 // private variables
265 //______________________________________________________________________________________________________________
267 private:
269 ::osl::Mutex& m_aSharedMutex ;
270 ::com::sun::star::uno::WeakReference< ::com::sun::star::lang::XConnectionPointContainer > m_oContainerWeakReference ; // Reference to container-class!. Don't use Reference<...>
271 // It is a ring-reference => and must be a wekreference!
272 OConnectionPointContainerHelper* m_pContainerImplementation ;
273 ::com::sun::star::uno::Type m_aInterfaceType ;
274 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xLock ;
276 }; // class OConnectionPointHelper
278 } // namespace unocontrols
280 #endif // #ifndef _OCONNECTIONPOINTHELPER_HXX
282 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */