1*2c696243SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2c696243SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2c696243SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2c696243SAndrew Rist  * distributed with this work for additional information
6*2c696243SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2c696243SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2c696243SAndrew Rist  * "License"); you may not use this file except in compliance
9*2c696243SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2c696243SAndrew Rist  *
11*2c696243SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2c696243SAndrew Rist  *
13*2c696243SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2c696243SAndrew Rist  * software distributed under the License is distributed on an
15*2c696243SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2c696243SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2c696243SAndrew Rist  * specific language governing permissions and limitations
18*2c696243SAndrew Rist  * under the License.
19*2c696243SAndrew Rist  *
20*2c696243SAndrew Rist  *************************************************************/
21*2c696243SAndrew Rist 
22*2c696243SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_scripting.hxx"
26cdf0e10cSrcweir #include "cppuhelper/implementationentry.hxx"
27cdf0e10cSrcweir #include "com/sun/star/lang/XMultiServiceFactory.hpp"
28cdf0e10cSrcweir #include "com/sun/star/registry/XRegistryKey.hpp"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir // =============================================================================
31cdf0e10cSrcweir // component exports
32cdf0e10cSrcweir // =============================================================================
33cdf0e10cSrcweir using namespace ::com::sun::star;
34cdf0e10cSrcweir using namespace ::com::sun::star::uno;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir namespace evtlstner
37cdf0e10cSrcweir {
38cdf0e10cSrcweir     // =============================================================================
39cdf0e10cSrcweir     // component operations
40cdf0e10cSrcweir     // =============================================================================
41cdf0e10cSrcweir 
42cdf0e10cSrcweir     uno::Reference< XInterface > SAL_CALL create(
43cdf0e10cSrcweir         Reference< XComponentContext > const & xContext )
44cdf0e10cSrcweir         SAL_THROW( () );
45cdf0e10cSrcweir 
46cdf0e10cSrcweir     // -----------------------------------------------------------------------------
47cdf0e10cSrcweir 
48cdf0e10cSrcweir     ::rtl::OUString SAL_CALL getImplementationName();
49cdf0e10cSrcweir 
50cdf0e10cSrcweir     Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames();
51cdf0e10cSrcweir 
52cdf0e10cSrcweir     Reference<XInterface> SAL_CALL create(
53cdf0e10cSrcweir         Sequence<Any> const &, Reference<XComponentContext> const & );
54cdf0e10cSrcweir } // end evtlstner
55cdf0e10cSrcweir 
56cdf0e10cSrcweir namespace ooevtdescgen
57cdf0e10cSrcweir {
58cdf0e10cSrcweir     // =============================================================================
59cdf0e10cSrcweir     // component operations
60cdf0e10cSrcweir     // =============================================================================
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     uno::Reference< XInterface > SAL_CALL create(
63cdf0e10cSrcweir         Reference< XComponentContext > const & xContext )
64cdf0e10cSrcweir         SAL_THROW( () );
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     // -----------------------------------------------------------------------------
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     ::rtl::OUString SAL_CALL getImplementationName();
69cdf0e10cSrcweir 
70cdf0e10cSrcweir     Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames();
71cdf0e10cSrcweir 
72cdf0e10cSrcweir     Reference<XInterface> SAL_CALL create(
73cdf0e10cSrcweir         Sequence<Any> const &, Reference<XComponentContext> const & );
74cdf0e10cSrcweir } // end ooevtdescgen
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     // =============================================================================
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     const ::cppu::ImplementationEntry s_component_entries [] =
81cdf0e10cSrcweir     {
82cdf0e10cSrcweir         {
83cdf0e10cSrcweir             ::evtlstner::create, ::evtlstner::getImplementationName,
84cdf0e10cSrcweir             ::evtlstner::getSupportedServiceNames,
85cdf0e10cSrcweir             ::cppu::createSingleComponentFactory,
86cdf0e10cSrcweir             0, 0
87cdf0e10cSrcweir         },
88cdf0e10cSrcweir         {
89cdf0e10cSrcweir             ::ooevtdescgen::create, ::ooevtdescgen::getImplementationName,
90cdf0e10cSrcweir             ::ooevtdescgen::getSupportedServiceNames,
91cdf0e10cSrcweir             ::cppu::createSingleComponentFactory,
92cdf0e10cSrcweir             0, 0
93cdf0e10cSrcweir         },
94cdf0e10cSrcweir         { 0, 0, 0, 0, 0, 0 }
95cdf0e10cSrcweir     };
96cdf0e10cSrcweir 
97cdf0e10cSrcweir extern "C"
98cdf0e10cSrcweir {
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)99cdf0e10cSrcweir     SAL_DLLPUBLIC_EXPORT  void SAL_CALL component_getImplementationEnvironment(
100cdf0e10cSrcweir         const sal_Char ** ppEnvTypeName, uno_Environment ** )
101cdf0e10cSrcweir     {
102cdf0e10cSrcweir         OSL_TRACE("In component_getImplementationEnv");
103cdf0e10cSrcweir         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
104cdf0e10cSrcweir     }
105cdf0e10cSrcweir 
component_getFactory(const sal_Char * pImplName,lang::XMultiServiceFactory * pServiceManager,registry::XRegistryKey * pRegistryKey)106cdf0e10cSrcweir     SAL_DLLPUBLIC_EXPORT  void * SAL_CALL component_getFactory(
107cdf0e10cSrcweir         const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
108cdf0e10cSrcweir         registry::XRegistryKey * pRegistryKey )
109cdf0e10cSrcweir     {
110cdf0e10cSrcweir         OSL_TRACE("In component_getFactory");
111cdf0e10cSrcweir         return ::cppu::component_getFactoryHelper(
112cdf0e10cSrcweir             pImplName, pServiceManager, pRegistryKey, s_component_entries );
113cdf0e10cSrcweir     }
114cdf0e10cSrcweir }
115