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