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