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 727 : ::com::sun::star::uno::Type * operator()() const
24 : {
25 727 : ::rtl::OUString sTypeName( "com.sun.star.lang.XServiceInfo" );
26 :
27 : // Start inline typedescription generation
28 727 : typelib_InterfaceTypeDescription * pTD = 0;
29 :
30 : typelib_TypeDescriptionReference * aSuperTypes[1];
31 727 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
32 727 : typelib_TypeDescriptionReference * pMembers[3] = { 0,0,0 };
33 727 : ::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 727 : sMethodName0.pData );
37 727 : ::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 727 : sMethodName1.pData );
41 727 : ::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 727 : sMethodName2.pData );
45 :
46 : typelib_typedescription_newMIInterface(
47 : &pTD,
48 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
49 : 1, aSuperTypes,
50 : 3,
51 727 : pMembers );
52 :
53 727 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
54 727 : typelib_typedescriptionreference_release( pMembers[0] );
55 727 : typelib_typedescriptionreference_release( pMembers[1] );
56 727 : typelib_typedescriptionreference_release( pMembers[2] );
57 727 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
58 :
59 727 : 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 465245 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::lang::XServiceInfo const *) {
68 465245 : const ::com::sun::star::uno::Type &rRet = *detail::theXServiceInfoType::get();
69 : // End inline typedescription generation
70 : static bool bInitStarted = false;
71 465245 : if (!bInitStarted)
72 : {
73 727 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
74 727 : if (!bInitStarted)
75 : {
76 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
77 727 : bInitStarted = true;
78 727 : ::cppu::UnoType< css::uno::RuntimeException >::get();
79 727 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::rtl::OUString > >::get();
80 :
81 727 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
82 : {
83 727 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
84 727 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
85 727 : ::rtl::OUString sReturnType0( "string" );
86 727 : ::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 727 : 1, the_Exceptions );
93 727 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
94 : }
95 : {
96 : typelib_Parameter_Init aParameters[1];
97 727 : ::rtl::OUString sParamName0( "ServiceName" );
98 727 : ::rtl::OUString sParamType0( "string" );
99 727 : aParameters[0].pParamName = sParamName0.pData;
100 727 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
101 727 : aParameters[0].pTypeName = sParamType0.pData;
102 727 : aParameters[0].bIn = sal_True;
103 727 : aParameters[0].bOut = sal_False;
104 727 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
105 727 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
106 727 : ::rtl::OUString sReturnType1( "boolean" );
107 727 : ::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 727 : 1, the_Exceptions );
114 727 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
115 : }
116 : {
117 727 : ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
118 727 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
119 727 : ::rtl::OUString sReturnType2( "[]string" );
120 727 : ::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 727 : 1, the_Exceptions );
127 727 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
128 : }
129 727 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
130 727 : }
131 : }
132 : else
133 : {
134 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
135 : }
136 465245 : return rRet;
137 : }
138 :
139 : } } } }
140 :
141 464983 : 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 464983 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::lang::XServiceInfo > >::get();
143 : }
144 :
145 435632 : ::com::sun::star::uno::Type const & css::lang::XServiceInfo::static_type(SAL_UNUSED_PARAMETER void *) {
146 435632 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::lang::XServiceInfo > * >(0));
147 : }
148 :
149 : #endif // INCLUDED_COM_SUN_STAR_LANG_XSERVICEINFO_HPP
|