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 .
20 #ifndef _REGISTRY_REGTYPE_H_
21 #define _REGISTRY_REGTYPE_H_
23 #include <sal/types.h>
25 /// defines the type of a registry handle used in the C API.
26 typedef void* RegHandle
;
28 /// defines the type of a registry key handle used in the C API.
29 typedef void* RegKeyHandle
;
31 /// defines the type of a registry key value handle used in the C API.
32 typedef void* RegValue
;
34 /** defines the open/access mode of the registry.
37 -REG_READONLY allows readonly access
38 -REG_READWRITE allows read and write access
40 typedef sal_uInt16 RegAccessMode
;
42 /// Flag to specify the open mode of a registry. This mode allows readonly access.
43 #define REG_READONLY 0x0001
44 /// Flag to specify the open mode of a registry. This mode allows read and write access.
45 #define REG_READWRITE 0x0002
47 /** defines the type of a registry key.
49 The registry differs between normal keys which can contain subkeys or
50 a value and link keys which navigate over the linktarget to an existing
51 other key (which are no longer supported).
55 /// represents a real key
57 /// represents a link (which is no longer supported)
61 /** defines the type of a key value.
63 A registry key can contain a value which has one of seven different types.
64 Three simple types (long, ascii and unicode string) and a list type of
65 these simple types. Furthermore a binary type which provides the possibilty
66 to define own data structures and store these types in the registry. The UNO
67 core reflection data is stored as a binary blob in the type registry.
71 /// The key has no value or the value type is unknown.
72 RG_VALUETYPE_NOT_DEFINED
,
73 /// The key has a value of type long
75 /// The key has a value of type ascii string
77 /// The key has a value of type unicode string
79 /// The key has a value of type binary
81 /// The key has a value of type long list
82 RG_VALUETYPE_LONGLIST
,
83 /// The key has a value of type ascii string list
84 RG_VALUETYPE_STRINGLIST
,
85 /// The key has a value of type unicode string list
86 RG_VALUETYPE_UNICODELIST
89 /// specifies the possible error codes which can occur using the registry API.
94 /// internal registry error.
97 /// registry is not open.
98 REG_REGISTRY_NOT_OPEN
,
99 /// registry does not exists.
100 REG_REGISTRY_NOT_EXISTS
,
101 /// registry is open with readonly access rights.
102 REG_REGISTRY_READONLY
,
103 /// destroy a registry failed. There are may be any open keys.
104 REG_DESTROY_REGISTRY_FAILED
,
105 /** registry cannot be opened with readwrite access because the registry is already
106 open with readwrite access anywhere.
108 REG_CANNOT_OPEN_FOR_READWRITE
,
109 /** registry is in an invalid state or the registry does not point to
110 a valid registry data file.
112 REG_INVALID_REGISTRY
,
114 /// the key or key handle points to an invalid key or closed key.
116 /// the specified keyname points to a nonexisting key.
118 /// the key with the specified keyname cannot be created.
119 REG_CREATE_KEY_FAILED
,
120 /// the specified key cannot be deleted. Maybe an open key handle exists to this key.
121 REG_DELETE_KEY_FAILED
,
122 /** the keyname is invalid. This error will return if the keyname
123 is NULL but should not be NULL in the context of a called function.
126 /// the key is not in a valid state.
129 /// the key has no value
130 REG_VALUE_NOT_EXISTS
,
131 /// setting the specified value of a key failed.
132 REG_SET_VALUE_FAILED
,
133 /// deleting of the key value failed.
134 REG_DELETE_VALUE_FAILED
,
135 /// the key has a invalid value or the value type is unknown.
138 /// merging a key, the value and all subkeys failed.
140 /** conflicts exists during the merge process of a key. This could happen if
141 the value of a key already exists and the merge process will replace it.
145 /** a recursion was detected resolving different link targets (no longer
148 REG_DETECT_RECURSION
,
149 /** the link is invalid and can not be resolved (now used by all
150 link-related operations, as links are no longer supported).
153 /// the specified linkname is not valid (no longer used).
154 REG_INVALID_LINKNAME
,
155 /// the linknane is not valid (no longer used).
156 REG_INVALID_LINKTARGET
,
157 /// the link target points to a nonexisting key (no longer used).
158 REG_LINKTARGET_NOT_EXIST
,
159 /// the reserved buffer for the resolved keyname is to small.
160 REG_BUFFERSIZE_TOSMALL
163 /// specify the calling convention for the registry API
164 #define REGISTRY_CALLTYPE SAL_CALL
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */