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