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 #ifndef _UNOTOOLS_REGPATHHELPER_HXX_
25 #define _UNOTOOLS_REGPATHHELPER_HXX_
26 
27 #include <rtl/ustring.hxx>
28 
29 namespace utl
30 {
31 
32 /**
33  * This function returns a path to the user registry file.
34  * Search for the user registry using the following rules:
35  * <dl>
36  * <dt> 1. (for further use) search in sversion.ini (.sversionrc) for an entry
37  *		REGISTRY_VERSION_STRING (example: UserRegistry 5.0/505=test.rdb) in the section
38  *		[Registry]. If found, then take this value instead of the name "user.rdb".
39  * <dt> 2. Search in the config directory of the user for a file "user.rdb". If
40  *		found return the full path and name of the file. If not found, retry this
41  *		step with a dot before ".user.rdb".
42  * <dt> 3. If not found a new user registry with name "user.rdb" will be created in the user
43  *		config directory.
44  * </dl>
45  *<BR>
46  * @author Juergen Schmidt
47  */
48 ::rtl::OUString getPathToUserRegistry();
49 
50 /**
51  * This function returns a path to the system registry file.
52  * The system registry will always be searched in the same directory of the
53  * executable. The name of the system registry is "applicat.rdb". If the system
54  * registry was not found, then the environment variable STAR_REGISTRY will be checked.
55  * If this variable was set, it must contain a full path to a valid system registry.
56  * Search for the user registry using the following rules:
57  *
58  *<BR>
59  * @author Juergen Schmidt
60  */
61 
62 ::rtl::OUString getPathToSystemRegistry();
63 
64 }
65 
66 #endif
67 
68