1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _OCONNECTIONPOINTCONTAINERHELPER_HXX
21 #define _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 //______________________________________________________________________________________________________________
30 //______________________________________________________________________________________________________________
32 namespace unocontrols
{
34 //______________________________________________________________________________________________________________
35 // class declaration OConnectionPointContainerHelper
36 //______________________________________________________________________________________________________________
38 class OConnectionPointContainerHelper
: public ::com::sun::star::lang::XConnectionPointContainer
39 , public ::cppu::OWeakObject
42 //______________________________________________________________________________________________________________
44 //______________________________________________________________________________________________________________
48 //__________________________________________________________________________________________________________
50 //__________________________________________________________________________________________________________
52 /**_________________________________________________________________________________________________________
65 OConnectionPointContainerHelper( ::osl::Mutex
& aMutex
);
67 /**_________________________________________________________________________________________________________
80 virtual ~OConnectionPointContainerHelper();
82 //________________________________________________________________________________________________________
84 //________________________________________________________________________________________________________
86 /**_______________________________________________________________________________________________________
87 @short give answer, if interface is supported
88 @descr The interfaces are searched by type.
92 @param "rType" is the type of searched interface.
94 @return Any information about found interface
96 @onerror A RuntimeException is thrown.
99 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
)
100 throw( ::com::sun::star::uno::RuntimeException
);
102 /**_______________________________________________________________________________________________________
103 @short increment refcount
113 @onerror A RuntimeException is thrown.
116 virtual void SAL_CALL
acquire() throw();
118 /**_______________________________________________________________________________________________________
119 @short decrement refcount
129 @onerror A RuntimeException is thrown.
132 virtual void SAL_CALL
release() throw();
134 //__________________________________________________________________________________________________________
135 // XConnectionPointContainer
136 //__________________________________________________________________________________________________________
138 /**_________________________________________________________________________________________________________
151 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getConnectionPointTypes()
152 throw( ::com::sun::star::uno::RuntimeException
);
154 /**_________________________________________________________________________________________________________
167 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XConnectionPoint
> SAL_CALL
queryConnectionPoint(
168 const ::com::sun::star::uno::Type
& aType
169 ) throw( ::com::sun::star::uno::RuntimeException
);
171 /**_________________________________________________________________________________________________________
184 virtual void SAL_CALL
advise(
185 const ::com::sun::star::uno::Type
& aType
,
186 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& xListener
187 ) throw( ::com::sun::star::uno::RuntimeException
);
189 /**_________________________________________________________________________________________________________
202 virtual void SAL_CALL
unadvise(
203 const ::com::sun::star::uno::Type
& aType
,
204 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& xListener
205 ) throw( ::com::sun::star::uno::RuntimeException
);
207 /**_________________________________________________________________________________________________________
220 ::cppu::OMultiTypeInterfaceContainerHelper
& impl_getMultiTypeContainer();
222 //______________________________________________________________________________________________________________
224 //______________________________________________________________________________________________________________
228 ::osl::Mutex
& m_aSharedMutex
;
229 ::cppu::OMultiTypeInterfaceContainerHelper m_aMultiTypeContainer
; // Container to hold listener
231 }; // class OConnectionPointContainerHelper
233 } // namespace unocontrols
235 #endif // #ifndef _OCONNECTIONPOINTCONTAINERHELPER_HXX
237 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */