LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/connection - XConnection.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 92 92 100.0 %
Date: 2013-07-09 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_CONNECTION_XCONNECTION_HPP
       2             : #define INCLUDED_COM_SUN_STAR_CONNECTION_XCONNECTION_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/connection/XConnection.hdl"
       7             : 
       8             : #include "com/sun/star/io/IOException.hpp"
       9             : #include "com/sun/star/uno/RuntimeException.hpp"
      10             : #include "com/sun/star/uno/XInterface.hpp"
      11             : #include "com/sun/star/uno/Reference.hxx"
      12             : #include "com/sun/star/uno/Sequence.hxx"
      13             : #include "com/sun/star/uno/Type.hxx"
      14             : #include "cppu/unotype.hxx"
      15             : #include "osl/mutex.hxx"
      16             : #include "rtl/ustring.hxx"
      17             : #include "rtl/instance.hxx"
      18             : #include "sal/types.h"
      19             : 
      20             : namespace com { namespace sun { namespace star { namespace connection { namespace detail {
      21             : 
      22             : struct theXConnectionType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXConnectionType >
      23             : {
      24           1 :     ::com::sun::star::uno::Type * operator()() const
      25             :     {
      26           1 :         ::rtl::OUString sTypeName( "com.sun.star.connection.XConnection" );
      27             : 
      28             :         // Start inline typedescription generation
      29           1 :         typelib_InterfaceTypeDescription * pTD = 0;
      30             : 
      31             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      32           1 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
      33           1 :         typelib_TypeDescriptionReference * pMembers[5] = { 0,0,0,0,0 };
      34           2 :         ::rtl::OUString sMethodName0( "com.sun.star.connection.XConnection::read" );
      35             :         typelib_typedescriptionreference_new( &pMembers[0],
      36             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      37           1 :                                               sMethodName0.pData );
      38           2 :         ::rtl::OUString sMethodName1( "com.sun.star.connection.XConnection::write" );
      39             :         typelib_typedescriptionreference_new( &pMembers[1],
      40             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      41           1 :                                               sMethodName1.pData );
      42           2 :         ::rtl::OUString sMethodName2( "com.sun.star.connection.XConnection::flush" );
      43             :         typelib_typedescriptionreference_new( &pMembers[2],
      44             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      45           1 :                                               sMethodName2.pData );
      46           2 :         ::rtl::OUString sMethodName3( "com.sun.star.connection.XConnection::close" );
      47             :         typelib_typedescriptionreference_new( &pMembers[3],
      48             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      49           1 :                                               sMethodName3.pData );
      50           2 :         ::rtl::OUString sMethodName4( "com.sun.star.connection.XConnection::getDescription" );
      51             :         typelib_typedescriptionreference_new( &pMembers[4],
      52             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      53           1 :                                               sMethodName4.pData );
      54             : 
      55             :         typelib_typedescription_newMIInterface(
      56             :             &pTD,
      57             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      58             :             1, aSuperTypes,
      59             :             5,
      60           1 :             pMembers );
      61             : 
      62           1 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      63           1 :         typelib_typedescriptionreference_release( pMembers[0] );
      64           1 :         typelib_typedescriptionreference_release( pMembers[1] );
      65           1 :         typelib_typedescriptionreference_release( pMembers[2] );
      66           1 :         typelib_typedescriptionreference_release( pMembers[3] );
      67           1 :         typelib_typedescriptionreference_release( pMembers[4] );
      68           1 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      69             : 
      70           2 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      71             :     }
      72             : };
      73             : 
      74             : } } } } }
      75             : 
      76             : namespace com { namespace sun { namespace star { namespace connection {
      77             : 
      78           2 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::connection::XConnection const *) {
      79           2 :     const ::com::sun::star::uno::Type &rRet = *detail::theXConnectionType::get();
      80             :     // End inline typedescription generation
      81             :     static bool bInitStarted = false;
      82           2 :     if (!bInitStarted)
      83             :     {
      84           1 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      85           1 :         if (!bInitStarted)
      86             :         {
      87             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      88           1 :             bInitStarted = true;
      89           1 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      90           1 :             ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Int8 > >::get();
      91           1 :             ::cppu::UnoType< css::io::IOException >::get();
      92             : 
      93           1 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      94             :             {
      95             :                 typelib_Parameter_Init aParameters[2];
      96           1 :                 ::rtl::OUString sParamName0( "aReadBytes" );
      97           2 :                 ::rtl::OUString sParamType0( "[]byte" );
      98           1 :                 aParameters[0].pParamName = sParamName0.pData;
      99           1 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE;
     100           1 :                 aParameters[0].pTypeName = sParamType0.pData;
     101           1 :                 aParameters[0].bIn = sal_False;
     102           1 :                 aParameters[0].bOut = sal_True;
     103           2 :                 ::rtl::OUString sParamName1( "nBytesToRead" );
     104           2 :                 ::rtl::OUString sParamType1( "long" );
     105           1 :                 aParameters[1].pParamName = sParamName1.pData;
     106           1 :                 aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG;
     107           1 :                 aParameters[1].pTypeName = sParamType1.pData;
     108           1 :                 aParameters[1].bIn = sal_True;
     109           1 :                 aParameters[1].bOut = sal_False;
     110           2 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.io.IOException" );
     111           2 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
     112           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
     113           2 :                 ::rtl::OUString sReturnType0( "long" );
     114           2 :                 ::rtl::OUString sMethodName0( "com.sun.star.connection.XConnection::read" );
     115             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     116             :                     3, sal_False,
     117             :                     sMethodName0.pData,
     118             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_LONG, sReturnType0.pData,
     119             :                     2, aParameters,
     120           1 :                     2, the_Exceptions );
     121           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     122             :             }
     123             :             {
     124             :                 typelib_Parameter_Init aParameters[1];
     125           1 :                 ::rtl::OUString sParamName0( "aData" );
     126           2 :                 ::rtl::OUString sParamType0( "[]byte" );
     127           1 :                 aParameters[0].pParamName = sParamName0.pData;
     128           1 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE;
     129           1 :                 aParameters[0].pTypeName = sParamType0.pData;
     130           1 :                 aParameters[0].bIn = sal_True;
     131           1 :                 aParameters[0].bOut = sal_False;
     132           2 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.io.IOException" );
     133           2 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
     134           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
     135           2 :                 ::rtl::OUString sReturnType1( "void" );
     136           2 :                 ::rtl::OUString sMethodName1( "com.sun.star.connection.XConnection::write" );
     137             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     138             :                     4, sal_False,
     139             :                     sMethodName1.pData,
     140             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType1.pData,
     141             :                     1, aParameters,
     142           1 :                     2, the_Exceptions );
     143           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     144             :             }
     145             :             {
     146           1 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.io.IOException" );
     147           2 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
     148           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
     149           2 :                 ::rtl::OUString sReturnType2( "void" );
     150           2 :                 ::rtl::OUString sMethodName2( "com.sun.star.connection.XConnection::flush" );
     151             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     152             :                     5, sal_False,
     153             :                     sMethodName2.pData,
     154             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType2.pData,
     155             :                     0, 0,
     156           1 :                     2, the_Exceptions );
     157           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     158             :             }
     159             :             {
     160           1 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.io.IOException" );
     161           2 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.uno.RuntimeException" );
     162           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
     163           2 :                 ::rtl::OUString sReturnType3( "void" );
     164           2 :                 ::rtl::OUString sMethodName3( "com.sun.star.connection.XConnection::close" );
     165             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     166             :                     6, sal_False,
     167             :                     sMethodName3.pData,
     168             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType3.pData,
     169             :                     0, 0,
     170           1 :                     2, the_Exceptions );
     171           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     172             :             }
     173             :             {
     174           1 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
     175           1 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
     176           2 :                 ::rtl::OUString sReturnType4( "string" );
     177           2 :                 ::rtl::OUString sMethodName4( "com.sun.star.connection.XConnection::getDescription" );
     178             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     179             :                     7, sal_False,
     180             :                     sMethodName4.pData,
     181             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType4.pData,
     182             :                     0, 0,
     183           1 :                     1, the_Exceptions );
     184           2 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     185             :             }
     186           1 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     187           1 :         }
     188             :     }
     189             :     else
     190             :     {
     191             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     192             :     }
     193           2 :     return rRet;
     194             : }
     195             : 
     196             : } } } }
     197             : 
     198             : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::connection::XConnection > const *) SAL_THROW(()) {
     199             :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::connection::XConnection > >::get();
     200             : }
     201             : 
     202             : ::com::sun::star::uno::Type const & css::connection::XConnection::static_type(SAL_UNUSED_PARAMETER void *) {
     203             :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::connection::XConnection > * >(0));
     204             : }
     205             : 
     206             : #endif // INCLUDED_COM_SUN_STAR_CONNECTION_XCONNECTION_HPP

Generated by: LCOV version 1.10