LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/bootstrap/com/sun/star/lang - XServiceInfo.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 59 59 100.0 %
Date: 2012-12-17 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10