tdf#146173: combine non-BMP characters' surrogates correctly
[LibreOffice.git] / registry / source / keyimpl.hxx
blob1958a7b6247e3753d1d43d653f52e7a6d2f3711a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX
21 #define INCLUDED_REGISTRY_SOURCE_KEYIMPL_HXX
23 #include <sal/config.h>
25 #include <string_view>
27 #include "regimpl.hxx"
28 #include <rtl/ustring.hxx>
30 class ORegKey
32 public:
34 ORegKey(const OUString& keyName, ORegistry* pReg);
35 ~ORegKey();
37 void acquire()
38 { ++m_refCount; }
40 sal_uInt32 release()
41 { return --m_refCount; }
43 RegError releaseKey(RegKeyHandle hKey);
45 RegError createKey(std::u16string_view keyName, RegKeyHandle* phNewKey);
47 RegError openKey(std::u16string_view keyName, RegKeyHandle* phOpenKey);
49 RegError openSubKeys(std::u16string_view keyName,
50 RegKeyHandle** phOpenSubKeys,
51 sal_uInt32* pnSubKeys);
53 RegError getKeyNames(std::u16string_view keyName,
54 rtl_uString*** pSubKeyNames,
55 sal_uInt32* pnSubKeys);
57 RegError closeKey(RegKeyHandle hKey);
59 RegError deleteKey(std::u16string_view keyName);
61 RegError getValueInfo(std::u16string_view valueName,
62 RegValueType* pValueTye,
63 sal_uInt32* pValueSize) const;
65 RegError setValue(std::u16string_view valueName,
66 RegValueType vType,
67 RegValue value,
68 sal_uInt32 vSize);
70 RegError setLongListValue(std::u16string_view valueName,
71 sal_Int32 const * pValueList,
72 sal_uInt32 len);
74 RegError setStringListValue(std::u16string_view valueName,
75 char** pValueList,
76 sal_uInt32 len);
78 RegError setUnicodeListValue(std::u16string_view valueName,
79 sal_Unicode** pValueList,
80 sal_uInt32 len);
82 RegError getValue(std::u16string_view valueName, RegValue value) const;
84 RegError getLongListValue(std::u16string_view valueName,
85 sal_Int32** pValueList,
86 sal_uInt32* pLen) const;
88 RegError getStringListValue(std::u16string_view valueName,
89 char*** pValueList,
90 sal_uInt32* pLen) const;
92 RegError getUnicodeListValue(std::u16string_view valueName,
93 sal_Unicode*** pValueList,
94 sal_uInt32* pLen) const;
96 RegError getResolvedKeyName(std::u16string_view keyName,
97 OUString& resolvedName) const;
99 bool isDeleted() const
100 { return m_bDeleted; }
102 void setDeleted (bool bKeyDeleted)
103 { m_bDeleted = bKeyDeleted; }
105 bool isModified() const
106 { return m_bModified; }
108 void setModified (bool bModified = true)
109 { m_bModified = bModified; }
111 bool isReadOnly() const
112 { return m_pRegistry->isReadOnly(); }
114 sal_uInt32 countSubKeys();
116 ORegistry* getRegistry() const
117 { return m_pRegistry; }
119 const store::OStoreFile& getStoreFile() const
120 { return m_pRegistry->getStoreFile(); }
122 store::OStoreDirectory getStoreDir() const;
124 const OUString& getName() const
125 { return m_name; }
127 OUString getFullPath(std::u16string_view path) const;
129 private:
130 sal_uInt32 m_refCount;
131 OUString m_name;
132 bool m_bDeleted:1;
133 bool m_bModified:1;
134 ORegistry* m_pRegistry;
137 #endif
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */