1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _UNOTOOLS_REGPATHHELPER_HXX_
29 #define _UNOTOOLS_REGPATHHELPER_HXX_
30 
31 #include <rtl/ustring.hxx>
32 
33 namespace utl
34 {
35 
36 /**
37  * This function returns a path to the user registry file.
38  * Search for the user registry using the following rules:
39  * <dl>
40  * <dt> 1. (for further use) search in sversion.ini (.sversionrc) for an entry
41  *		REGISTRY_VERSION_STRING (example: UserRegistry 5.0/505=test.rdb) in the section
42  *		[Registry]. If found, then take this value instead of the name "user.rdb".
43  * <dt> 2. Search in the config directory of the user for a file "user.rdb". If
44  *		found return the full path and name of the file. If not found, retry this
45  *		step with a dot before ".user.rdb".
46  * <dt> 3. If not found a new user registry with name "user.rdb" will be created in the user
47  *		config directory.
48  * </dl>
49  *<BR>
50  * @author Juergen Schmidt
51  */
52 ::rtl::OUString getPathToUserRegistry();
53 
54 /**
55  * This function returns a path to the system registry file.
56  * The system registry will always be searched in the same directory of the
57  * executable. The name of the system registry is "applicat.rdb". If the system
58  * registry was not found, then the environment variable STAR_REGISTRY will be checked.
59  * If this variable was set, it must contain a full path to a valid system registry.
60  * Search for the user registry using the following rules:
61  *
62  *<BR>
63  * @author Juergen Schmidt
64  */
65 
66 ::rtl::OUString getPathToSystemRegistry();
67 
68 }
69 
70 #endif
71 
72