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