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_io.hxx"
26
27 #include <osl/diagnose.h>
28 #include <cppuhelper/factory.hxx>
29 #include <cppuhelper/implementationentry.hxx>
30
31 #include <com/sun/star/registry/XRegistryKey.hpp>
32
33 using namespace ::rtl;
34 using namespace ::cppu;
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::lang;
37 using namespace ::com::sun::star::registry;
38
39 #include "factreg.hxx"
40
41 namespace io_stm
42 {
43 rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
44 }
45
46 using namespace io_stm;
47
48 static struct ImplementationEntry g_entries[] =
49 {
50 {
51 OPipeImpl_CreateInstance, OPipeImpl_getImplementationName ,
52 OPipeImpl_getSupportedServiceNames, createSingleComponentFactory ,
53 &g_moduleCount.modCnt , 0
54 },
55 {
56 OPumpImpl_CreateInstance, OPumpImpl_getImplementationName ,
57 OPumpImpl_getSupportedServiceNames, createSingleComponentFactory ,
58 &g_moduleCount.modCnt , 0
59 },
60 {
61 ODataInputStream_CreateInstance, ODataInputStream_getImplementationName,
62 ODataInputStream_getSupportedServiceNames, createSingleComponentFactory,
63 &g_moduleCount.modCnt, 0
64 },
65 {
66 ODataOutputStream_CreateInstance, ODataOutputStream_getImplementationName,
67 ODataOutputStream_getSupportedServiceNames, createSingleComponentFactory,
68 &g_moduleCount.modCnt, 0
69 },
70 {
71 OObjectInputStream_CreateInstance, OObjectInputStream_getImplementationName,
72 OObjectInputStream_getSupportedServiceNames, createSingleComponentFactory,
73 &g_moduleCount.modCnt, 0
74 },
75 {
76 OObjectOutputStream_CreateInstance, OObjectOutputStream_getImplementationName,
77 OObjectOutputStream_getSupportedServiceNames, createSingleComponentFactory,
78 &g_moduleCount.modCnt, 0
79 },
80 {
81 OMarkableInputStream_CreateInstance, OMarkableInputStream_getImplementationName,
82 OMarkableInputStream_getSupportedServiceNames, createSingleComponentFactory,
83 &g_moduleCount.modCnt, 0
84 },
85 {
86 OMarkableOutputStream_CreateInstance, OMarkableOutputStream_getImplementationName,
87 OMarkableOutputStream_getSupportedServiceNames, createSingleComponentFactory,
88 &g_moduleCount.modCnt, 0
89 },
90 { 0, 0, 0, 0, 0, 0 }
91
92 };
93
94 extern "C"
95 {
96
component_canUnload(TimeValue * pTime)97 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
98 {
99 return g_moduleCount.canUnload( &g_moduleCount , pTime );
100 }
101
102 //==================================================================================================
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)103 SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
104 const sal_Char ** ppEnvTypeName, uno_Environment ** )
105 {
106 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
107 }
108 //==================================================================================================
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void * pRegistryKey)109 SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
110 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
111 {
112 return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
113 }
114
115 }
116