1*b4a4f18cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*b4a4f18cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*b4a4f18cSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*b4a4f18cSAndrew Rist * distributed with this work for additional information
6*b4a4f18cSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*b4a4f18cSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*b4a4f18cSAndrew Rist * "License"); you may not use this file except in compliance
9*b4a4f18cSAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*b4a4f18cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*b4a4f18cSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*b4a4f18cSAndrew Rist * software distributed under the License is distributed on an
15*b4a4f18cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b4a4f18cSAndrew Rist * KIND, either express or implied. See the License for the
17*b4a4f18cSAndrew Rist * specific language governing permissions and limitations
18*b4a4f18cSAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*b4a4f18cSAndrew Rist *************************************************************/
21*b4a4f18cSAndrew Rist
22*b4a4f18cSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir #ifndef _CPPUHELPTER_FACTORY_
25cdf0e10cSrcweir #include <cppuhelper/factory.hxx>
26cdf0e10cSrcweir #endif
27cdf0e10cSrcweir #include <com/sun/star/lang/XSingleServiceFactory.hpp>
28cdf0e10cSrcweir
29cdf0e10cSrcweir #ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_
30cdf0e10cSrcweir #include <cppuhelper/implementationentry.hxx>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #include <debugservices/doctok/DocTokTestService.hxx>
33cdf0e10cSrcweir #include <debugservices/doctok/DocTokAnalyzeService.hxx>
34cdf0e10cSrcweir #include <debugservices/ooxml/OOXMLTestService.hxx>
35cdf0e10cSrcweir #include <debugservices/ooxml/OOXMLAnalyzeService.hxx>
36cdf0e10cSrcweir
37cdf0e10cSrcweir #include <stdio.h>
38cdf0e10cSrcweir
39cdf0e10cSrcweir using namespace com::sun::star;
40cdf0e10cSrcweir
41cdf0e10cSrcweir
42cdf0e10cSrcweir extern "C"
43cdf0e10cSrcweir {
44cdf0e10cSrcweir /* shared lib exports implemented with helpers */
45cdf0e10cSrcweir static struct ::cppu::ImplementationEntry s_component_entries [] =
46cdf0e10cSrcweir {//uno -l writerfilter.uno.dll -c debugservices.rtftok.ScannerTestService -- a b c
47cdf0e10cSrcweir DOCTOK_SCANNERTESTSERVICE_COMPONENT_ENTRY, /* debugservices.doctok.ScannerTestService */
48cdf0e10cSrcweir DOCTOK_ANALYZESERVICE_COMPONENT_ENTRY, /* debugservices.doctok.AnalyzeService */
49cdf0e10cSrcweir OOXML_SCANNERTESTSERVICE_COMPONENT_ENTRY, /* debugservices.ooxml.ScannerTestService */
50cdf0e10cSrcweir OOXML_ANALYZESERVICE_COMPONENT_ENTRY, /* debugservices.ooxml.AnalyzeService */
51cdf0e10cSrcweir { 0, 0, 0, 0, 0, 0 } // terminate with NULL
52cdf0e10cSrcweir };
53cdf0e10cSrcweir
54cdf0e10cSrcweir
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)55cdf0e10cSrcweir void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
56cdf0e10cSrcweir {
57cdf0e10cSrcweir *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
58cdf0e10cSrcweir }
59cdf0e10cSrcweir
component_getFactory(sal_Char const * implName,::com::sun::star::lang::XMultiServiceFactory * xMgr,::com::sun::star::registry::XRegistryKey * xRegistry)60cdf0e10cSrcweir void * SAL_CALL component_getFactory(sal_Char const * implName, ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry )
61cdf0e10cSrcweir {
62cdf0e10cSrcweir fprintf(stderr, "Loading service: %s: ", implName);
63cdf0e10cSrcweir
64cdf0e10cSrcweir void * pResult = ::cppu::component_getFactoryHelper(implName, xMgr, xRegistry, s_component_entries );
65cdf0e10cSrcweir
66cdf0e10cSrcweir fprintf(stderr, "%p\n", pResult);
67cdf0e10cSrcweir
68cdf0e10cSrcweir return pResult;
69cdf0e10cSrcweir }
70cdf0e10cSrcweir
71cdf0e10cSrcweir }
72