bump product version to 5.0.4.1
[LibreOffice.git] / UnoControls / source / inc / OConnectionPointContainerHelper.hxx
blobec2154c3c8c33e167db48b96c3887bfc059b485e
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 INCLUDED_UNOCONTROLS_SOURCE_INC_OCONNECTIONPOINTCONTAINERHELPER_HXX
21 #define INCLUDED_UNOCONTROLS_SOURCE_INC_OCONNECTIONPOINTCONTAINERHELPER_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 // namespaces
30 namespace unocontrols{
32 // class declaration OConnectionPointContainerHelper
34 class OConnectionPointContainerHelper : public ::com::sun::star::lang::XConnectionPointContainer
35 , public ::cppu::OWeakObject
38 // public methods
40 public:
42 // construct/destruct
44 /**_________________________________________________________________________________________________________
45 @short
46 @descr
48 @seealso
50 @param
52 @return
54 @onerror
57 OConnectionPointContainerHelper( ::osl::Mutex& aMutex );
59 /**_________________________________________________________________________________________________________
60 @short
61 @descr
63 @seealso
65 @param
67 @return
69 @onerror
72 virtual ~OConnectionPointContainerHelper();
74 // XInterface
76 /**_______________________________________________________________________________________________________
77 @short give answer, if interface is supported
78 @descr The interfaces are searched by type.
80 @seealso XInterface
82 @param "rType" is the type of searched interface.
84 @return Any information about found interface
86 @onerror A RuntimeException is thrown.
89 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType )
90 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
92 /**_______________________________________________________________________________________________________
93 @short increment refcount
94 @seealso XInterface
95 @seealso release()
96 @onerror A RuntimeException is thrown.
99 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
101 /**_______________________________________________________________________________________________________
102 @short decrement refcount
103 @seealso XInterface
104 @seealso acquire()
105 @onerror A RuntimeException is thrown.
108 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
110 // XConnectionPointContainer
112 /**_________________________________________________________________________________________________________
113 @short
114 @descr
116 @seealso
118 @param
120 @return
122 @onerror
125 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getConnectionPointTypes()
126 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
128 /**_________________________________________________________________________________________________________
129 @short
130 @descr
132 @seealso
134 @param
136 @return
138 @onerror
141 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XConnectionPoint > SAL_CALL queryConnectionPoint(
142 const ::com::sun::star::uno::Type& aType
143 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
145 /**_________________________________________________________________________________________________________
146 @short
147 @descr
149 @seealso
151 @param
153 @return
155 @onerror
158 virtual void SAL_CALL advise(
159 const ::com::sun::star::uno::Type& aType ,
160 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xListener
161 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
163 /**_________________________________________________________________________________________________________
164 @short
165 @descr
167 @seealso
169 @param
171 @return
173 @onerror
176 virtual void SAL_CALL unadvise(
177 const ::com::sun::star::uno::Type& aType ,
178 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xListener
179 ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
181 // public but impl method!
182 // Is necessary to get container member at OConnectionPoint-instance.
183 // Impl methods are not threadsafe!
184 // "Parent" function must do this.
185 ::cppu::OMultiTypeInterfaceContainerHelper& impl_getMultiTypeContainer() { return m_aMultiTypeContainer; }
188 // private variables
190 private:
192 ::osl::Mutex& m_aSharedMutex;
193 ::cppu::OMultiTypeInterfaceContainerHelper m_aMultiTypeContainer; // Container to hold listener
195 }; // class OConnectionPointContainerHelper
197 } // namespace unocontrols
199 #endif // INCLUDED_UNOCONTROLS_SOURCE_INC_OCONNECTIONPOINTCONTAINERHELPER_HXX
201 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */