update dev300-m58
[ooovba.git] / scripting / source / vbaevents / service.cxx
bloba5cfb49c90b529dfedf4d83fb11ccaac57be82ce
1 #include "cppuhelper/implementationentry.hxx"
2 #include "com/sun/star/lang/XMultiServiceFactory.hpp"
3 #include "com/sun/star/registry/XRegistryKey.hpp"
5 // =============================================================================
6 // component exports
7 // =============================================================================
8 using namespace ::com::sun::star;
9 using namespace ::com::sun::star::uno;
11 namespace evtlstner
13 // =============================================================================
14 // component operations
15 // =============================================================================
17 uno::Reference< XInterface > SAL_CALL create(
18 Reference< XComponentContext > const & xContext )
19 SAL_THROW( () );
21 // -----------------------------------------------------------------------------
23 ::rtl::OUString SAL_CALL getImplementationName();
25 Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames();
27 Reference<XInterface> SAL_CALL create(
28 Sequence<Any> const &, Reference<XComponentContext> const & );
29 } // end evtlstner
31 namespace ooevtdescgen
33 // =============================================================================
34 // component operations
35 // =============================================================================
37 uno::Reference< XInterface > SAL_CALL create(
38 Reference< XComponentContext > const & xContext )
39 SAL_THROW( () );
41 // -----------------------------------------------------------------------------
43 ::rtl::OUString SAL_CALL getImplementationName();
45 Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames();
47 Reference<XInterface> SAL_CALL create(
48 Sequence<Any> const &, Reference<XComponentContext> const & );
49 } // end ooevtdescgen
53 // =============================================================================
55 const ::cppu::ImplementationEntry s_component_entries [] =
58 ::evtlstner::create, ::evtlstner::getImplementationName,
59 ::evtlstner::getSupportedServiceNames,
60 ::cppu::createSingleComponentFactory,
61 0, 0
64 ::ooevtdescgen::create, ::ooevtdescgen::getImplementationName,
65 ::ooevtdescgen::getSupportedServiceNames,
66 ::cppu::createSingleComponentFactory,
67 0, 0
69 { 0, 0, 0, 0, 0, 0 }
72 extern "C"
74 void SAL_CALL component_getImplementationEnvironment(
75 const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
77 OSL_TRACE("In component_getImplementationEnv");
78 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
81 sal_Bool SAL_CALL component_writeInfo(
82 lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
84 OSL_TRACE("In component_writeInfo");
85 if ( ::cppu::component_writeInfoHelper(
86 pServiceManager, pRegistryKey, s_component_entries ) )
87 return sal_True;
88 return sal_False;
91 void * SAL_CALL component_getFactory(
92 const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
93 registry::XRegistryKey * pRegistryKey )
95 OSL_TRACE("In component_getFactory");
96 return ::cppu::component_getFactoryHelper(
97 pImplName, pServiceManager, pRegistryKey, s_component_entries );