23#include <osl/diagnose.h>
58 rtl_uString_assign( pKeyName, pKey->
getName().pData );
62 rtl_uString_new(pKeyName);
83 return pKey->
createKey(OUString::unacquired(&keyName), phNewKey);
99 return pKey->
openKey(OUString::unacquired(&keyName), phOpenKey);
103 rtl_uString* keyName,
105 sal_uInt32* pnSubKeys)
107 *pphSubKeys =
nullptr;
117 return pKey->
openSubKeys(OUString::unacquired(&keyName), pphSubKeys, pnSubKeys);
123 if (phSubKeys ==
nullptr || nSubKeys == 0)
127 for (sal_uInt32
i = 0;
i < nSubKeys;
i++)
131 std::free(phSubKeys);
137 rtl_uString* keyName)
149 return pKey->
deleteKey(OUString::unacquired(&keyName));
162 rtl_uString* keyName,
165 sal_uInt32 valueSize)
177 OUString valueName(
"value");
185 _ret1 = pSubKey->
setValue(valueName, valueType,
pData, valueSize);
198 return pKey->
setValue(valueName, valueType,
pData, valueSize);
202 rtl_uString* keyName,
203 sal_Int32
const * pValueList,
216 OUString valueName(
"value");
241 rtl_uString* keyName,
255 OUString valueName(
"value");
280 rtl_uString* keyName,
294 OUString valueName(
"value");
319 rtl_uString* keyName,
321 sal_uInt32* pValueSize)
334 sal_uInt32 valueSize;
336 OUString valueName(
"value");
347 return RegError::INVALID_VALUE;
350 *pValueType = valueType;
351 *pValueSize = valueSize;
359 return RegError::INVALID_VALUE;
362 *pValueType = valueType;
363 *pValueSize = valueSize;
369 rtl_uString* keyName,
379 OUString valueName(
"value");
387 _ret1 = pSubKey->
getValue(valueName, pValue);
397 return pKey->
getValue(valueName, pValue);
401 rtl_uString* keyName,
402 sal_Int32** pValueList,
405 assert((pValueList !=
nullptr) && (pLen !=
nullptr) &&
"registry::getLongListValue(): invalid parameter");
406 *pValueList =
nullptr;
416 OUString valueName(
"value");
438 rtl_uString* keyName,
442 OSL_PRECOND((pValueList !=
nullptr) && (pLen !=
nullptr),
"registry::getStringListValue(): invalid parameter");
443 *pValueList =
nullptr;
453 OUString valueName(
"value");
475 rtl_uString* keyName,
479 assert((pValueList !=
nullptr) && (pLen !=
nullptr) &&
"registry::getUnicodeListValue(): invalid parameter");
480 *pValueList =
nullptr;
490 OUString valueName(
"value");
519 std::free(pValueList);
524 char** pVList =
static_cast<char**
>(pValueList);
525 for (sal_uInt32
i=0;
i < len;
i++)
527 std::free(pVList[
i]);
533 case RegValueType::UNICODELIST:
536 for (sal_uInt32
i=0;
i < len;
i++)
538 std::free(pVList[
i]);
545 return RegError::INVALID_VALUE;
548 pValueList =
nullptr;
553 rtl_uString* keyName,
555 rtl_uString** pResolvedName)
564 OUString resolvedName;
567 rtl_uString_assign(pResolvedName, resolvedName.pData);
572 rtl_uString* keyName,
573 rtl_uString*** pSubKeyNames,
574 sal_uInt32* pnSubKeys)
583 return pKey->
getKeyNames(OUString::unacquired(&keyName), pSubKeyNames, pnSubKeys);
589 for (sal_uInt32
i=0;
i < nKeys;
i++)
591 rtl_uString_release(pKeyNames[
i]);
594 std::free(pKeyNames);
600 rtl_uString* keyName,
606 return openKey(hKey, keyName, phOpenKey);
RegError createKey(std::u16string_view keyName, RegKeyHandle *phNewKey)
RegError setUnicodeListValue(std::u16string_view valueName, sal_Unicode **pValueList, sal_uInt32 len)
ORegistry * getRegistry() const
RegError getValueInfo(std::u16string_view valueName, RegValueType *pValueTye, sal_uInt32 *pValueSize) const
RegError getValue(std::u16string_view valueName, RegValue value) const
RegError setLongListValue(std::u16string_view valueName, sal_Int32 const *pValueList, sal_uInt32 len)
RegError releaseKey(RegKeyHandle hKey)
RegError getResolvedKeyName(std::u16string_view keyName, OUString &resolvedName) const
RegError getStringListValue(std::u16string_view valueName, char ***pValueList, sal_uInt32 *pLen) const
RegError getKeyNames(std::u16string_view keyName, rtl_uString ***pSubKeyNames, sal_uInt32 *pnSubKeys)
RegError getLongListValue(std::u16string_view valueName, sal_Int32 **pValueList, sal_uInt32 *pLen) const
RegError getUnicodeListValue(std::u16string_view valueName, sal_Unicode ***pValueList, sal_uInt32 *pLen) const
RegError setValue(std::u16string_view valueName, RegValueType vType, RegValue value, sal_uInt32 vSize)
RegError openKey(std::u16string_view keyName, RegKeyHandle *phOpenKey)
RegError deleteKey(std::u16string_view keyName)
RegError openSubKeys(std::u16string_view keyName, RegKeyHandle **phOpenSubKeys, sal_uInt32 *pnSubKeys)
RegError setStringListValue(std::u16string_view valueName, char **pValueList, sal_uInt32 len)
RegError closeKey(RegKeyHandle hKey)
const OUString & getName() const
RegError closeKey(RegKeyHandle hKey)
RegError acquireKey(RegKeyHandle hKey)
RegError releaseKey(RegKeyHandle hKey)
std::unique_ptr< sal_Int32[]> pData
RegError REGISTRY_CALLTYPE setUnicodeListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Unicode **pValueList, sal_uInt32 len)
RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Int32 const *pValueList, sal_uInt32 len)
RegError REGISTRY_CALLTYPE createKey(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phNewKey)
RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey, rtl_uString *keyName, char **pValueList, sal_uInt32 len)
void REGISTRY_CALLTYPE acquireKey(RegKeyHandle hKey)
RegError REGISTRY_CALLTYPE getValueInfo(RegKeyHandle hKey, rtl_uString *keyName, RegValueType *pValueType, sal_uInt32 *pValueSize)
RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey, rtl_uString *keyName, char ***pValueList, sal_uInt32 *pLen)
void REGISTRY_CALLTYPE releaseKey(RegKeyHandle hKey)
RegError REGISTRY_CALLTYPE getKeyNames(RegKeyHandle hKey, rtl_uString *keyName, rtl_uString ***pSubKeyNames, sal_uInt32 *pnSubKeys)
RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Int32 **pValueList, sal_uInt32 *pLen)
RegError REGISTRY_CALLTYPE getKeyName(RegKeyHandle hKey, rtl_uString **pKeyName)
RegError REGISTRY_CALLTYPE reg_openKey(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phOpenKey)
This function opens the specified key.
RegError REGISTRY_CALLTYPE deleteKey(RegKeyHandle hKey, rtl_uString *keyName)
RegError REGISTRY_CALLTYPE getResolvedKeyName(RegKeyHandle hKey, rtl_uString *keyName, SAL_UNUSED_PARAMETER sal_Bool, rtl_uString **pResolvedName)
RegError REGISTRY_CALLTYPE closeSubKeys(RegKeyHandle *phSubKeys, sal_uInt32 nSubKeys)
RegError REGISTRY_CALLTYPE freeKeyNames(rtl_uString **pKeyNames, sal_uInt32 nKeys)
RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType, RegValue pValueList, sal_uInt32 len)
sal_Bool REGISTRY_CALLTYPE isKeyReadOnly(RegKeyHandle hKey)
RegError REGISTRY_CALLTYPE openKey(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phOpenKey)
RegError REGISTRY_CALLTYPE openSubKeys(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle **pphSubKeys, sal_uInt32 *pnSubKeys)
RegError REGISTRY_CALLTYPE closeKey(RegKeyHandle hKey)
RegError REGISTRY_CALLTYPE getValue(RegKeyHandle hKey, rtl_uString *keyName, RegValue pValue)
RegError REGISTRY_CALLTYPE reg_closeKey(RegKeyHandle hKey)
This function closes the specified key.
RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Unicode ***pValueList, sal_uInt32 *pLen)
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
STRINGLIST
The key has a value of type ascii string list.
void * RegKeyHandle
defines the type of a registry key handle used in the C API.
INVALID_KEY
the key is not in a valid state.
REGISTRY_READONLY
registry is open with readonly access rights.
NOT_DEFINED
The key has no value or the value type is unknown.
enum SAL_DLLPUBLIC_RTTI RegValueType
defines the type of a key value.
void * RegValue
defines the type of a registry key value handle used in the C API.
#define REGISTRY_CALLTYPE
specify the calling convention for the registry API
LONGLIST
The key has a value of type long list.
enum SAL_DLLPUBLIC_RTTI RegError
specifies the possible error codes which can occur using the registry API.