LibreOffice Module registry (master) 1
|
#include <regimpl.hxx>
Public Member Functions | |
ORegistry () | |
sal_uInt32 | acquire () |
sal_uInt32 | release () |
RegError | initRegistry (const OUString &name, RegAccessMode accessMode, bool bCreate=false) |
RegError | closeRegistry () |
RegError | destroyRegistry (const OUString &name) |
RegError | acquireKey (RegKeyHandle hKey) |
RegError | releaseKey (RegKeyHandle hKey) |
RegError | createKey (RegKeyHandle hKey, std::u16string_view keyName, RegKeyHandle *phNewKey) |
RegError | openKey (RegKeyHandle hKey, std::u16string_view keyName, RegKeyHandle *phOpenKey) |
RegError | closeKey (RegKeyHandle hKey) |
RegError | deleteKey (RegKeyHandle hKey, std::u16string_view keyName) |
RegError | dumpRegistry (RegKeyHandle hKey) const |
~ORegistry () | |
bool | isReadOnly () const |
bool | isOpen () const |
ORegKey * | getRootKey () |
const store::OStoreFile & | getStoreFile () const |
const OUString & | getName () const |
Private Types | |
typedef std::unordered_map< OUString, ORegKey * > | KeyMap |
Private Member Functions | |
RegError | eraseKey (ORegKey *pKey, std::u16string_view keyName) |
RegError | deleteSubkeysAndValues (ORegKey *pKey) |
RegError | dumpValue (const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const |
RegError | dumpKey (const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const |
Private Attributes | |
sal_uInt32 | m_refCount |
osl::Mutex | m_mutex |
bool | m_readOnly |
bool | m_isOpen |
OUString | m_name |
store::OStoreFile | m_file |
KeyMap | m_openKeyTable |
Static Private Attributes | |
static constexpr OUStringLiteral | ROOT { u"/" } |
Friends | |
class | ORegKey |
Definition at line 43 of file regimpl.hxx.
|
private |
Definition at line 110 of file regimpl.hxx.
ORegistry::ORegistry | ( | ) |
ORegistry::~ORegistry | ( | ) |
Definition at line 427 of file regimpl.cxx.
References store::OStoreFile::close(), store::OStoreFile::isValid(), m_file, m_openKeyTable, releaseKey(), and ROOT.
|
inline |
RegError ORegistry::acquireKey | ( | RegKeyHandle | hKey | ) |
Definition at line 575 of file regimpl.cxx.
References ORegKey::acquire(), INVALID_KEY, m_mutex, NO_ERROR, and REG_GUARD.
Referenced by acquireKey().
RegError ORegistry::closeKey | ( | RegKeyHandle | hKey | ) |
Definition at line 704 of file regimpl.cxx.
References store::OStoreFile::flush(), ORegKey::getName(), getRootKey(), ORegKey::isModified(), KEY_NOT_OPEN, m_file, m_mutex, m_openKeyTable, REG_GUARD, releaseKey(), and ORegKey::setModified().
Referenced by ORegKey::closeKey(), and closeSubKeys().
RegError ORegistry::closeRegistry | ( | ) |
Definition at line 500 of file regimpl.cxx.
References store::OStoreFile::close(), store::OStoreFile::isValid(), m_file, m_isOpen, m_mutex, m_openKeyTable, NO_ERROR, REG_GUARD, REGISTRY_NOT_EXISTS, releaseKey(), and ROOT.
Referenced by closeRegistry().
RegError ORegistry::createKey | ( | RegKeyHandle | hKey, |
std::u16string_view | keyName, | ||
RegKeyHandle * | phNewKey | ||
) |
Definition at line 602 of file regimpl.cxx.
References ORegKey::acquire(), store::OStoreDirectory::create(), CREATE_KEY_FAILED, ORegKey::getFullPath(), ORegKey::getStoreFile(), INVALID_KEYNAME, m_mutex, m_openKeyTable, nIndex, NO_ERROR, ORegKey, REG_GUARD, ROOT, and ORegKey::setDeleted().
Referenced by ORegKey::createKey().
RegError ORegistry::deleteKey | ( | RegKeyHandle | hKey, |
std::u16string_view | keyName | ||
) |
Definition at line 734 of file regimpl.cxx.
References eraseKey(), ORegKey::getFullPath(), INVALID_KEYNAME, m_mutex, m_openKeyTable, REG_GUARD, and ROOT.
Referenced by ORegKey::deleteKey().
Definition at line 812 of file regimpl.cxx.
References DELETE_VALUE_FAILED, eraseKey(), store::OStoreDirectory::first(), ORegKey::getName(), ORegKey::getStoreDir(), ORegKey::getStoreFile(), storeFindData::m_nAttrib, storeFindData::m_nLength, storeFindData::m_pszName, store::OStoreDirectory::next(), NO_ERROR, RegError, store::OStoreFile::remove(), ROOT, ORegKey::setModified(), STORE_ATTRIB_ISDIR, and store_E_None.
Referenced by eraseKey().
RegError ORegistry::destroyRegistry | ( | const OUString & | name | ) |
Definition at line 516 of file regimpl.cxx.
References store::OStoreFile::close(), DESTROY_REGISTRY_FAILED, isReadOnly(), store::OStoreFile::isValid(), m_file, m_isOpen, m_mutex, m_name, m_openKeyTable, m_refCount, name, NO_ERROR, ORegistry(), OUStringToOString(), READWRITE, REG_GUARD, REGISTRY_NOT_EXISTS, releaseKey(), and ROOT.
Referenced by destroyRegistry().
|
private |
Definition at line 1119 of file regimpl.cxx.
References store::OStoreDirectory::create(), dumpKey(), dumpValue(), store::OStoreDirectory::first(), i, INVALID_KEY, isReadOnly(), KEY_NOT_EXISTS, m_file, storeFindData::m_nAttrib, storeFindData::m_nLength, storeFindData::m_pszName, store::OStoreDirectory::next(), NO_ERROR, OUStringToOString(), RegError, ROOT, sName, STORE_ATTRIB_ISDIR, store_E_None, store_E_NotExists, and store_E_WrongFormat.
Referenced by dumpKey(), and dumpRegistry().
RegError ORegistry::dumpRegistry | ( | RegKeyHandle | hKey | ) | const |
Definition at line 855 of file regimpl.cxx.
References dumpKey(), dumpValue(), store::OStoreDirectory::first(), ORegKey::getName(), getName(), ORegKey::getStoreDir(), storeFindData::m_nAttrib, storeFindData::m_nLength, storeFindData::m_pszName, store::OStoreDirectory::next(), NO_ERROR, OUStringToOString(), RegError, sName, STORE_ATTRIB_ISDIR, and store_E_None.
Referenced by dumpRegistry().
|
private |
Definition at line 891 of file regimpl.cxx.
References aBuffer, BINARY, store::OStoreStream::create(), i, isReadOnly(), LONG, LONGLIST, m_file, NO_ERROR, NOT_DEFINED, store::OStoreStream::readAt(), readINT32(), readString(), readUINT32(), readUtf8(), RegValueType, ROOT, size, sName, STRING, STRINGLIST, type, UNICODE, value, VALUE_HEADEROFFSET, VALUE_HEADERSIZE, VALUE_NOT_EXISTS, and VALUE_TYPEOFFSET.
Referenced by dumpKey(), and dumpRegistry().
Definition at line 749 of file regimpl.cxx.
References ORegKey::closeKey(), DELETE_KEY_FAILED, deleteSubkeysAndValues(), ORegKey::getName(), ORegKey::getStoreFile(), INVALID_KEYNAME, store::OStoreFile::isValid(), NO_ERROR, ORegKey::openKey(), RegError, store::OStoreFile::remove(), ROOT, ORegKey::setDeleted(), and ORegKey::setModified().
Referenced by deleteKey(), and deleteSubkeysAndValues().
|
inline |
Definition at line 92 of file regimpl.hxx.
References m_name.
Referenced by dumpRegistry(), and getName().
ORegKey * ORegistry::getRootKey | ( | ) |
Definition at line 849 of file regimpl.cxx.
References m_openKeyTable, and ROOT.
Referenced by closeKey(), and openRootKey().
|
inline |
Definition at line 89 of file regimpl.hxx.
References m_file.
Referenced by ORegKey::getStoreFile(), and ORegKey::getValueInfo().
RegError ORegistry::initRegistry | ( | const OUString & | name, |
RegAccessMode | accessMode, | ||
bool | bCreate = false |
||
) |
Definition at line 437 of file regimpl.cxx.
References CANNOT_OPEN_FOR_READWRITE, store::OStoreFile::create(), store::OStoreDirectory::create(), store::OStoreFile::createInMemory(), INVALID_REGISTRY, m_file, m_isOpen, m_name, m_openKeyTable, m_readOnly, NO_ERROR, ORegKey, READONLY, RegError, REGISTRY_NOT_EXISTS, ROOT, store_E_LockingViolation, store_E_None, and store_E_NotExists.
Referenced by createRegistry(), openRegistry(), and reg_openRegistry().
|
inline |
Definition at line 84 of file regimpl.hxx.
References m_isOpen.
Referenced by closeRegistry(), destroyRegistry(), dumpRegistry(), getName(), and openRootKey().
|
inline |
Definition at line 81 of file regimpl.hxx.
References m_readOnly.
Referenced by destroyRegistry(), dumpKey(), dumpValue(), ORegKey::getLongListValue(), ORegKey::getStoreDir(), ORegKey::getStringListValue(), ORegKey::getUnicodeListValue(), ORegKey::getValue(), ORegKey::getValueInfo(), ORegKey::isReadOnly(), openKey(), ORegKey::setLongListValue(), ORegKey::setStringListValue(), ORegKey::setUnicodeListValue(), and ORegKey::setValue().
RegError ORegistry::openKey | ( | RegKeyHandle | hKey, |
std::u16string_view | keyName, | ||
RegKeyHandle * | phOpenKey | ||
) |
Definition at line 658 of file regimpl.cxx.
References create(), ORegKey::getFullPath(), ORegKey::getStoreFile(), i, INVALID_KEY, INVALID_KEYNAME, isReadOnly(), KEY_NOT_EXISTS, m_mutex, m_openKeyTable, n, NO_ERROR, ORegKey, p, REG_GUARD, ROOT, store_E_NotExists, and store_E_WrongFormat.
Referenced by ORegKey::openKey().
|
inline |
Definition at line 51 of file regimpl.hxx.
References m_refCount.
Referenced by closeRegistry(), and release().
RegError ORegistry::releaseKey | ( | RegKeyHandle | hKey | ) |
Definition at line 587 of file regimpl.cxx.
References ORegKey::getName(), INVALID_KEY, m_mutex, m_openKeyTable, NO_ERROR, REG_GUARD, and ORegKey::release().
Referenced by closeKey(), closeRegistry(), destroyRegistry(), ORegKey::releaseKey(), releaseKey(), and ~ORegistry().
|
friend |
Definition at line 95 of file regimpl.hxx.
Referenced by createKey(), initRegistry(), and openKey().
|
private |
Definition at line 117 of file regimpl.hxx.
Referenced by closeKey(), closeRegistry(), destroyRegistry(), dumpKey(), dumpValue(), getStoreFile(), initRegistry(), and ~ORegistry().
|
private |
Definition at line 115 of file regimpl.hxx.
Referenced by closeRegistry(), destroyRegistry(), initRegistry(), and isOpen().
|
private |
Definition at line 113 of file regimpl.hxx.
Referenced by acquireKey(), closeKey(), closeRegistry(), ORegKey::countSubKeys(), createKey(), deleteKey(), destroyRegistry(), ORegKey::getLongListValue(), ORegKey::getStringListValue(), ORegKey::getUnicodeListValue(), ORegKey::getValue(), ORegKey::getValueInfo(), openKey(), releaseKey(), ORegKey::setLongListValue(), ORegKey::setStringListValue(), ORegKey::setUnicodeListValue(), and ORegKey::setValue().
|
private |
Definition at line 116 of file regimpl.hxx.
Referenced by destroyRegistry(), getName(), and initRegistry().
|
private |
Definition at line 118 of file regimpl.hxx.
Referenced by closeKey(), closeRegistry(), createKey(), deleteKey(), destroyRegistry(), getRootKey(), initRegistry(), openKey(), releaseKey(), and ~ORegistry().
|
private |
Definition at line 114 of file regimpl.hxx.
Referenced by initRegistry(), and isReadOnly().
|
private |
Definition at line 112 of file regimpl.hxx.
Referenced by acquire(), destroyRegistry(), and release().
|
staticconstexprprivate |
Definition at line 120 of file regimpl.hxx.
Referenced by closeRegistry(), createKey(), deleteKey(), deleteSubkeysAndValues(), destroyRegistry(), dumpKey(), dumpValue(), eraseKey(), ORegKey::getKeyNames(), ORegKey::getLongListValue(), getRootKey(), ORegKey::getStoreDir(), ORegKey::getStringListValue(), ORegKey::getUnicodeListValue(), ORegKey::getValue(), ORegKey::getValueInfo(), initRegistry(), openKey(), ORegKey::setLongListValue(), ORegKey::setStringListValue(), ORegKey::setUnicodeListValue(), ORegKey::setValue(), and ~ORegistry().