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 0 : ::com::sun::star::uno::Type * operator()() const
25 : {
26 0 : ::rtl::OUString sTypeName( "com.sun.star.bridge.XUnoUrlResolver" );
27 :
28 : // Start inline typedescription generation
29 0 : typelib_InterfaceTypeDescription * pTD = 0;
30 :
31 : typelib_TypeDescriptionReference * aSuperTypes[1];
32 0 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
33 0 : typelib_TypeDescriptionReference * pMembers[1] = { 0 };
34 0 : ::rtl::OUString sMethodName0( "com.sun.star.bridge.XUnoUrlResolver::resolve" );
35 : typelib_typedescriptionreference_new( &pMembers[0],
36 : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
37 0 : sMethodName0.pData );
38 :
39 : typelib_typedescription_newMIInterface(
40 : &pTD,
41 : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
42 : 1, aSuperTypes,
43 : 1,
44 0 : pMembers );
45 :
46 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
47 0 : typelib_typedescriptionreference_release( pMembers[0] );
48 0 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
49 :
50 0 : 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 0 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::bridge::XUnoUrlResolver const *) {
59 0 : const ::com::sun::star::uno::Type &rRet = *detail::theXUnoUrlResolverType::get();
60 : // End inline typedescription generation
61 : static bool bInitStarted = false;
62 0 : if (!bInitStarted)
63 : {
64 0 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
65 0 : if (!bInitStarted)
66 : {
67 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
68 0 : bInitStarted = true;
69 0 : ::cppu::UnoType< css::uno::RuntimeException >::get();
70 0 : ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get();
71 0 : ::cppu::UnoType< css::connection::NoConnectException >::get();
72 0 : ::cppu::UnoType< css::connection::ConnectionSetupException >::get();
73 0 : ::cppu::UnoType< css::lang::IllegalArgumentException >::get();
74 :
75 0 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
76 : {
77 : typelib_Parameter_Init aParameters[1];
78 0 : ::rtl::OUString sParamName0( "sUnoUrl" );
79 0 : ::rtl::OUString sParamType0( "string" );
80 0 : aParameters[0].pParamName = sParamName0.pData;
81 0 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
82 0 : aParameters[0].pTypeName = sParamType0.pData;
83 0 : aParameters[0].bIn = sal_True;
84 0 : aParameters[0].bOut = sal_False;
85 0 : ::rtl::OUString the_ExceptionName0( "com.sun.star.connection.NoConnectException" );
86 0 : ::rtl::OUString the_ExceptionName1( "com.sun.star.connection.ConnectionSetupException" );
87 0 : ::rtl::OUString the_ExceptionName2( "com.sun.star.lang.IllegalArgumentException" );
88 0 : ::rtl::OUString the_ExceptionName3( "com.sun.star.uno.RuntimeException" );
89 0 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData, the_ExceptionName3.pData };
90 0 : ::rtl::OUString sReturnType0( "com.sun.star.uno.XInterface" );
91 0 : ::rtl::OUString sMethodName0( "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 0 : 4, the_Exceptions );
98 0 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
99 : }
100 0 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
101 0 : }
102 : }
103 : else
104 : {
105 : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
106 : }
107 0 : return rRet;
108 : }
109 :
110 : } } } }
111 :
112 0 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::bridge::XUnoUrlResolver > const *) SAL_THROW(()) {
113 0 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::bridge::XUnoUrlResolver > >::get();
114 : }
115 :
116 0 : ::com::sun::star::uno::Type const & css::bridge::XUnoUrlResolver::static_type(SAL_UNUSED_PARAMETER void *) {
117 0 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::bridge::XUnoUrlResolver > * >(0));
118 : }
119 :
120 : #endif // INCLUDED_COM_SUN_STAR_BRIDGE_XUNOURLRESOLVER_HPP
|