1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_registry_DefaultRegistry_idl__
20 #define __com_sun_star_registry_DefaultRegistry_idl__
22 #include
<com
/sun
/star
/registry
/XSimpleRegistry.idl
>
26 module com
{ module sun
{ module star
{ module registry
{
28 /** implicitly supports a local registry and a read-only
29 system registry for global information.
30 In the context of this service,
31 the functions <code>open</code>, <code>close</code>, and <code>destroy</code>
32 from XSimpleRegistry are not supported and throw an exception
35 Functions of XSimpleRegistry:
39 <dd> returns the name of the local registry.
43 <dd> checks if the local registry is valid. If the interface is not `NULL`
44 the local registry should always be valid.
46 <dt> <b>isReadOnly</b> </dt>
47 <dd> checks if the local registry has write protection.
51 <dd> merges all information from the specified registry in the local registry.
53 <dt> <b>getRootKey</b>
55 <dd> returns a virtual rootkey of both registries.
59 Functions of XRegistryKey:
63 <dd> returns a virtual key which is specified in the local or the system
68 <dd> deletes the key only if it is present in the local registry.
70 <dt> <b>setLongValue, setAsciiValue, setStringValue, setBinaryValue</b>
72 <dd> sets the value at the specified key in the local registry.
74 <dt> <b>getLongValue, getAsciiValue, getStringValue, getBinaryValue</b>
76 <dd> returns the value at the specified key in the local registry, or if
77 the value is not present in the local registry, it will return the value of the
82 <dd> returns a sequence of all subkeys in both registries.
84 <dt> <b>getKeyNames</b>
86 <dd> returns a sequence with the names of all subkeys in both registries.
89 <b>Note: all write functions only work on the local registry.</b>
93 How to find the registries:
95 <dt> search for the system registry:
97 <dd> The system registry will always be searched in the same directory as the
98 executable. The name of the system registry is "applicat.rdb". If the system
99 registry was not found, then the environment variable STAR_REGISTRY will be checked.
100 If this variable was set, it must contain a full path to a valid system registry.
102 <dt> Search for the user registry using the following rules:
106 <li> 1. (for further use) search in sversion.ini (.sversionrc) for an entry
107 REGISTRY_VERSION_STRING (example: UserRegistry 5.0/505=test.rdb) in the section
108 [Registry]. If found, then take this value instead of "user.rdb" as "REGISTRY NAME".
110 <li> 2. Search in the config directory of the user for a file "REGISTRY NAME". If
111 found, return the full path and name of the file. If not found, retry this
112 step with a dot before "REGISTRY NAME".
114 <li> 3. If not found, a new user registry with name user.rdb will be created in the user
123 <li>-thread safe</li>
126 published service DefaultRegistry
128 interface com
::sun
::star
::registry
::XSimpleRegistry
;
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */