Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_BRIDGE_XUNOURLRESOLVER_HPP
2 : : #define INCLUDED_COM_SUN_STAR_BRIDGE_XUNOURLRESOLVER_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/bridge/XUnoUrlResolver.hdl"
7 : :
8 : : #include "com/sun/star/uno/RuntimeException.hpp"
9 : : #include "com/sun/star/connection/ConnectionSetupException.hpp"
10 : : #include "com/sun/star/lang/IllegalArgumentException.hpp"
11 : : #include "com/sun/star/uno/XInterface.hpp"
12 : : #include "com/sun/star/connection/NoConnectException.hpp"
13 : : #include "com/sun/star/uno/Reference.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 : :
20 : : namespace com { namespace sun { namespace star { namespace bridge { namespace detail {
21 : :
22 : : struct theXUnoUrlResolverType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXUnoUrlResolverType >
23 : : {
24 : 8 : ::com::sun::star::uno::Type * operator()() const
25 : : {
26 [ + - ]: 8 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.XUnoUrlResolver") );
27 : :
28 : : // Start inline typedescription generation
29 : 8 : typelib_InterfaceTypeDescription * pTD = 0;
30 : :
31 : : typelib_TypeDescriptionReference * aSuperTypes[1];
32 [ + - ]: 8 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get().getTypeLibType();
33 : 8 : typelib_TypeDescriptionReference * pMembers[1] = { 0 };
34 [ + - ]: 8 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.XUnoUrlResolver::resolve") );
35 : : typelib_typedescriptionreference_new( &pMembers[0],
36 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
37 : 8 : sMethodName0.pData );
38 : :
39 : : typelib_typedescription_newMIInterface(
40 : : &pTD,
41 : : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
42 : : 1, aSuperTypes,
43 : : 1,
44 : 8 : pMembers );
45 : :
46 : 8 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
47 : 8 : typelib_typedescriptionreference_release( pMembers[0] );
48 : 8 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
49 : :
50 : 8 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
51 : : }
52 : : };
53 : :
54 : : } } } } }
55 : :
56 : : namespace com { namespace sun { namespace star { namespace bridge {
57 : :
58 : 8 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::bridge::XUnoUrlResolver const *) {
59 : 8 : const ::com::sun::star::uno::Type &rRet = *detail::theXUnoUrlResolverType::get();
60 : : // End inline typedescription generation
61 : : static bool bInitStarted = false;
62 [ + - ]: 8 : if (!bInitStarted)
63 : : {
64 [ + - ][ + - ]: 8 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
65 [ + - ]: 8 : if (!bInitStarted)
66 : : {
67 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
68 : 8 : bInitStarted = true;
69 [ + - ]: 8 : ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
70 [ + - ]: 8 : ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get();
71 : 8 : ::cppu::UnoType< ::com::sun::star::connection::NoConnectException >::get();
72 : 8 : ::cppu::UnoType< ::com::sun::star::connection::ConnectionSetupException >::get();
73 : 8 : ::cppu::UnoType< ::com::sun::star::lang::IllegalArgumentException >::get();
74 : :
75 : 8 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
76 : : {
77 : : typelib_Parameter_Init aParameters[1];
78 [ + - ]: 8 : ::rtl::OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("sUnoUrl") );
79 [ + - ]: 8 : ::rtl::OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("string") );
80 : 8 : aParameters[0].pParamName = sParamName0.pData;
81 : 8 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
82 : 8 : aParameters[0].pTypeName = sParamType0.pData;
83 : 8 : aParameters[0].bIn = sal_True;
84 : 8 : aParameters[0].bOut = sal_False;
85 [ + - ]: 8 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.NoConnectException"));
86 [ + - ]: 8 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.ConnectionSetupException"));
87 [ + - ]: 8 : ::rtl::OUString the_ExceptionName2(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.IllegalArgumentException"));
88 [ + - ]: 8 : ::rtl::OUString the_ExceptionName3(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
89 : 8 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData, the_ExceptionName3.pData };
90 [ + - ]: 8 : ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface") );
91 [ + - ]: 8 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.XUnoUrlResolver::resolve") );
92 : : typelib_typedescription_newInterfaceMethod( &pMethod,
93 : : 3, sal_False,
94 : : sMethodName0.pData,
95 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType0.pData,
96 : : 1, aParameters,
97 : 8 : 4, the_Exceptions );
98 : 8 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
99 : : }
100 : 8 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
101 [ + - ]: 8 : }
102 : : }
103 : : else
104 : : {
105 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
106 : : }
107 : 8 : return rRet;
108 : : }
109 : :
110 : : } } } }
111 : :
112 : 8 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< ::com::sun::star::bridge::XUnoUrlResolver > const *) SAL_THROW(()) {
113 : 8 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::bridge::XUnoUrlResolver > >::get();
114 : : }
115 : :
116 : 8 : ::com::sun::star::uno::Type const & ::com::sun::star::bridge::XUnoUrlResolver::static_type(SAL_UNUSED_PARAMETER void *) {
117 : 8 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::bridge::XUnoUrlResolver > * >(0));
118 : : }
119 : :
120 : : #endif // INCLUDED_COM_SUN_STAR_BRIDGE_XUNOURLRESOLVER_HPP
|