LibreOffice Module registry (master)  1
regkey.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 
21 #include "regkey.hxx"
22 
23 #include <osl/diagnose.h>
24 #include "regimpl.hxx"
25 #include "keyimpl.hxx"
26 
27 
28 // acquireKey
29 
31 {
32  ORegKey* pKey = static_cast< ORegKey* >(hKey);
33  if (pKey != nullptr)
34  {
35  ORegistry* pReg = pKey->getRegistry();
36  (void) pReg->acquireKey(pKey);
37  }
38 }
39 
40 
41 // releaseKey
42 
44 {
45  ORegKey* pKey = static_cast< ORegKey* >(hKey);
46  if (pKey != nullptr)
47  {
48  ORegistry* pReg = pKey->getRegistry();
49  (void) pReg->releaseKey(pKey);
50  }
51 }
52 
53 
54 // isKeyReadOnly
55 
57 {
58  ORegKey* pKey = static_cast< ORegKey* >(hKey);
59  return pKey != nullptr && pKey->isReadOnly();
60 }
61 
62 
63 // getKeyName
64 
65 RegError REGISTRY_CALLTYPE getKeyName(RegKeyHandle hKey, rtl_uString** pKeyName)
66 {
67  ORegKey* pKey = static_cast< ORegKey* >(hKey);
68  if (pKey)
69  {
70  rtl_uString_assign( pKeyName, pKey->getName().pData );
71  return RegError::NO_ERROR;
72  } else
73  {
74  rtl_uString_new(pKeyName);
75  return RegError::INVALID_KEY;
76  }
77 }
78 
79 
80 // createKey
81 
83  rtl_uString* keyName,
84  RegKeyHandle* phNewKey)
85 {
86  *phNewKey = nullptr;
87 
88  ORegKey* pKey = static_cast< ORegKey* >(hKey);
89  if (!pKey)
90  return RegError::INVALID_KEY;
91 
92  if (pKey->isDeleted())
93  return RegError::INVALID_KEY;
94 
95  if (pKey->isReadOnly())
97 
98  return pKey->createKey(keyName, phNewKey);
99 }
100 
101 
102 // openKey
103 
105  rtl_uString* keyName,
106  RegKeyHandle* phOpenKey)
107 {
108  *phOpenKey = nullptr;
109 
110  ORegKey* pKey = static_cast< ORegKey* >(hKey);
111  if (!pKey)
112  return RegError::INVALID_KEY;
113 
114  if (pKey->isDeleted())
115  return RegError::INVALID_KEY;
116 
117  return pKey->openKey(keyName, phOpenKey);
118 }
119 
120 
121 // openSubKeys
122 
124  rtl_uString* keyName,
125  RegKeyHandle** pphSubKeys,
126  sal_uInt32* pnSubKeys)
127 {
128  *pphSubKeys = nullptr;
129  *pnSubKeys = 0;
130 
131  ORegKey* pKey = static_cast< ORegKey* >(hKey);
132  if (!pKey)
133  return RegError::INVALID_KEY;
134 
135  if (pKey->isDeleted())
136  return RegError::INVALID_KEY;
137 
138  return pKey->openSubKeys(keyName, pphSubKeys, pnSubKeys);
139 }
140 
141 
142 // closeSubKeys
143 
145  sal_uInt32 nSubKeys)
146 {
147  if (phSubKeys == nullptr || nSubKeys == 0)
148  return RegError::INVALID_KEY;
149 
150  ORegistry* pReg = static_cast<ORegKey*>(phSubKeys[0])->getRegistry();
151  for (sal_uInt32 i = 0; i < nSubKeys; i++)
152  {
153  (void) pReg->closeKey(phSubKeys[i]);
154  }
155  std::free(phSubKeys);
156 
157  return RegError::NO_ERROR;
158 }
159 
160 
161 // deleteKey
162 
164  rtl_uString* keyName)
165 {
166  ORegKey* pKey = static_cast< ORegKey* >(hKey);
167  if (!pKey)
168  return RegError::INVALID_KEY;
169 
170  if (pKey->isDeleted())
171  return RegError::INVALID_KEY;
172 
173  if (pKey->isReadOnly())
175 
176  return pKey->deleteKey(keyName);
177 }
178 
179 
180 // closeKey
181 
183 {
184  ORegKey* pKey = static_cast< ORegKey* >(hKey);
185  if (!pKey)
186  return RegError::INVALID_KEY;
187 
188  return pKey->closeKey(hKey);
189 }
190 
191 
192 // setValue
193 
195  rtl_uString* keyName,
196  RegValueType valueType,
197  RegValue pData,
198  sal_uInt32 valueSize)
199 {
200  ORegKey* pKey = static_cast< ORegKey* >(hKey);
201  if (!pKey)
202  return RegError::INVALID_KEY;
203 
204  if (pKey->isDeleted())
205  return RegError::INVALID_KEY;
206 
207  if (pKey->isReadOnly())
209 
210  OUString valueName("value");
211  if (keyName->length)
212  {
213  ORegKey* pSubKey = nullptr;
214  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
215  if (_ret1 != RegError::NO_ERROR)
216  return _ret1;
217 
218  _ret1 = pSubKey->setValue(valueName, valueType, pData, valueSize);
219  if (_ret1 != RegError::NO_ERROR)
220  {
221  RegError _ret2 = pKey->closeKey(pSubKey);
222  if (_ret2 != RegError::NO_ERROR)
223  return _ret2;
224  else
225  return _ret1;
226  }
227 
228  return pKey->closeKey(pSubKey);
229  }
230 
231  return pKey->setValue(valueName, valueType, pData, valueSize);
232 }
233 
234 
235 // setLongValueList
236 
238  rtl_uString* keyName,
239  sal_Int32 const * pValueList,
240  sal_uInt32 len)
241 {
242  ORegKey* pKey = static_cast< ORegKey* >(hKey);
243  if (!pKey)
244  return RegError::INVALID_KEY;
245 
246  if (pKey->isDeleted())
247  return RegError::INVALID_KEY;
248 
249  if (pKey->isReadOnly())
251 
252  OUString valueName("value");
253  if (keyName->length)
254  {
255  ORegKey* pSubKey = nullptr;
256  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
257  if (_ret1 != RegError::NO_ERROR)
258  return _ret1;
259 
260  _ret1 = pSubKey->setLongListValue(valueName, pValueList, len);
261  if (_ret1 != RegError::NO_ERROR)
262  {
263  RegError _ret2 = pKey->closeKey(pSubKey);
264  if (_ret2 != RegError::NO_ERROR)
265  return _ret2;
266  else
267  return _ret1;
268  }
269 
270  return pKey->closeKey(pSubKey);
271  }
272 
273  return pKey->setLongListValue(valueName, pValueList, len);
274 }
275 
276 
277 // setStringValueList
278 
280  rtl_uString* keyName,
281  char** pValueList,
282  sal_uInt32 len)
283 {
284  ORegKey* pKey = static_cast< ORegKey* >(hKey);
285  if (!pKey)
286  return RegError::INVALID_KEY;
287 
288  if (pKey->isDeleted())
289  return RegError::INVALID_KEY;
290 
291  if (pKey->isReadOnly())
293 
294  OUString valueName("value");
295  if (keyName->length)
296  {
297  ORegKey* pSubKey = nullptr;
298  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
299  if (_ret1 != RegError::NO_ERROR)
300  return _ret1;
301 
302  _ret1 = pSubKey->setStringListValue(valueName, pValueList, len);
303  if (_ret1 != RegError::NO_ERROR)
304  {
305  RegError _ret2 = pKey->closeKey(pSubKey);
306  if (_ret2 != RegError::NO_ERROR)
307  return _ret2;
308  else
309  return _ret1;
310  }
311 
312  return pKey->closeKey(pSubKey);
313  }
314 
315  return pKey->setStringListValue(valueName, pValueList, len);
316 }
317 
318 
319 // setUnicodeValueList
320 
322  rtl_uString* keyName,
323  sal_Unicode** pValueList,
324  sal_uInt32 len)
325 {
326  ORegKey* pKey = static_cast< ORegKey* >(hKey);
327  if (!pKey)
328  return RegError::INVALID_KEY;
329 
330  if (pKey->isDeleted())
331  return RegError::INVALID_KEY;
332 
333  if (pKey->isReadOnly())
335 
336  OUString valueName("value");
337  if (keyName->length)
338  {
339  ORegKey* pSubKey = nullptr;
340  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
341  if (_ret1 != RegError::NO_ERROR)
342  return _ret1;
343 
344  _ret1 = pSubKey->setUnicodeListValue(valueName, pValueList, len);
345  if (_ret1 != RegError::NO_ERROR)
346  {
347  RegError _ret2 = pKey->closeKey(pSubKey);
348  if (_ret2 != RegError::NO_ERROR)
349  return _ret2;
350  else
351  return _ret1;
352  }
353 
354  return pKey->closeKey(pSubKey);
355  }
356 
357  return pKey->setUnicodeListValue(valueName, pValueList, len);
358 }
359 
360 
361 // getValueInfo
362 
364  rtl_uString* keyName,
365  RegValueType* pValueType,
366  sal_uInt32* pValueSize)
367 {
368  *pValueType = RegValueType::NOT_DEFINED;
369  *pValueSize = 0;
370 
371  ORegKey* pKey = static_cast< ORegKey* >(hKey);
372  if (!pKey)
373  return RegError::INVALID_KEY;
374 
375  if (pKey->isDeleted())
376  return RegError::INVALID_KEY;
377 
378  RegValueType valueType;
379  sal_uInt32 valueSize;
380 
381  OUString valueName("value");
382  if (keyName->length)
383  {
384  ORegKey* pSubKey = nullptr;
385  RegError _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
386  if (_ret != RegError::NO_ERROR)
387  return _ret;
388 
389  if (pSubKey->getValueInfo(valueName, &valueType, &valueSize) != RegError::NO_ERROR)
390  {
391  (void) pKey->releaseKey(pSubKey);
393  }
394 
395  *pValueType = valueType;
396  *pValueSize = valueSize;
397 
398  return pKey->releaseKey(pSubKey);
399  }
400 
401 
402  if (pKey->getValueInfo(valueName, &valueType, &valueSize) != RegError::NO_ERROR)
403  {
405  }
406 
407  *pValueType = valueType;
408  *pValueSize = valueSize;
409 
410  return RegError::NO_ERROR;
411 }
412 
413 
414 // getValueInfo
415 
417  rtl_uString* keyName,
418  RegValue pValue)
419 {
420  ORegKey* pKey = static_cast< ORegKey* >(hKey);
421  if (!pKey)
422  return RegError::INVALID_KEY;
423 
424  if (pKey->isDeleted())
425  return RegError::INVALID_KEY;
426 
427  OUString valueName("value");
428  if (keyName->length)
429  {
430  ORegKey* pSubKey = nullptr;
431  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
432  if (_ret1 != RegError::NO_ERROR)
433  return _ret1;
434 
435  _ret1 = pSubKey->getValue(valueName, pValue);
436  if (_ret1 != RegError::NO_ERROR)
437  {
438  (void) pKey->releaseKey(pSubKey);
439  return _ret1;
440  }
441 
442  return pKey->releaseKey(pSubKey);
443  }
444 
445  return pKey->getValue(valueName, pValue);
446 }
447 
448 
449 // getLongValueList
450 
452  rtl_uString* keyName,
453  sal_Int32** pValueList,
454  sal_uInt32* pLen)
455 {
456  assert((pValueList != nullptr) && (pLen != nullptr) && "registry::getLongListValue(): invalid parameter");
457  *pValueList = nullptr;
458  *pLen = 0;
459 
460  ORegKey* pKey = static_cast< ORegKey* >(hKey);
461  if (!pKey)
462  return RegError::INVALID_KEY;
463 
464  if (pKey->isDeleted())
465  return RegError::INVALID_KEY;
466 
467  OUString valueName("value");
468  if (keyName->length)
469  {
470  ORegKey* pSubKey = nullptr;
471  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
472  if (_ret1 != RegError::NO_ERROR)
473  return _ret1;
474 
475  _ret1 = pSubKey->getLongListValue(valueName, pValueList, pLen);
476  if (_ret1 != RegError::NO_ERROR)
477  {
478  (void) pKey->releaseKey(pSubKey);
479  return _ret1;
480  }
481 
482  return pKey->releaseKey(pSubKey);
483  }
484 
485  return pKey->getLongListValue(valueName, pValueList, pLen);
486 }
487 
488 
489 // getStringValueList
490 
492  rtl_uString* keyName,
493  char*** pValueList,
494  sal_uInt32* pLen)
495 {
496  OSL_PRECOND((pValueList != nullptr) && (pLen != nullptr), "registry::getStringListValue(): invalid parameter");
497  *pValueList = nullptr;
498  *pLen = 0;
499 
500  ORegKey* pKey = static_cast< ORegKey* >(hKey);
501  if (!pKey)
502  return RegError::INVALID_KEY;
503 
504  if (pKey->isDeleted())
505  return RegError::INVALID_KEY;
506 
507  OUString valueName("value");
508  if (keyName->length)
509  {
510  ORegKey* pSubKey = nullptr;
511  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
512  if (_ret1 != RegError::NO_ERROR)
513  return _ret1;
514 
515  _ret1 = pSubKey->getStringListValue(valueName, pValueList, pLen);
516  if (_ret1 != RegError::NO_ERROR)
517  {
518  (void) pKey->releaseKey(pSubKey);
519  return _ret1;
520  }
521 
522  return pKey->releaseKey(pSubKey);
523  }
524 
525  return pKey->getStringListValue(valueName, pValueList, pLen);
526 }
527 
528 // getUnicodeListValue
530  rtl_uString* keyName,
531  sal_Unicode*** pValueList,
532  sal_uInt32* pLen)
533 {
534  assert((pValueList != nullptr) && (pLen != nullptr) && "registry::getUnicodeListValue(): invalid parameter");
535  *pValueList = nullptr;
536  *pLen = 0;
537 
538  ORegKey* pKey = static_cast< ORegKey* >(hKey);
539  if (!pKey)
540  return RegError::INVALID_KEY;
541 
542  if (pKey->isDeleted())
543  return RegError::INVALID_KEY;
544 
545  OUString valueName("value");
546  if (keyName->length)
547  {
548  ORegKey* pSubKey = nullptr;
549  RegError _ret1 = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pSubKey));
550  if (_ret1 != RegError::NO_ERROR)
551  return _ret1;
552 
553  _ret1 = pSubKey->getUnicodeListValue(valueName, pValueList, pLen);
554  if (_ret1 != RegError::NO_ERROR)
555  {
556  (void) pKey->releaseKey(pSubKey);
557  return _ret1;
558  }
559 
560  return pKey->releaseKey(pSubKey);
561  }
562 
563  return pKey->getUnicodeListValue(valueName, pValueList, pLen);
564 }
565 
566 
567 // freeValueList
568 
570  RegValue pValueList,
571  sal_uInt32 len)
572 {
573  switch (valueType)
574  {
576  {
577  std::free(pValueList);
578  }
579  break;
581  {
582  char** pVList = static_cast<char**>(pValueList);
583  for (sal_uInt32 i=0; i < len; i++)
584  {
585  std::free(pVList[i]);
586  }
587 
588  std::free(pVList);
589  }
590  break;
591  case RegValueType::UNICODELIST:
592  {
593  sal_Unicode** pVList = static_cast<sal_Unicode**>(pValueList);
594  for (sal_uInt32 i=0; i < len; i++)
595  {
596  std::free(pVList[i]);
597  }
598 
599  std::free(pVList);
600  }
601  break;
602  default:
604  }
605 
606  pValueList = nullptr;
607  return RegError::NO_ERROR;
608 }
609 
610 
611 // getName
612 
614  rtl_uString* keyName,
615  SAL_UNUSED_PARAMETER sal_Bool,
616  rtl_uString** pResolvedName)
617 {
618  ORegKey* pKey = static_cast< ORegKey* >(hKey);
619  if (!pKey)
620  return RegError::INVALID_KEY;
621 
622  if (pKey->isDeleted())
623  return RegError::INVALID_KEY;
624 
625  OUString resolvedName;
626  RegError _ret = pKey->getResolvedKeyName(keyName, resolvedName);
627  if (_ret == RegError::NO_ERROR)
628  rtl_uString_assign(pResolvedName, resolvedName.pData);
629  return _ret;
630 }
631 
632 
633 // getKeyNames
634 
636  rtl_uString* keyName,
637  rtl_uString*** pSubKeyNames,
638  sal_uInt32* pnSubKeys)
639 {
640  ORegKey* pKey = static_cast< ORegKey* >(hKey);
641  if (!pKey)
642  return RegError::INVALID_KEY;
643 
644  if (pKey->isDeleted())
645  return RegError::INVALID_KEY;
646 
647  return pKey->getKeyNames(keyName, pSubKeyNames, pnSubKeys);
648 }
649 
650 
651 // freeKeyNames
652 
653 RegError REGISTRY_CALLTYPE freeKeyNames(rtl_uString** pKeyNames,
654  sal_uInt32 nKeys)
655 {
656  for (sal_uInt32 i=0; i < nKeys; i++)
657  {
658  rtl_uString_release(pKeyNames[i]);
659  }
660 
661  std::free(pKeyNames);
662 
663  return RegError::NO_ERROR;
664 }
665 
666 
667 // C API
668 
669 
670 // reg_openKey
671 
673  rtl_uString* keyName,
674  RegKeyHandle* phOpenKey)
675 {
676  if (!hKey)
677  return RegError::INVALID_KEY;
678 
679  return openKey(hKey, keyName, phOpenKey);
680 }
681 
682 
683 // reg_closeKey
684 
686 {
687  if (!hKey)
688  return RegError::INVALID_KEY;
689 
690  return closeKey(hKey);
691 }
692 
693 
694 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
Definition: regkey.cxx:194
const OUString & getName() const
Definition: keyimpl.hxx:120
RegError setUnicodeListValue(const OUString &valueName, sal_Unicode **pValueList, sal_uInt32 len)
Definition: keyimpl.cxx:465
RegError setValue(const OUString &valueName, RegValueType vType, RegValue value, sal_uInt32 vSize)
Definition: keyimpl.cxx:275
STRINGLIST
The key has a value of type ascii string list.
Definition: regtype.h:62
NO_ERROR
no error.
Definition: regtype.h:83
RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey, rtl_uString *keyName, char ***pValueList, sal_uInt32 *pLen)
Definition: regkey.cxx:491
sal_Bool REGISTRY_CALLTYPE isKeyReadOnly(RegKeyHandle hKey)
Definition: regkey.cxx:56
RegError openSubKeys(const OUString &keyName, RegKeyHandle **phOpenSubKeys, sal_uInt32 *pnSubKeys)
Definition: keyimpl.cxx:84
RegError acquireKey(RegKeyHandle hKey)
Definition: regimpl.cxx:577
RegError getResolvedKeyName(const OUString &keyName, OUString &resolvedName) const
Definition: keyimpl.cxx:909
RegError deleteKey(const OUString &keyName)
Definition: keyimpl.cxx:212
LONGLIST
The key has a value of type long list.
Definition: regtype.h:62
RegError REGISTRY_CALLTYPE closeKey(RegKeyHandle hKey)
Definition: regkey.cxx:182
RegError releaseKey(RegKeyHandle hKey)
Definition: keyimpl.cxx:60
RegError REGISTRY_CALLTYPE getUnicodeListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Unicode ***pValueList, sal_uInt32 *pLen)
Definition: regkey.cxx:529
NOT_DEFINED
The key has no value or the value type is unknown.
Definition: regtype.h:62
bool isDeleted() const
Definition: keyimpl.hxx:95
RegError REGISTRY_CALLTYPE getValue(RegKeyHandle hKey, rtl_uString *keyName, RegValue pValue)
Definition: regkey.cxx:416
RegError REGISTRY_CALLTYPE getResolvedKeyName(RegKeyHandle hKey, rtl_uString *keyName, SAL_UNUSED_PARAMETER sal_Bool, rtl_uString **pResolvedName)
Definition: regkey.cxx:613
sal_uInt16 sal_Unicode
RegError REGISTRY_CALLTYPE reg_closeKey(RegKeyHandle hKey)
This function closes the specified key.
Definition: regkey.cxx:685
RegError REGISTRY_CALLTYPE setUnicodeListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Unicode **pValueList, sal_uInt32 len)
Definition: regkey.cxx:321
enum SAL_DLLPUBLIC_RTTI RegError
specifies the possible error codes which can occur using the registry API.
Definition: regtype.h:80
RegError REGISTRY_CALLTYPE openKey(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phOpenKey)
Definition: regkey.cxx:104
RegError closeKey(RegKeyHandle hKey)
Definition: keyimpl.cxx:204
enum SAL_DLLPUBLIC_RTTI RegValueType
defines the type of a key value.
Definition: regtype.h:59
RegError getKeyNames(const OUString &keyName, rtl_uString ***pSubKeyNames, sal_uInt32 *pnSubKeys)
Definition: keyimpl.cxx:145
bool isReadOnly() const
Definition: keyimpl.hxx:107
int i
RegError REGISTRY_CALLTYPE closeSubKeys(RegKeyHandle *phSubKeys, sal_uInt32 nSubKeys)
Definition: regkey.cxx:144
RegError setStringListValue(const OUString &valueName, char **pValueList, sal_uInt32 len)
Definition: keyimpl.cxx:401
RegError getValue(const OUString &valueName, RegValue value) const
Definition: keyimpl.cxx:529
RegError createKey(const OUString &keyName, RegKeyHandle *phNewKey)
Definition: keyimpl.cxx:68
unsigned char sal_Bool
void REGISTRY_CALLTYPE acquireKey(RegKeyHandle hKey)
Definition: regkey.cxx:30
RegError getUnicodeListValue(const OUString &valueName, sal_Unicode ***pValueList, sal_uInt32 *pLen) const
Definition: keyimpl.cxx:814
RegError getValueInfo(const OUString &valueName, RegValueType *pValueTye, sal_uInt32 *pValueSize) const
Definition: keyimpl.cxx:220
RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey, rtl_uString *keyName, char **pValueList, sal_uInt32 len)
Definition: regkey.cxx:279
RegError REGISTRY_CALLTYPE reg_openKey(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phOpenKey)
This function opens the specified key.
Definition: regkey.cxx:672
RegError REGISTRY_CALLTYPE deleteKey(RegKeyHandle hKey, rtl_uString *keyName)
Definition: regkey.cxx:163
RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType, RegValue pValueList, sal_uInt32 len)
Definition: regkey.cxx:569
RegError getLongListValue(const OUString &valueName, sal_Int32 **pValueList, sal_uInt32 *pLen) const
Definition: keyimpl.cxx:614
RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Int32 const *pValueList, sal_uInt32 len)
Definition: regkey.cxx:237
INVALID_VALUE
the key has an invalid value or the value type is unknown.
Definition: regtype.h:83
INVALID_KEY
the key is not in a valid state.
Definition: regtype.h:83
void * RegKeyHandle
defines the type of a registry key handle used in the C API.
Definition: regtype.h:30
REGISTRY_READONLY
registry is open with readonly access rights.
Definition: regtype.h:83
RegError releaseKey(RegKeyHandle hKey)
Definition: regimpl.cxx:589
RegError closeKey(RegKeyHandle hKey)
Definition: regimpl.cxx:706
ORegistry * getRegistry() const
Definition: keyimpl.hxx:112
void REGISTRY_CALLTYPE releaseKey(RegKeyHandle hKey)
Definition: regkey.cxx:43
void * RegValue
defines the type of a registry key value handle used in the C API.
Definition: regtype.h:33
RegError REGISTRY_CALLTYPE openSubKeys(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle **pphSubKeys, sal_uInt32 *pnSubKeys)
Definition: regkey.cxx:123
RegError setLongListValue(const OUString &valueName, sal_Int32 const *pValueList, sal_uInt32 len)
Definition: keyimpl.cxx:346
RegError getStringListValue(const OUString &valueName, char ***pValueList, sal_uInt32 *pLen) const
Definition: keyimpl.cxx:717
RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey, rtl_uString *keyName, sal_Int32 **pValueList, sal_uInt32 *pLen)
Definition: regkey.cxx:451
RegError REGISTRY_CALLTYPE getKeyNames(RegKeyHandle hKey, rtl_uString *keyName, rtl_uString ***pSubKeyNames, sal_uInt32 *pnSubKeys)
Definition: regkey.cxx:635
RegError openKey(const OUString &keyName, RegKeyHandle *phOpenKey)
Definition: keyimpl.cxx:76
#define REGISTRY_CALLTYPE
specify the calling convention for the registry API
Definition: regtype.h:135
RegError REGISTRY_CALLTYPE getKeyName(RegKeyHandle hKey, rtl_uString **pKeyName)
Definition: regkey.cxx:65
RegError REGISTRY_CALLTYPE getValueInfo(RegKeyHandle hKey, rtl_uString *keyName, RegValueType *pValueType, sal_uInt32 *pValueSize)
Definition: regkey.cxx:363
RegError REGISTRY_CALLTYPE createKey(RegKeyHandle hKey, rtl_uString *keyName, RegKeyHandle *phNewKey)
Definition: regkey.cxx:82
RegError REGISTRY_CALLTYPE freeKeyNames(rtl_uString **pKeyNames, sal_uInt32 nKeys)
Definition: regkey.cxx:653
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo