1f9b72d11SAndrew Rist /**************************************************************
2f9b72d11SAndrew Rist *
3f9b72d11SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4f9b72d11SAndrew Rist * or more contributor license agreements. See the NOTICE file
5f9b72d11SAndrew Rist * distributed with this work for additional information
6f9b72d11SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7f9b72d11SAndrew Rist * to you under the Apache License, Version 2.0 (the
8f9b72d11SAndrew Rist * "License"); you may not use this file except in compliance
9f9b72d11SAndrew Rist * with the License. You may obtain a copy of the License at
10f9b72d11SAndrew Rist *
11f9b72d11SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12f9b72d11SAndrew Rist *
13f9b72d11SAndrew Rist * Unless required by applicable law or agreed to in writing,
14f9b72d11SAndrew Rist * software distributed under the License is distributed on an
15f9b72d11SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f9b72d11SAndrew Rist * KIND, either express or implied. See the License for the
17f9b72d11SAndrew Rist * specific language governing permissions and limitations
18f9b72d11SAndrew Rist * under the License.
19f9b72d11SAndrew Rist *
20f9b72d11SAndrew Rist *************************************************************/
21f9b72d11SAndrew Rist
22cdf0e10cSrcweir #include <cppuhelper/factory.hxx>
23cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
24cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
25*85ec52e3SDamjan Jovanovic #include <cppuhelper/implementationentry.hxx>
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include "../tools/fastserializer.hxx"
28cdf0e10cSrcweir #include "fastparser.hxx"
29cdf0e10cSrcweir
30cdf0e10cSrcweir using namespace sax_fastparser;
31cdf0e10cSrcweir using namespace ::cppu;
32cdf0e10cSrcweir using namespace ::com::sun::star::uno;
33cdf0e10cSrcweir using namespace ::com::sun::star::registry;
34cdf0e10cSrcweir using ::rtl::OUString;
35cdf0e10cSrcweir using namespace ::com::sun::star::lang;
36cdf0e10cSrcweir
37cdf0e10cSrcweir namespace sax_fastparser
38cdf0e10cSrcweir {
39cdf0e10cSrcweir
40cdf0e10cSrcweir //--------------------------------------
41cdf0e10cSrcweir // the extern interface
42cdf0e10cSrcweir //---------------------------------------
FastSaxParser_CreateInstance(const Reference<XComponentContext> &)43*85ec52e3SDamjan Jovanovic Reference< XInterface > SAL_CALL FastSaxParser_CreateInstance( const Reference< XComponentContext > & ) throw(Exception)
44cdf0e10cSrcweir {
45cdf0e10cSrcweir FastSaxParser *p = new FastSaxParser;
46cdf0e10cSrcweir return Reference< XInterface > ( (OWeakObject * ) p );
47cdf0e10cSrcweir }
48cdf0e10cSrcweir
FastSaxSerializer_CreateInstance(const Reference<XComponentContext> &)49*85ec52e3SDamjan Jovanovic Reference< XInterface > SAL_CALL FastSaxSerializer_CreateInstance( const Reference< XComponentContext > & ) throw(Exception)
50cdf0e10cSrcweir {
51cdf0e10cSrcweir FastSaxSerializer *p = new FastSaxSerializer;
52cdf0e10cSrcweir return Reference< XInterface > ( (OWeakObject * ) p );
53cdf0e10cSrcweir }
54*85ec52e3SDamjan Jovanovic
55*85ec52e3SDamjan Jovanovic struct ::cppu::ImplementationEntry g_component_entries[] =
56*85ec52e3SDamjan Jovanovic {
57*85ec52e3SDamjan Jovanovic {
58*85ec52e3SDamjan Jovanovic FastSaxParser_CreateInstance,
59*85ec52e3SDamjan Jovanovic FastSaxParser::getImplementationName_Static,
60*85ec52e3SDamjan Jovanovic FastSaxParser::getSupportedServiceNames_Static,
61*85ec52e3SDamjan Jovanovic ::cppu::createSingleComponentFactory,
62*85ec52e3SDamjan Jovanovic 0,
63*85ec52e3SDamjan Jovanovic 0
64*85ec52e3SDamjan Jovanovic },
65*85ec52e3SDamjan Jovanovic {
66*85ec52e3SDamjan Jovanovic FastSaxSerializer_CreateInstance,
67*85ec52e3SDamjan Jovanovic FastSaxSerializer::getImplementationName_Static,
68*85ec52e3SDamjan Jovanovic FastSaxSerializer::getSupportedServiceNames_Static,
69*85ec52e3SDamjan Jovanovic ::cppu::createSingleComponentFactory,
70*85ec52e3SDamjan Jovanovic 0,
71*85ec52e3SDamjan Jovanovic 0
72*85ec52e3SDamjan Jovanovic },
73*85ec52e3SDamjan Jovanovic { 0, 0, 0, 0, 0, 0 }
74*85ec52e3SDamjan Jovanovic };
75*85ec52e3SDamjan Jovanovic
76cdf0e10cSrcweir }
77cdf0e10cSrcweir
78cdf0e10cSrcweir extern "C"
79cdf0e10cSrcweir {
80cdf0e10cSrcweir
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)81b63233d8Sdamjan SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
82cdf0e10cSrcweir const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
83cdf0e10cSrcweir {
84cdf0e10cSrcweir *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
85cdf0e10cSrcweir }
86cdf0e10cSrcweir
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)87*85ec52e3SDamjan Jovanovic SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
88cdf0e10cSrcweir {
89*85ec52e3SDamjan Jovanovic return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, g_component_entries );
90cdf0e10cSrcweir }
91cdf0e10cSrcweir
92cdf0e10cSrcweir
93cdf0e10cSrcweir }
94