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_xmlscript.hxx"
26 
27 #ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
28 #include <cppuhelper/implementationentry.hxx>
29 #endif
30 
31 using namespace ::rtl;
32 using namespace ::com::sun::star::uno;
33 
34 
35 // =============================================================================
36 
37 namespace xmlscript
38 {
39     Sequence< OUString > SAL_CALL getSupportedServiceNames_DocumentHandlerImpl();
40     OUString SAL_CALL getImplementationName_DocumentHandlerImpl();
41     Reference< XInterface > SAL_CALL create_DocumentHandlerImpl(
42         Reference< XComponentContext > const & xContext )
43             SAL_THROW( (Exception) );
44 
45     Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLBasicExporter();
46     OUString SAL_CALL getImplementationName_XMLBasicExporter();
47     Reference< XInterface > SAL_CALL create_XMLBasicExporter(
48         Reference< XComponentContext > const & xContext )
49             SAL_THROW( (Exception) );
50 
51     Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLOasisBasicExporter();
52     OUString SAL_CALL getImplementationName_XMLOasisBasicExporter();
53     Reference< XInterface > SAL_CALL create_XMLOasisBasicExporter(
54         Reference< XComponentContext > const & xContext )
55             SAL_THROW( (Exception) );
56 
57     Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLBasicImporter();
58     OUString SAL_CALL getImplementationName_XMLBasicImporter();
59     Reference< XInterface > SAL_CALL create_XMLBasicImporter(
60         Reference< XComponentContext > const & xContext )
61             SAL_THROW( (Exception) );
62 
63     Sequence< OUString > SAL_CALL getSupportedServiceNames_XMLOasisBasicImporter();
64     OUString SAL_CALL getImplementationName_XMLOasisBasicImporter();
65     Reference< XInterface > SAL_CALL create_XMLOasisBasicImporter(
66         Reference< XComponentContext > const & xContext )
67             SAL_THROW( (Exception) );
68 
69     // -----------------------------------------------------------------------------
70 
71     static struct ::cppu::ImplementationEntry s_entries [] =
72     {
73         {
74             create_DocumentHandlerImpl, getImplementationName_DocumentHandlerImpl,
75             getSupportedServiceNames_DocumentHandlerImpl, ::cppu::createSingleComponentFactory,
76             0, 0
77         },
78         {
79             create_XMLBasicExporter, getImplementationName_XMLBasicExporter,
80             getSupportedServiceNames_XMLBasicExporter, ::cppu::createSingleComponentFactory,
81             0, 0
82         },
83         {
84             create_XMLOasisBasicExporter, getImplementationName_XMLOasisBasicExporter,
85             getSupportedServiceNames_XMLOasisBasicExporter, ::cppu::createSingleComponentFactory,
86             0, 0
87         },
88         {
89             create_XMLBasicImporter, getImplementationName_XMLBasicImporter,
90             getSupportedServiceNames_XMLBasicImporter, ::cppu::createSingleComponentFactory,
91             0, 0
92         },
93         {
94             create_XMLOasisBasicImporter, getImplementationName_XMLOasisBasicImporter,
95             getSupportedServiceNames_XMLOasisBasicImporter, ::cppu::createSingleComponentFactory,
96             0, 0
97         },
98         { 0, 0, 0, 0, 0, 0 }
99     };
100 }
101 
102 // =============================================================================
103 
104 extern "C"
105 {
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)106     void SAL_CALL component_getImplementationEnvironment(
107         const sal_Char ** ppEnvTypeName, uno_Environment ** )
108     {
109         *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
110     }
111 
112     // -----------------------------------------------------------------------------
113 
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)114     void * SAL_CALL component_getFactory(
115         const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
116     {
117         return ::cppu::component_getFactoryHelper(
118             pImplName, pServiceManager, pRegistryKey, ::xmlscript::s_entries );
119     }
120 }
121