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