Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP
2 : #define INCLUDED_COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/beans/XVetoableChangeListener.hdl"
7 :
8 : #include "com/sun/star/uno/RuntimeException.hpp"
9 : #include "com/sun/star/beans/PropertyChangeEvent.hpp"
10 : #include "com/sun/star/beans/PropertyVetoException.hpp"
11 : #include "com/sun/star/lang/XEventListener.hpp"
12 : #include "com/sun/star/uno/Reference.hxx"
13 : #include "com/sun/star/uno/Type.hxx"
14 : #include "cppu/unotype.hxx"
15 : #include "osl/mutex.hxx"
16 : #include "rtl/instance.hxx"
17 :
18 : namespace com { namespace sun { namespace star { namespace beans { namespace detail {
19 :
20 : struct theXVetoableChangeListenerType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXVetoableChangeListenerType >
21 : {
22 263 : ::com::sun::star::uno::Type * operator()() const
23 : {
24 263 : ::rtl::OUString sTypeName( "com.sun.star.beans.XVetoableChangeListener" );
25 :
26 : // Start inline typedescription generation
27 263 : typelib_InterfaceTypeDescription * pTD = 0;
28 :
29 : typelib_TypeDescriptionReference * aSuperTypes[1];
30 263 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::lang::XEventListener > >::get().getTypeLibType();
31 263 : typelib_TypeDescriptionReference * pMembers[1] = { 0 };
32 263 : ::rtl::OUString sMethodName0( "com.sun.star.beans.XVetoableChangeListener::vetoableChange" );
33 : typelib_typedescriptionreference_new( &pMembers[0],
34 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
35 263 : sMethodName0.pData );
36 :
37 : typelib_typedescription_newMIInterface(
38 : &pTD,
39 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
40 : 1, aSuperTypes,
41 : 1,
42 263 : pMembers );
43 :
44 263 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
45 263 : typelib_typedescriptionreference_release( pMembers[0] );
46 263 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
47 :
48 263 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
49 : }
50 : };
51 :
52 : } } } } }
53 :
54 : namespace com { namespace sun { namespace star { namespace beans {
55 :
56 285 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::beans::XVetoableChangeListener const *) {
57 285 : const ::com::sun::star::uno::Type &rRet = *detail::theXVetoableChangeListenerType::get();
58 : // End inline typedescription generation
59 : static bool bInitStarted = false;
60 285 : if (!bInitStarted)
61 : {
62 263 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
63 263 : if (!bInitStarted)
64 : {
65 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
66 263 : bInitStarted = true;
67 263 : ::cppu::UnoType< css::uno::RuntimeException >::get();
68 263 : ::cppu::UnoType< css::beans::PropertyChangeEvent >::get();
69 263 : ::cppu::UnoType< css::beans::PropertyVetoException >::get();
70 :
71 263 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
72 : {
73 : typelib_Parameter_Init aParameters[1];
74 263 : ::rtl::OUString sParamName0( "aEvent" );
75 263 : ::rtl::OUString sParamType0( "com.sun.star.beans.PropertyChangeEvent" );
76 263 : aParameters[0].pParamName = sParamName0.pData;
77 263 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRUCT;
78 263 : aParameters[0].pTypeName = sParamType0.pData;
79 263 : aParameters[0].bIn = sal_True;
80 263 : aParameters[0].bOut = sal_False;
81 263 : ::rtl::OUString the_ExceptionName0( "com.sun.star.beans.PropertyVetoException" );
82 263 : ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
83 263 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
84 263 : ::rtl::OUString sReturnType0( "void" );
85 263 : ::rtl::OUString sMethodName0( "com.sun.star.beans.XVetoableChangeListener::vetoableChange" );
86 : typelib_typedescription_newInterfaceMethod( &pMethod,
87 : 4, sal_False,
88 : sMethodName0.pData,
89 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType0.pData,
90 : 1, aParameters,
91 263 : 2, the_Exceptions );
92 263 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
93 : }
94 263 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
95 263 : }
96 : }
97 : else
98 : {
99 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
100 : }
101 285 : return rRet;
102 : }
103 :
104 : } } } }
105 :
106 22 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::beans::XVetoableChangeListener > const *) SAL_THROW(()) {
107 22 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::beans::XVetoableChangeListener > >::get();
108 : }
109 :
110 0 : ::com::sun::star::uno::Type const & css::beans::XVetoableChangeListener::static_type(SAL_UNUSED_PARAMETER void *) {
111 0 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::beans::XVetoableChangeListener > * >(0));
112 : }
113 :
114 : #endif // INCLUDED_COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP
|