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