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