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 #ifndef _CPPUHELPER_SERVICEFACTORY_HXX_ 24 #define _CPPUHELPER_SERVICEFACTORY_HXX_ 25 26 #include <rtl/ustring.hxx> 27 28 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 29 #include <com/sun/star/lang/XMultiComponentFactory.hpp> 30 31 32 namespace cppu 33 { 34 35 /** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. 36 37 This bootstraps an initial service factory working on a registry. If the first or both 38 parameters contain a value then the service factory is initialized with a simple registry 39 or a nested registry. Otherwise the service factory must be initialized later with a valid 40 registry. 41 42 @param rWriteRegistryFile 43 file name of the simple registry or the first registry file of 44 the nested registry which will be opened with read/write rights. This 45 file will be created if necessary. 46 @param rReadRegistryFile 47 file name of the second registry file of the nested registry 48 which will be opened with readonly rights. 49 @param bReadOnly 50 flag which specify that the first registry file will be opened with 51 readonly rights. Default is FALSE. If this flag is used the registry 52 will not be created if not exist. 53 @param rBootstrapPath 54 specifies a path where the bootstrap components could be find. If this 55 parameter is an empty string the compoents will be searched in the system 56 path. 57 @deprecated 58 */ 59 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL 60 createRegistryServiceFactory( 61 const ::rtl::OUString & rWriteRegistryFile, 62 const ::rtl::OUString & rReadRegistryFile, 63 sal_Bool bReadOnly = sal_False, 64 const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) 65 SAL_THROW( (::com::sun::star::uno::Exception) ); 66 67 68 /** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. 69 70 This bootstraps an initial service factory working on a registry file. 71 72 @param rRegistryFile 73 file name of the registry to use/ create; if this is an empty 74 string, the default registry is used instead 75 @param bReadOnly 76 flag which specify that the registry file will be opened with 77 readonly rights. Default is FALSE. If this flag is used the registry 78 will not be created if not exist. 79 @param rBootstrapPath 80 specifies a path where the bootstrap components could be find. If this 81 parameter is an empty string the compoents will be searched in the system 82 path. 83 @deprecated 84 */ 85 inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL 86 createRegistryServiceFactory( 87 const ::rtl::OUString & rRegistryFile, 88 sal_Bool bReadOnly = sal_False, 89 const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) 90 SAL_THROW( (::com::sun::star::uno::Exception) ) 91 { 92 return ::cppu::createRegistryServiceFactory( 93 rRegistryFile, ::rtl::OUString(), bReadOnly, rBootstrapPath ); 94 } 95 96 /** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. 97 98 This bootstraps a service factory without initialize a registry. 99 100 @param rBootstrapPath 101 specifies a path where the bootstrap components could be find. If this 102 parameter is an empty string the compoents will be searched in the system 103 path. 104 @deprecated 105 */ 106 inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL 107 createServiceFactory( 108 const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) 109 SAL_THROW( (::com::sun::star::uno::Exception) ) 110 { 111 return ::cppu::createRegistryServiceFactory( 112 ::rtl::OUString(), ::rtl::OUString(), sal_False, rBootstrapPath ); 113 } 114 115 } // end namespace cppu 116 117 #endif 118 119