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#ifndef __com_sun_star_registry_DefaultRegistry_idl__
28#define __com_sun_star_registry_DefaultRegistry_idl__
29
30#ifndef __com_sun_star_registry_XSimpleRegistry_idl__
31#include <com/sun/star/registry/XSimpleRegistry.idl>
32#endif
33
34
35//=============================================================================
36
37 module com {  module sun {  module star {  module registry {
38
39//=============================================================================
40
41// DocMerge from xml: service com::sun::star::registry::DefaultRegistry
42/** implicitly supports a local registry and a read-only
43	system registry for global information.
44	In the context of this service,
45	the functions <code>open</code>, <code>close</code>, and <code>destroy</code>
46	from <type>XSimpleRegistry</type> are not supported and throw an exception
47	if they are used.
48	<dl>
49	<dt>Functions of <type>XSimpleRegistry</type>:
50	<dl>
51	<dt>	<b>getURL</b>
52	</dt>
53	<dd> returns the name of the local registry.
54	</dd>
55	<dt>	<b>isValid</b>
56	</dt>
57	<dd> checks if the local registry is valid. If the interface is not <NULL/>
58	the local registry should always be valid.
59	</dd>
60	<dt>	<b>isReadOnly</b>  </dt>
61	<dd> checks if the local registry has write protection.
62	</dd>
63	<dt>	<b>mergeKey</b>
64	</dt>
65	<dd> merges all information from the specified registry in the local registry.
66	</dd>
67	<dt>	<b>getRootKey</b>
68	</dt>
69	<dd> returns a virtual rootkey of both registries.
70	</dd>
71	</dl>
72
73	<br>
74
75	</dt>
76	<dt>Functions of XRegistryKey:
77	<dl>
78	<dt> <b>openKey</b>
79	</dt>
80	<dd> returns a virtual key which is specified in the local or the sytem
81	registry.
82	</dd>
83	<dt> <b>deleteKey</b>
84	</dt>
85	<dd> deletes the key only if it is present in the local registry.
86	</dd>
87	<dt> <b>setLongValue, setAsciiValue, setStringValue, setBinaryValue</b>
88	</dt>
89	<dd> sets the value at the specified key in the local registry.
90	</dd>
91	<dt> <b>getLongValue, getAsciiValue, getStringValue, getBinaryValue</b>
92	</dt>
93	<dd> returns the value at the specified key in the local registry, or if
94	the value is not present in the local registry, it will return the value of the
95	system registry.
96	</dd>
97	<dt> <b>openKeys</b>
98	</dt>
99	<dd> returns a sequence of all subkeys in both registries.
100	</dd>
101	<dt> <b>getKeyNames</b>
102	</dt>
103	<dd> returns a sequence with the names of all subkeys in both registries.
104	</dd>
105	<dt>
106	<br>
107	<b>Note: all write functions only work on the local registry.</b>
108	</dt>
109	</dl>
110
111	<br>
112
113	</dt>
114	<dt>How to find the registries:
115	<dl>
116	<dt> search for the system registry:
117	</dt>
118	<dd> The system registry will always be searched in the same directory as the
119	executable. The name of the system registry is "applicat.rdb". If the system
120	registry was not found, then the environment variable STAR_REGISTRY will be checked.
121	If this variable was set, it must contain a full path to a valid system registry.
122	</dd>
123	<dt>	Search for the user registry using the following rules:
124	</dt>
125	<dd>
126	<dl>
127	<dt> 1. (for further use) search in sversion.ini (.sversionrc) for an entry
128	REGISTRY_VERSION_STRING (example: UserRegistry 5.0/505=test.rdb) in the section
129	[Registry]. If found, then take this value instead of "user.rdb" as "REGISTRY NAME".
130	</dt>
131	<dt> 2. Search in the config directory of the user for a file "REGISTRY NAME". If
132	found, return the full path and name of the file. If not found, retry this
133	step with a dot before "REGISTRY NAME".
134	</dt>
135	<dt> 3. If not found, a new user registry with name user.rdb will be created in the user
136	config directory.
137	</dt>
138	</dl>
139	</dd>
140	</dl>
141	</dt>
142	</dl>
143	<h4>Guarantees:</h4>
144
145	<ul>
146	<li>-thread safe</li>
147	</ul>
148 */
149published service DefaultRegistry
150{
151	// DocMerge: empty anyway
152	interface com::sun::star::registry::XSimpleRegistry;
153
154};
155
156//=============================================================================
157
158}; }; }; };
159
160/*=============================================================================
161
162=============================================================================*/
163#endif
164