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