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