LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/normal/com/sun/star/registry - XImplementationRegistration.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 120 120 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_REGISTRY_XIMPLEMENTATIONREGISTRATION_HPP
       2             : #define INCLUDED_COM_SUN_STAR_REGISTRY_XIMPLEMENTATIONREGISTRATION_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/registry/XImplementationRegistration.hdl"
       7             : 
       8             : #include "com/sun/star/registry/CannotRegisterImplementationException.hpp"
       9             : #include "com/sun/star/registry/XSimpleRegistry.hpp"
      10             : #include "com/sun/star/uno/RuntimeException.hpp"
      11             : #include "com/sun/star/uno/XInterface.hpp"
      12             : #include "com/sun/star/uno/Reference.hxx"
      13             : #include "com/sun/star/uno/Sequence.hxx"
      14             : #include "com/sun/star/uno/Type.hxx"
      15             : #include "cppu/unotype.hxx"
      16             : #include "osl/mutex.hxx"
      17             : #include "rtl/ustring.hxx"
      18             : #include "rtl/instance.hxx"
      19             : #include "sal/types.h"
      20             : 
      21             : namespace com { namespace sun { namespace star { namespace registry { namespace detail {
      22             : 
      23             : struct theXImplementationRegistrationType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXImplementationRegistrationType >
      24             : {
      25           1 :     ::com::sun::star::uno::Type * operator()() const
      26             :     {
      27           1 :         ::rtl::OUString sTypeName( "com.sun.star.registry.XImplementationRegistration" );
      28             : 
      29             :         // Start inline typedescription generation
      30           1 :         typelib_InterfaceTypeDescription * pTD = 0;
      31             : 
      32             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      33           1 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
      34           1 :         typelib_TypeDescriptionReference * pMembers[4] = { 0,0,0,0 };
      35           2 :         ::rtl::OUString sMethodName0( "com.sun.star.registry.XImplementationRegistration::registerImplementation" );
      36             :         typelib_typedescriptionreference_new( &pMembers[0],
      37             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      38           1 :                                               sMethodName0.pData );
      39           2 :         ::rtl::OUString sMethodName1( "com.sun.star.registry.XImplementationRegistration::revokeImplementation" );
      40             :         typelib_typedescriptionreference_new( &pMembers[1],
      41             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      42           1 :                                               sMethodName1.pData );
      43           2 :         ::rtl::OUString sMethodName2( "com.sun.star.registry.XImplementationRegistration::getImplementations" );
      44             :         typelib_typedescriptionreference_new( &pMembers[2],
      45             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      46           1 :                                               sMethodName2.pData );
      47           2 :         ::rtl::OUString sMethodName3( "com.sun.star.registry.XImplementationRegistration::checkInstantiation" );
      48             :         typelib_typedescriptionreference_new( &pMembers[3],
      49             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      50           1 :                                               sMethodName3.pData );
      51             : 
      52             :         typelib_typedescription_newMIInterface(
      53             :             &pTD,
      54             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      55             :             1, aSuperTypes,
      56             :             4,
      57           1 :             pMembers );
      58             : 
      59           1 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      60           1 :         typelib_typedescriptionreference_release( pMembers[0] );
      61           1 :         typelib_typedescriptionreference_release( pMembers[1] );
      62           1 :         typelib_typedescriptionreference_release( pMembers[2] );
      63           1 :         typelib_typedescriptionreference_release( pMembers[3] );
      64           1 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      65             : 
      66           2 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      67             :     }
      68             : };
      69             : 
      70             : } } } } }
      71             : 
      72             : namespace com { namespace sun { namespace star { namespace registry {
      73             : 
      74           2 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::registry::XImplementationRegistration const *) {
      75           2 :     const ::com::sun::star::uno::Type &rRet = *detail::theXImplementationRegistrationType::get();
      76             :     // End inline typedescription generation
      77             :     static bool bInitStarted = false;
      78           2 :     if (!bInitStarted)
      79             :     {
      80           1 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      81           1 :         if (!bInitStarted)
      82             :         {
      83             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      84           1 :             bInitStarted = true;
      85           1 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      86           1 :             ::cppu::UnoType< ::com::sun::star::uno::Reference< css::registry::XSimpleRegistry > >::get();
      87           1 :             ::cppu::UnoType< css::registry::CannotRegisterImplementationException >::get();
      88           1 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::rtl::OUString > >::get();
      89             : 
      90           1 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      91             :             {
      92             :                 typelib_Parameter_Init aParameters[3];
      93           1 :                 ::rtl::OUString sParamName0( "aImplementationLoader" );
      94           2 :                 ::rtl::OUString sParamType0( "string" );
      95           1 :                 aParameters[0].pParamName = sParamName0.pData;
      96           1 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
      97           1 :                 aParameters[0].pTypeName = sParamType0.pData;
      98           1 :                 aParameters[0].bIn = sal_True;
      99           1 :                 aParameters[0].bOut = sal_False;
     100           2 :                 ::rtl::OUString sParamName1( "aLocation" );
     101           2 :                 ::rtl::OUString sParamType1( "string" );
     102           1 :                 aParameters[1].pParamName = sParamName1.pData;
     103           1 :                 aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     104           1 :                 aParameters[1].pTypeName = sParamType1.pData;
     105           1 :                 aParameters[1].bIn = sal_True;
     106           1 :                 aParameters[1].bOut = sal_False;
     107           2 :                 ::rtl::OUString sParamName2( "xReg" );
     108           2 :                 ::rtl::OUString sParamType2( "com.sun.star.registry.XSimpleRegistry" );
     109           1 :                 aParameters[2].pParamName = sParamName2.pData;
     110           1 :                 aParameters[2].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE;
     111           1 :                 aParameters[2].pTypeName = sParamType2.pData;
     112           1 :                 aParameters[2].bIn = sal_True;
     113           1 :                 aParameters[2].bOut = sal_False;
     114           2 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.registry.CannotRegisterImplementationException" );
     115           2 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
     116           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
     117           2 :                 ::rtl::OUString sReturnType0( "void" );
     118           2 :                 ::rtl::OUString sMethodName0( "com.sun.star.registry.XImplementationRegistration::registerImplementation" );
     119             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     120             :                     3, sal_False,
     121             :                     sMethodName0.pData,
     122             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType0.pData,
     123             :                     3, aParameters,
     124           1 :                     2, the_Exceptions );
     125           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     126             :             }
     127             :             {
     128             :                 typelib_Parameter_Init aParameters[2];
     129           1 :                 ::rtl::OUString sParamName0( "aLocation" );
     130           2 :                 ::rtl::OUString sParamType0( "string" );
     131           1 :                 aParameters[0].pParamName = sParamName0.pData;
     132           1 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     133           1 :                 aParameters[0].pTypeName = sParamType0.pData;
     134           1 :                 aParameters[0].bIn = sal_True;
     135           1 :                 aParameters[0].bOut = sal_False;
     136           2 :                 ::rtl::OUString sParamName1( "xReg" );
     137           2 :                 ::rtl::OUString sParamType1( "com.sun.star.registry.XSimpleRegistry" );
     138           1 :                 aParameters[1].pParamName = sParamName1.pData;
     139           1 :                 aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE;
     140           1 :                 aParameters[1].pTypeName = sParamType1.pData;
     141           1 :                 aParameters[1].bIn = sal_True;
     142           1 :                 aParameters[1].bOut = sal_False;
     143           2 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     144           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     145           2 :                 ::rtl::OUString sReturnType1( "boolean" );
     146           2 :                 ::rtl::OUString sMethodName1( "com.sun.star.registry.XImplementationRegistration::revokeImplementation" );
     147             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     148             :                     4, sal_False,
     149             :                     sMethodName1.pData,
     150             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType1.pData,
     151             :                     2, aParameters,
     152           1 :                     1, the_Exceptions );
     153           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     154             :             }
     155             :             {
     156             :                 typelib_Parameter_Init aParameters[2];
     157           1 :                 ::rtl::OUString sParamName0( "aImplementationLoader" );
     158           2 :                 ::rtl::OUString sParamType0( "string" );
     159           1 :                 aParameters[0].pParamName = sParamName0.pData;
     160           1 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     161           1 :                 aParameters[0].pTypeName = sParamType0.pData;
     162           1 :                 aParameters[0].bIn = sal_True;
     163           1 :                 aParameters[0].bOut = sal_False;
     164           2 :                 ::rtl::OUString sParamName1( "aLocation" );
     165           2 :                 ::rtl::OUString sParamType1( "string" );
     166           1 :                 aParameters[1].pParamName = sParamName1.pData;
     167           1 :                 aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     168           1 :                 aParameters[1].pTypeName = sParamType1.pData;
     169           1 :                 aParameters[1].bIn = sal_True;
     170           1 :                 aParameters[1].bOut = sal_False;
     171           2 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     172           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     173           2 :                 ::rtl::OUString sReturnType2( "[]string" );
     174           2 :                 ::rtl::OUString sMethodName2( "com.sun.star.registry.XImplementationRegistration::getImplementations" );
     175             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     176             :                     5, sal_False,
     177             :                     sMethodName2.pData,
     178             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType2.pData,
     179             :                     2, aParameters,
     180           1 :                     1, the_Exceptions );
     181           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     182             :             }
     183             :             {
     184             :                 typelib_Parameter_Init aParameters[1];
     185           1 :                 ::rtl::OUString sParamName0( "implementationName" );
     186           2 :                 ::rtl::OUString sParamType0( "string" );
     187           1 :                 aParameters[0].pParamName = sParamName0.pData;
     188           1 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
     189           1 :                 aParameters[0].pTypeName = sParamType0.pData;
     190           1 :                 aParameters[0].bIn = sal_True;
     191           1 :                 aParameters[0].bOut = sal_False;
     192           2 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     193           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     194           2 :                 ::rtl::OUString sReturnType3( "[]string" );
     195           2 :                 ::rtl::OUString sMethodName3( "com.sun.star.registry.XImplementationRegistration::checkInstantiation" );
     196             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     197             :                     6, sal_False,
     198             :                     sMethodName3.pData,
     199             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType3.pData,
     200             :                     1, aParameters,
     201           1 :                     1, the_Exceptions );
     202           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     203             :             }
     204           1 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     205           1 :         }
     206             :     }
     207             :     else
     208             :     {
     209             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     210             :     }
     211           2 :     return rRet;
     212             : }
     213             : 
     214             : } } } }
     215             : 
     216           2 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::registry::XImplementationRegistration > const *) SAL_THROW(()) {
     217           2 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::registry::XImplementationRegistration > >::get();
     218             : }
     219             : 
     220           2 : ::com::sun::star::uno::Type const & css::registry::XImplementationRegistration::static_type(SAL_UNUSED_PARAMETER void *) {
     221           2 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::registry::XImplementationRegistration > * >(0));
     222             : }
     223             : 
     224             : #endif // INCLUDED_COM_SUN_STAR_REGISTRY_XIMPLEMENTATIONREGISTRATION_HPP

Generated by: LCOV version 1.10