Branch data 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/uno/RuntimeException.hpp"
9 : : #include "com/sun/star/connection/ConnectionSetupException.hpp"
10 : : #include "com/sun/star/lang/IllegalArgumentException.hpp"
11 : : #include "com/sun/star/connection/AlreadyAcceptingException.hpp"
12 : : #include "com/sun/star/connection/XConnection.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 : 2 : ::com::sun::star::uno::Type * operator()() const
26 : : {
27 [ + - ]: 2 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.XAcceptor") );
28 : :
29 : : // Start inline typedescription generation
30 : 2 : typelib_InterfaceTypeDescription * pTD = 0;
31 : :
32 : : typelib_TypeDescriptionReference * aSuperTypes[1];
33 [ + - ]: 2 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get().getTypeLibType();
34 : 2 : typelib_TypeDescriptionReference * pMembers[2] = { 0,0 };
35 [ + - ]: 2 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.XAcceptor::accept") );
36 : : typelib_typedescriptionreference_new( &pMembers[0],
37 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
38 : 2 : sMethodName0.pData );
39 [ + - ]: 2 : ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.XAcceptor::stopAccepting") );
40 : : typelib_typedescriptionreference_new( &pMembers[1],
41 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
42 : 2 : sMethodName1.pData );
43 : :
44 : : typelib_typedescription_newMIInterface(
45 : : &pTD,
46 : : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
47 : : 1, aSuperTypes,
48 : : 2,
49 : 2 : pMembers );
50 : :
51 : 2 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
52 : 2 : typelib_typedescriptionreference_release( pMembers[0] );
53 : 2 : typelib_typedescriptionreference_release( pMembers[1] );
54 : 2 : 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 : 2 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::connection::XAcceptor const *) {
65 : 2 : const ::com::sun::star::uno::Type &rRet = *detail::theXAcceptorType::get();
66 : : // End inline typedescription generation
67 : : static bool bInitStarted = false;
68 [ + - ]: 2 : if (!bInitStarted)
69 : : {
70 [ + - ][ + - ]: 2 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
71 [ + - ]: 2 : if (!bInitStarted)
72 : : {
73 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
74 : 2 : bInitStarted = true;
75 [ + - ]: 2 : ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
76 [ + - ]: 2 : ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::connection::XConnection > >::get();
77 [ + - ]: 2 : ::cppu::UnoType< ::com::sun::star::connection::AlreadyAcceptingException >::get();
78 [ + - ]: 2 : ::cppu::UnoType< ::com::sun::star::connection::ConnectionSetupException >::get();
79 [ + - ]: 2 : ::cppu::UnoType< ::com::sun::star::lang::IllegalArgumentException >::get();
80 : :
81 : 2 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
82 : : {
83 : : typelib_Parameter_Init aParameters[1];
84 [ + - ]: 2 : ::rtl::OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("sConnectionDescription") );
85 [ + - ]: 2 : ::rtl::OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("string") );
86 : 2 : aParameters[0].pParamName = sParamName0.pData;
87 : 2 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
88 : 2 : aParameters[0].pTypeName = sParamType0.pData;
89 : 2 : aParameters[0].bIn = sal_True;
90 : 2 : aParameters[0].bOut = sal_False;
91 [ + - ]: 2 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.AlreadyAcceptingException"));
92 [ + - ]: 2 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.ConnectionSetupException"));
93 [ + - ]: 2 : ::rtl::OUString the_ExceptionName2(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.IllegalArgumentException"));
94 [ + - ]: 2 : ::rtl::OUString the_ExceptionName3(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
95 : 2 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData, the_ExceptionName3.pData };
96 [ + - ]: 2 : ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.XConnection") );
97 [ + - ]: 2 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("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 : 2 : 4, the_Exceptions );
104 : 2 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
105 : : }
106 : : {
107 [ + - ]: 2 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
108 : 2 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
109 [ + - ]: 2 : ::rtl::OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("void") );
110 [ + - ]: 2 : ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("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 : 2 : 1, the_Exceptions );
117 : 2 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
118 : : }
119 : 2 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
120 [ + - ]: 2 : }
121 : : }
122 : : else
123 : : {
124 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
125 : : }
126 : 2 : return rRet;
127 : : }
128 : :
129 : : } } } }
130 : :
131 : 2 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< ::com::sun::star::connection::XAcceptor > const *) SAL_THROW(()) {
132 : 2 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::connection::XAcceptor > >::get();
133 : : }
134 : :
135 : 2 : ::com::sun::star::uno::Type const & ::com::sun::star::connection::XAcceptor::static_type(SAL_UNUSED_PARAMETER void *) {
136 : 2 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::connection::XAcceptor > * >(0));
137 : : }
138 : :
139 : : #endif // INCLUDED_COM_SUN_STAR_CONNECTION_XACCEPTOR_HPP
|