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 #ifndef _CPPUHELPTER_FACTORY_
25 #include <cppuhelper/factory.hxx>
26 #endif
27 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
28
29 #ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_
30 #include <cppuhelper/implementationentry.hxx>
31 #endif
32 #include <debugservices/doctok/DocTokTestService.hxx>
33 #include <debugservices/doctok/DocTokAnalyzeService.hxx>
34 #include <debugservices/ooxml/OOXMLTestService.hxx>
35 #include <debugservices/ooxml/OOXMLAnalyzeService.hxx>
36
37 #include <stdio.h>
38
39 using namespace com::sun::star;
40
41
42 extern "C"
43 {
44 /* shared lib exports implemented with helpers */
45 static struct ::cppu::ImplementationEntry s_component_entries [] =
46 {//uno -l writerfilter.uno.dll -c debugservices.rtftok.ScannerTestService -- a b c
47 DOCTOK_SCANNERTESTSERVICE_COMPONENT_ENTRY, /* debugservices.doctok.ScannerTestService */
48 DOCTOK_ANALYZESERVICE_COMPONENT_ENTRY, /* debugservices.doctok.AnalyzeService */
49 OOXML_SCANNERTESTSERVICE_COMPONENT_ENTRY, /* debugservices.ooxml.ScannerTestService */
50 OOXML_ANALYZESERVICE_COMPONENT_ENTRY, /* debugservices.ooxml.AnalyzeService */
51 { 0, 0, 0, 0, 0, 0 } // terminate with NULL
52 };
53
54
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)55 void SAL_CALL component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
56 {
57 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
58 }
59
component_getFactory(sal_Char const * implName,::com::sun::star::lang::XMultiServiceFactory * xMgr,::com::sun::star::registry::XRegistryKey * xRegistry)60 void * SAL_CALL component_getFactory(sal_Char const * implName, ::com::sun::star::lang::XMultiServiceFactory * xMgr, ::com::sun::star::registry::XRegistryKey * xRegistry )
61 {
62 fprintf(stderr, "Loading service: %s: ", implName);
63
64 void * pResult = ::cppu::component_getFactoryHelper(implName, xMgr, xRegistry, s_component_entries );
65
66 fprintf(stderr, "%p\n", pResult);
67
68 return pResult;
69 }
70
71 }
72