Update ooo320-m1
[ooovba.git] / io / source / stm / factreg.cxx
blobb1d14cef6ae2afcfd7403aa91277fcc08b69f399
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: factreg.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_io.hxx"
34 #include <osl/diagnose.h>
35 #include <cppuhelper/factory.hxx>
36 #include <cppuhelper/implementationentry.hxx>
38 #include <com/sun/star/registry/XRegistryKey.hpp>
40 using namespace ::rtl;
41 using namespace ::cppu;
42 using namespace ::com::sun::star::uno;
43 using namespace ::com::sun::star::lang;
44 using namespace ::com::sun::star::registry;
46 #include "factreg.hxx"
48 namespace io_stm
50 rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
53 using namespace io_stm;
55 static struct ImplementationEntry g_entries[] =
58 OPipeImpl_CreateInstance, OPipeImpl_getImplementationName ,
59 OPipeImpl_getSupportedServiceNames, createSingleComponentFactory ,
60 &g_moduleCount.modCnt , 0
63 OPumpImpl_CreateInstance, OPumpImpl_getImplementationName ,
64 OPumpImpl_getSupportedServiceNames, createSingleComponentFactory ,
65 &g_moduleCount.modCnt , 0
68 ODataInputStream_CreateInstance, ODataInputStream_getImplementationName,
69 ODataInputStream_getSupportedServiceNames, createSingleComponentFactory,
70 &g_moduleCount.modCnt, 0
73 ODataOutputStream_CreateInstance, ODataOutputStream_getImplementationName,
74 ODataOutputStream_getSupportedServiceNames, createSingleComponentFactory,
75 &g_moduleCount.modCnt, 0
78 OObjectInputStream_CreateInstance, OObjectInputStream_getImplementationName,
79 OObjectInputStream_getSupportedServiceNames, createSingleComponentFactory,
80 &g_moduleCount.modCnt, 0
83 OObjectOutputStream_CreateInstance, OObjectOutputStream_getImplementationName,
84 OObjectOutputStream_getSupportedServiceNames, createSingleComponentFactory,
85 &g_moduleCount.modCnt, 0
88 OMarkableInputStream_CreateInstance, OMarkableInputStream_getImplementationName,
89 OMarkableInputStream_getSupportedServiceNames, createSingleComponentFactory,
90 &g_moduleCount.modCnt, 0
93 OMarkableOutputStream_CreateInstance, OMarkableOutputStream_getImplementationName,
94 OMarkableOutputStream_getSupportedServiceNames, createSingleComponentFactory,
95 &g_moduleCount.modCnt, 0
97 { 0, 0, 0, 0, 0, 0 }
101 extern "C"
104 sal_Bool SAL_CALL component_canUnload( TimeValue *pTime )
106 return g_moduleCount.canUnload( &g_moduleCount , pTime );
109 //==================================================================================================
110 void SAL_CALL component_getImplementationEnvironment(
111 const sal_Char ** ppEnvTypeName, uno_Environment ** )
113 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
115 //==================================================================================================
116 sal_Bool SAL_CALL component_writeInfo(
117 void * pServiceManager, void * pRegistryKey )
119 return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
121 //==================================================================================================
122 void * SAL_CALL component_getFactory(
123 const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
125 return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );