1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _CPPUHELPER_SERVICEFACTORY_HXX_ 28*cdf0e10cSrcweir #define _CPPUHELPER_SERVICEFACTORY_HXX_ 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <rtl/ustring.hxx> 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiComponentFactory.hpp> 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir namespace cppu 37*cdf0e10cSrcweir { 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir /** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir This bootstraps an initial service factory working on a registry. If the first or both 42*cdf0e10cSrcweir parameters contain a value then the service factory is initialized with a simple registry 43*cdf0e10cSrcweir or a nested registry. Otherwise the service factory must be initialized later with a valid 44*cdf0e10cSrcweir registry. 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir @param rWriteRegistryFile 47*cdf0e10cSrcweir file name of the simple registry or the first registry file of 48*cdf0e10cSrcweir the nested registry which will be opened with read/write rights. This 49*cdf0e10cSrcweir file will be created if necessary. 50*cdf0e10cSrcweir @param rReadRegistryFile 51*cdf0e10cSrcweir file name of the second registry file of the nested registry 52*cdf0e10cSrcweir which will be opened with readonly rights. 53*cdf0e10cSrcweir @param bReadOnly 54*cdf0e10cSrcweir flag which specify that the first registry file will be opened with 55*cdf0e10cSrcweir readonly rights. Default is FALSE. If this flag is used the registry 56*cdf0e10cSrcweir will not be created if not exist. 57*cdf0e10cSrcweir @param rBootstrapPath 58*cdf0e10cSrcweir specifies a path where the bootstrap components could be find. If this 59*cdf0e10cSrcweir parameter is an empty string the compoents will be searched in the system 60*cdf0e10cSrcweir path. 61*cdf0e10cSrcweir @deprecated 62*cdf0e10cSrcweir */ 63*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL 64*cdf0e10cSrcweir createRegistryServiceFactory( 65*cdf0e10cSrcweir const ::rtl::OUString & rWriteRegistryFile, 66*cdf0e10cSrcweir const ::rtl::OUString & rReadRegistryFile, 67*cdf0e10cSrcweir sal_Bool bReadOnly = sal_False, 68*cdf0e10cSrcweir const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) 69*cdf0e10cSrcweir SAL_THROW( (::com::sun::star::uno::Exception) ); 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir /** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir This bootstraps an initial service factory working on a registry file. 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir @param rRegistryFile 77*cdf0e10cSrcweir file name of the registry to use/ create; if this is an empty 78*cdf0e10cSrcweir string, the default registry is used instead 79*cdf0e10cSrcweir @param bReadOnly 80*cdf0e10cSrcweir flag which specify that the registry file will be opened with 81*cdf0e10cSrcweir readonly rights. Default is FALSE. If this flag is used the registry 82*cdf0e10cSrcweir will not be created if not exist. 83*cdf0e10cSrcweir @param rBootstrapPath 84*cdf0e10cSrcweir specifies a path where the bootstrap components could be find. If this 85*cdf0e10cSrcweir parameter is an empty string the compoents will be searched in the system 86*cdf0e10cSrcweir path. 87*cdf0e10cSrcweir @deprecated 88*cdf0e10cSrcweir */ 89*cdf0e10cSrcweir inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL 90*cdf0e10cSrcweir createRegistryServiceFactory( 91*cdf0e10cSrcweir const ::rtl::OUString & rRegistryFile, 92*cdf0e10cSrcweir sal_Bool bReadOnly = sal_False, 93*cdf0e10cSrcweir const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) 94*cdf0e10cSrcweir SAL_THROW( (::com::sun::star::uno::Exception) ) 95*cdf0e10cSrcweir { 96*cdf0e10cSrcweir return ::cppu::createRegistryServiceFactory( 97*cdf0e10cSrcweir rRegistryFile, ::rtl::OUString(), bReadOnly, rBootstrapPath ); 98*cdf0e10cSrcweir } 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir /** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir This bootstraps a service factory without initialize a registry. 103*cdf0e10cSrcweir 104*cdf0e10cSrcweir @param rBootstrapPath 105*cdf0e10cSrcweir specifies a path where the bootstrap components could be find. If this 106*cdf0e10cSrcweir parameter is an empty string the compoents will be searched in the system 107*cdf0e10cSrcweir path. 108*cdf0e10cSrcweir @deprecated 109*cdf0e10cSrcweir */ 110*cdf0e10cSrcweir inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL 111*cdf0e10cSrcweir createServiceFactory( 112*cdf0e10cSrcweir const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) 113*cdf0e10cSrcweir SAL_THROW( (::com::sun::star::uno::Exception) ) 114*cdf0e10cSrcweir { 115*cdf0e10cSrcweir return ::cppu::createRegistryServiceFactory( 116*cdf0e10cSrcweir ::rtl::OUString(), ::rtl::OUString(), sal_False, rBootstrapPath ); 117*cdf0e10cSrcweir } 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir } // end namespace cppu 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir #endif 122*cdf0e10cSrcweir 123