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#ifndef __com_sun_star_lang_XInitialization_idl__
34#include <com/sun/star/lang/XInitialization.idl>
35#endif
36
37
38//=============================================================================
39
40 module com {  module sun {  module star {  module registry {
41
42//=============================================================================
43
44// DocMerge from xml: service com::sun::star::registry::NestedRegistry
45/** supports a shared view on two different registries. The registry
46	files will be opened in two different modes, registry1 will be opened with read/write
47	rights and registry2 will be opened read-only.
48	In the context of this service, the functions <code>open</code>, <code>close</code>,
49	and <code>destroy</code> from <type>XSimpleRegistry</type> are not supported and
50	throw an exception if they are used.
51	<dl>
52	<dt>Functions of <type>XSimpleRegistry</type>:
53	<dl>
54	<dt>	<b>getURL</b>
55	</dt>
56	<dd> returns the name of registry1.
57
58	</dd>
59	<dt>	<b>isValid</b>
60	</dt>
61	<dd> checks if registry1 is valid. If the interface is not <NULL/>
62	then registry1 should always be valid.
63
64	</dd>
65	<dt>	<b>isReadOnly</b>
66	</dt>
67	<dd> checks if registry1 has write protection.
68	</dd>
69	<dt>	<b>mergeKey</b>
70	</dt>
71	<dd> merges all information from the specified registry in registry1.
72
73	</dd>
74	<dt>	<b>getRootKey</b>
75	</dt>
76	<dd> returns a virtual rootkey of both registries.
77	</dd>
78	</dl>
79
80	<br>
81
82	</dt>
83	<dt>Functions of <type>XRegistryKey</type>:
84	<dl>
85	<dt> <b>openKey</b>
86	</dt>
87	<dd> returns a virtual key which is specified in registy1 or registry2.
88
89	</dd>
90	<dt> <b>deleteKey</b>
91	</dt>
92	<dd> deletes the key only if it is present in registry1.
93
94	</dd>
95	<dt> <b>setLongValue, setAsciiValue, setStringValue, setBinaryValue</b>
96	</dt>
97	<dd> sets the value at the specified key in registry1.
98
99	</dd>
100	<dt> <b>getLongValue, getAsciiValue, getStringValue, getBinaryValue</b>
101	</dt>
102	<dd> returns the value at the specified key in registry1, or if
103	the value is not present in registry1, it will return the value of registry2.
104
105	</dd>
106	<dt> <b>openKeys</b>
107	</dt>
108	<dd> returns a sequence of all subkeys in both registries.
109
110	</dd>
111	<dt> <b>getKeyNames</b>
112	</dt>
113	<dd> returns a sequence with the names of all subkeys in both
114	registries.
115
116	</dd>
117	<dt>
118	<br>
119	<b>Note: all write functions only work on registry1.</b>
120	</dt>
121	</dl>
122	</dt>
123    </dl>
124	<br>
125	How to initialize the registries:<br>
126	Use a sequence of <type>XSimpleRegistry</type> with two elements. The first element must be
127	the registry which is opened with read/write rights and the second element must be
128	the read-only one.<br>
129	Two different ways are possible:<br>
130	<ul>
131	<li> use <method scope="com::sun::star::lang">XMultiServiceFactory::createInstanceWithArguments()</method> to
132    create an instance of this service where the value of the any parameter must be the sequence with
133    the two open registries.
134	<li> use the initialize function of the <type scope="com::sun::star::lang">XInitialization</type> interface where the value of the
135	any parameter must be the sequence with the two open registries.
136	</ul>
137    <br>
138
139
140	Guarantees:
141	<ul>
142	<li>-thread safe</li>
143	</ul>
144 */
145published service NestedRegistry
146{
147	// DocMerge: empty anyway
148	interface com::sun::star::registry::XSimpleRegistry;
149
150	// DocMerge: empty anyway
151	interface com::sun::star::lang::XInitialization;
152};
153
154//=============================================================================
155
156}; }; }; };
157
158/*=============================================================================
159
160=============================================================================*/
161#endif
162