LibreOffice Module registry (master) 1
regimpl.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 "regimpl.hxx"
22
23#include <cstddef>
24#include <memory>
25#include <set>
26#include <string_view>
27#include <vector>
28#include <string.h>
29#include <stdio.h>
30
31#if defined(UNX)
32#include <unistd.h>
33#endif
34
35#include <registry/reader.hxx>
36#include <registry/refltype.hxx>
37#include <registry/types.hxx>
38
39#include "reflcnst.hxx"
40#include "keyimpl.hxx"
41
42#include <osl/thread.h>
43#include <rtl/ustring.hxx>
44#include <rtl/ustrbuf.hxx>
45#include <osl/file.hxx>
46
47using namespace osl;
48using namespace store;
49
50
51namespace {
52
53void printString(std::u16string_view s) {
54 printf("\"");
55 for (std::size_t i = 0; i < s.size(); ++i) {
56 sal_Unicode c = s[i];
57 if (c == '"' || c == '\\') {
58 printf("\\%c", static_cast< char >(c));
59 } else if (s[i] >= ' ' && s[i] <= '~') {
60 printf("%c", static_cast< char >(c));
61 } else {
62 printf("\\u%04X", static_cast< unsigned int >(c));
63 }
64 }
65 printf("\"");
66}
67
68void printFieldOrReferenceFlag(
69 RTFieldAccess * flags, RTFieldAccess flag, char const * name, bool * first)
70{
71 if ((*flags & flag) != RTFieldAccess::NONE) {
72 if (!*first) {
73 printf("|");
74 }
75 *first = false;
76 printf("%s", name);
77 *flags &= ~flag;
78 }
79}
80
81void printFieldOrReferenceFlags(RTFieldAccess flags) {
82 if (flags == RTFieldAccess::NONE) {
83 printf("none");
84 } else {
85 bool first = true;
86 printFieldOrReferenceFlag(
87 &flags, RTFieldAccess::READONLY, "readonly", &first);
88 printFieldOrReferenceFlag(
89 &flags, RTFieldAccess::OPTIONAL, "optional", &first);
90 printFieldOrReferenceFlag(
91 &flags, RTFieldAccess::MAYBEVOID, "maybevoid", &first);
92 printFieldOrReferenceFlag(&flags, RTFieldAccess::BOUND, "bound", &first);
93 printFieldOrReferenceFlag(
94 &flags, RTFieldAccess::CONSTRAINED, "constrained", &first);
95 printFieldOrReferenceFlag(
96 &flags, RTFieldAccess::TRANSIENT, "transient", &first);
97 printFieldOrReferenceFlag(
98 &flags, RTFieldAccess::MAYBEAMBIGUOUS, "maybeambiguous", &first);
99 printFieldOrReferenceFlag(
100 &flags, RTFieldAccess::MAYBEDEFAULT, "maybedefault", &first);
101 printFieldOrReferenceFlag(
102 &flags, RTFieldAccess::REMOVABLE, "removable", &first);
103 printFieldOrReferenceFlag(
104 &flags, RTFieldAccess::ATTRIBUTE, "attribute", &first);
105 printFieldOrReferenceFlag(
106 &flags, RTFieldAccess::PROPERTY, "property", &first);
107 printFieldOrReferenceFlag(&flags, RTFieldAccess::CONST, "const", &first);
108 printFieldOrReferenceFlag(
109 &flags, RTFieldAccess::READWRITE, "readwrite", &first);
110 printFieldOrReferenceFlag(
111 &flags, RTFieldAccess::PARAMETERIZED_TYPE, "parameterized type", &first);
112 printFieldOrReferenceFlag(
113 &flags, RTFieldAccess::PUBLISHED, "published", &first);
114 if (flags != RTFieldAccess::NONE) {
115 if (!first) {
116 printf("|");
117 }
118 printf("<invalid (0x%04X)>", static_cast< unsigned int >(flags));
119 }
120 }
121}
122
123void dumpType(typereg::Reader const & reader, OString const & indent) {
124 if (reader.isValid()) {
125 printf("version: %ld\n", static_cast< long >(reader.getVersion()));
126 printf("%sdocumentation: ", indent.getStr());
127 printString(reader.getDocumentation());
128 printf("\n");
129 printf("%sfile name: ", indent.getStr());
130 printString(reader.getFileName());
131 printf("\n");
132 printf("%stype class: ", indent.getStr());
133 if (reader.isPublished()) {
134 printf("published ");
135 }
136 switch (reader.getTypeClass()) {
138 printf("interface");
139 break;
140
141 case RT_TYPE_MODULE:
142 printf("module");
143 break;
144
145 case RT_TYPE_STRUCT:
146 printf("struct");
147 break;
148
149 case RT_TYPE_ENUM:
150 printf("enum");
151 break;
152
154 printf("exception");
155 break;
156
157 case RT_TYPE_TYPEDEF:
158 printf("typedef");
159 break;
160
161 case RT_TYPE_SERVICE:
162 printf("service");
163 break;
164
166 printf("singleton");
167 break;
168
170 printf("constants");
171 break;
172
173 default:
174 printf(
175 "<invalid (%ld)>", static_cast< long >(reader.getTypeClass()));
176 break;
177 }
178 printf("\n");
179 printf("%stype name: ", indent.getStr());
180 printString(reader.getTypeName());
181 printf("\n");
182 printf(
183 "%ssuper type count: %u\n", indent.getStr(),
184 static_cast< unsigned int >(reader.getSuperTypeCount()));
185 for (sal_uInt16 i = 0; i < reader.getSuperTypeCount(); ++i) {
186 printf(
187 "%ssuper type name %u: ", indent.getStr(),
188 static_cast< unsigned int >(i));
189 printString(reader.getSuperTypeName(i));
190 printf("\n");
191 }
192 printf(
193 "%sfield count: %u\n", indent.getStr(),
194 static_cast< unsigned int >(reader.getFieldCount()));
195 for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) {
196 printf(
197 "%sfield %u:\n", indent.getStr(),
198 static_cast< unsigned int >(i));
199 printf("%s documentation: ", indent.getStr());
200 printString(reader.getFieldDocumentation(i));
201 printf("\n");
202 printf("%s file name: ", indent.getStr());
203 printString(reader.getFieldFileName(i));
204 printf("\n");
205 printf("%s flags: ", indent.getStr());
206 printFieldOrReferenceFlags(reader.getFieldFlags(i));
207 printf("\n");
208 printf("%s name: ", indent.getStr());
209 printString(reader.getFieldName(i));
210 printf("\n");
211 printf("%s type name: ", indent.getStr());
212 printString(reader.getFieldTypeName(i));
213 printf("\n");
214 printf("%s value: ", indent.getStr());
216 switch (value.m_type) {
217 case RT_TYPE_NONE:
218 printf("none");
219 break;
220
221 case RT_TYPE_BOOL:
222 printf("boolean %s", value.m_value.aBool ? "true" : "false");
223 break;
224
225 case RT_TYPE_BYTE:
226 printf("byte %d", static_cast< int >(value.m_value.aByte));
227 break;
228
229 case RT_TYPE_INT16:
230 printf("short %d", static_cast< int >(value.m_value.aShort));
231 break;
232
233 case RT_TYPE_UINT16:
234 printf(
235 "unsigned short %u",
236 static_cast< unsigned int >(value.m_value.aUShort));
237 break;
238
239 case RT_TYPE_INT32:
240 printf("long %ld", static_cast< long >(value.m_value.aLong));
241 break;
242
243 case RT_TYPE_UINT32:
244 printf(
245 "unsigned long %lu",
246 static_cast< unsigned long >(value.m_value.aULong));
247 break;
248
249 case RT_TYPE_INT64:
250 // TODO: no portable way to print hyper values
251 printf("hyper");
252 break;
253
254 case RT_TYPE_UINT64:
255 // TODO: no portable way to print unsigned hyper values
256 printf("unsigned hyper");
257 break;
258
259 case RT_TYPE_FLOAT:
260 // TODO: no portable way to print float values
261 printf("float");
262 break;
263
264 case RT_TYPE_DOUBLE:
265 // TODO: no portable way to print double values
266 printf("double");
267 break;
268
269 case RT_TYPE_STRING:
270 printf("string ");
271 printString(value.m_value.aString);
272 break;
273
274 default:
275 printf("<invalid (%ld)>", static_cast< long >(value.m_type));
276 break;
277 }
278 printf("\n");
279 }
280 printf(
281 "%smethod count: %u\n", indent.getStr(),
282 static_cast< unsigned int >(reader.getMethodCount()));
283 for (sal_uInt16 i = 0; i < reader.getMethodCount(); ++i) {
284 printf(
285 "%smethod %u:\n", indent.getStr(),
286 static_cast< unsigned int >(i));
287 printf("%s documentation: ", indent.getStr());
288 printString(reader.getMethodDocumentation(i));
289 printf("\n");
290 printf("%s flags: ", indent.getStr());
291 switch (reader.getMethodFlags(i)) {
293 printf("oneway");
294 break;
295
297 printf("synchronous");
298 break;
299
301 printf("attribute get");
302 break;
303
305 printf("attribute set");
306 break;
307
308 default:
309 printf(
310 "<invalid (%ld)>",
311 static_cast< long >(reader.getMethodFlags(i)));
312 break;
313 }
314 printf("\n");
315 printf("%s name: ", indent.getStr());
316 printString(reader.getMethodName(i));
317 printf("\n");
318 printf("%s return type name: ", indent.getStr());
319 printString(reader.getMethodReturnTypeName(i));
320 printf("\n");
321 printf(
322 "%s parameter count: %u\n", indent.getStr(),
323 static_cast< unsigned int >(reader.getMethodParameterCount(i)));
324 // coverity[tainted_data] - cid#1215304 unhelpfully warns about untrusted loop bound
325 for (sal_uInt16 j = 0; j < reader.getMethodParameterCount(i); ++j)
326 {
327 printf(
328 "%s parameter %u:\n", indent.getStr(),
329 static_cast< unsigned int >(j));
330 printf("%s flags: ", indent.getStr());
331 RTParamMode flags = reader.getMethodParameterFlags(i, j);
332 bool rest = (flags & RT_PARAM_REST) != 0;
333 switch (flags & ~RT_PARAM_REST) {
334 case RT_PARAM_IN:
335 printf("in");
336 break;
337
338 case RT_PARAM_OUT:
339 printf("out");
340 break;
341
342 case RT_PARAM_INOUT:
343 printf("inout");
344 break;
345
346 default:
347 printf("<invalid (%ld)>", static_cast< long >(flags));
348 rest = false;
349 break;
350 }
351 if (rest) {
352 printf("|rest");
353 }
354 printf("\n");
355 printf("%s name: ", indent.getStr());
356 printString(reader.getMethodParameterName(i, j));
357 printf("\n");
358 printf("%s type name: ", indent.getStr());
359 printString(reader.getMethodParameterTypeName(i, j));
360 printf("\n");
361 }
362 printf(
363 "%s exception count: %u\n", indent.getStr(),
364 static_cast< unsigned int >(reader.getMethodExceptionCount(i)));
365 // coverity[tainted_data] - cid#1215304 unhelpfully warns about untrusted loop bound
366 for (sal_uInt16 j = 0; j < reader.getMethodExceptionCount(i); ++j)
367 {
368 printf(
369 "%s exception type name %u: ", indent.getStr(),
370 static_cast< unsigned int >(j));
371 printString(reader.getMethodExceptionTypeName(i, j));
372 printf("\n");
373 }
374 }
375 printf(
376 "%sreference count: %u\n", indent.getStr(),
377 static_cast< unsigned int >(reader.getReferenceCount()));
378 for (sal_uInt16 i = 0; i < reader.getReferenceCount(); ++i) {
379 printf(
380 "%sreference %u:\n", indent.getStr(),
381 static_cast< unsigned int >(i));
382 printf("%s documentation: ", indent.getStr());
383 printString(reader.getReferenceDocumentation(i));
384 printf("\n");
385 printf("%s flags: ", indent.getStr());
386 printFieldOrReferenceFlags(reader.getReferenceFlags(i));
387 printf("\n");
388 printf("%s sort: ", indent.getStr());
389 switch (reader.getReferenceSort(i)) {
391 printf("supports");
392 break;
393
395 printf("exports");
396 break;
397
399 printf("type parameter");
400 break;
401
402 default:
403 printf(
404 "<invalid (%ld)>",
405 static_cast< long >(reader.getReferenceSort(i)));
406 break;
407 }
408 printf("\n");
409 printf("%s type name: ", indent.getStr());
410 printString(reader.getReferenceTypeName(i));
411 printf("\n");
412 }
413 } else {
414 printf("<invalid>\n");
415 }
416}
417
418}
419
421 : m_refCount(1)
422 , m_readOnly(false)
423 , m_isOpen(false)
424{
425}
426
428{
429 ORegKey* pRootKey = m_openKeyTable[ROOT];
430 if (pRootKey != nullptr)
431 (void) releaseKey(pRootKey);
432
433 if (m_file.isValid())
434 m_file.close();
435}
436
437RegError ORegistry::initRegistry(const OUString& regName, RegAccessMode accessMode, bool bCreate)
438{
440 OStoreFile rRegFile;
441 storeAccessMode sAccessMode = storeAccessMode::ReadWrite;
442 storeError errCode;
443
444 if (bCreate)
445 {
446 sAccessMode = storeAccessMode::Create;
447 }
448 else if (accessMode & RegAccessMode::READONLY)
449 {
450 sAccessMode = storeAccessMode::ReadOnly;
451 m_readOnly = true;
452 }
453
454 if (regName.isEmpty() &&
455 storeAccessMode::Create == sAccessMode)
456 {
457 errCode = rRegFile.createInMemory();
458 }
459 else
460 {
461 errCode = rRegFile.create(regName, sAccessMode);
462 }
463
464 if (errCode)
465 {
466 switch (errCode)
467 {
470 break;
473 break;
474 default:
476 break;
477 }
478 }
479 else
480 {
481 OStoreDirectory rStoreDir;
482 storeError _err = rStoreDir.create(rRegFile, OUString(), OUString(), sAccessMode);
483
484 if (_err == store_E_None)
485 {
486 m_file = rRegFile;
487 m_name = regName;
488 m_isOpen = true;
489
490 m_openKeyTable[ROOT] = new ORegKey(ROOT, this);
491 eRet = RegError::NO_ERROR;
492 }
493 else
495 }
496
497 return eRet;
498}
499
501{
503
504 if (m_file.isValid())
505 {
507 m_file.close();
508 m_isOpen = false;
509 return RegError::NO_ERROR;
510 } else
511 {
513 }
514}
515
516RegError ORegistry::destroyRegistry(const OUString& regName)
517{
519
520 if (!regName.isEmpty())
521 {
522 std::unique_ptr<ORegistry> pReg(new ORegistry());
523
524 if (pReg->initRegistry(regName, RegAccessMode::READWRITE) == RegError::NO_ERROR)
525 {
526 pReg.reset();
527
528 OUString systemName;
529 if (FileBase::getSystemPathFromFileURL(regName, systemName) != FileBase::E_None)
530 systemName = regName;
531
532 OString name(OUStringToOString(systemName, osl_getThreadTextEncoding()));
533 if (unlink(name.getStr()) != 0)
534 {
536 }
537 } else
538 {
540 }
541 } else
542 {
543 if (m_refCount != 1 || isReadOnly())
544 {
546 }
547
548 if (m_file.isValid())
549 {
551 m_file.close();
552 m_isOpen = false;
553
554 if (!m_name.isEmpty())
555 {
556 OUString systemName;
557 if (FileBase::getSystemPathFromFileURL(m_name, systemName) != FileBase::E_None)
558 systemName = m_name;
559
560 OString name(OUStringToOString(systemName, osl_getThreadTextEncoding()));
561 if (unlink(name.getStr()) != 0)
562 {
564 }
565 }
566 } else
567 {
569 }
570 }
571
572 return RegError::NO_ERROR;
573}
574
576{
577 ORegKey* pKey = static_cast< ORegKey* >(hKey);
578 if (!pKey)
580
582 pKey->acquire();
583
584 return RegError::NO_ERROR;
585}
586
588{
589 ORegKey* pKey = static_cast< ORegKey* >(hKey);
590 if (!pKey)
592
594 if (pKey->release() == 0)
595 {
596 m_openKeyTable.erase(pKey->getName());
597 delete pKey;
598 }
599 return RegError::NO_ERROR;
600}
601
602RegError ORegistry::createKey(RegKeyHandle hKey, std::u16string_view keyName,
603 RegKeyHandle* phNewKey)
604{
605 ORegKey* pKey;
606
607 *phNewKey = nullptr;
608
609 if (keyName.empty())
611
613
614 if (hKey)
615 pKey = static_cast<ORegKey*>(hKey);
616 else
617 pKey = m_openKeyTable[ROOT];
618
619 OUString sFullKeyName = pKey->getFullPath(keyName);
620
621 if (m_openKeyTable.count(sFullKeyName) > 0)
622 {
623 *phNewKey = m_openKeyTable[sFullKeyName];
624 static_cast<ORegKey*>(*phNewKey)->acquire();
625 static_cast<ORegKey*>(*phNewKey)->setDeleted(false);
626 return RegError::NO_ERROR;
627 }
628
629 OStoreDirectory rStoreDir;
630 OUStringBuffer sFullPath(sFullKeyName.getLength()+16);
631 OUString token;
632
633 sFullPath.append('/');
634
635 sal_Int32 nIndex = 0;
636 do
637 {
638 token = sFullKeyName.getToken(0, '/', nIndex);
639 if (!token.isEmpty())
640 {
641 if (rStoreDir.create(pKey->getStoreFile(), sFullPath.toString(), token, storeAccessMode::Create))
642 {
644 }
645
646 sFullPath.append(token + "/");
647 }
648 } while(nIndex != -1);
649
650
651 pKey = new ORegKey(sFullKeyName, this);
652 *phNewKey = pKey;
653 m_openKeyTable[sFullKeyName] = pKey;
654
655 return RegError::NO_ERROR;
656}
657
658RegError ORegistry::openKey(RegKeyHandle hKey, std::u16string_view keyName,
659 RegKeyHandle* phOpenKey)
660{
661 ORegKey* pKey;
662
663 *phOpenKey = nullptr;
664
665 if (keyName.empty())
666 {
668 }
669
671
672 if (hKey)
673 pKey = static_cast<ORegKey*>(hKey);
674 else
675 pKey = m_openKeyTable[ROOT];
676
677 OUString path(pKey->getFullPath(keyName));
678 KeyMap::iterator i(m_openKeyTable.find(path));
679 if (i == m_openKeyTable.end()) {
680 sal_Int32 n = path.lastIndexOf('/') + 1;
681 switch (OStoreDirectory().create(
682 pKey->getStoreFile(), path.copy(0, n), path.copy(n),
683 isReadOnly() ? storeAccessMode::ReadOnly : storeAccessMode::ReadWrite))
684 {
689 default:
690 break;
691 }
692
693 std::unique_ptr< ORegKey > p(new ORegKey(path, this));
694 i = m_openKeyTable.insert(std::make_pair(path, p.get())).first;
695 // coverity[leaked_storage : FALSE] - ownership transferred to m_openKeyTable
696 p.release();
697 } else {
698 i->second->acquire();
699 }
700 *phOpenKey = i->second;
701 return RegError::NO_ERROR;
702}
703
705{
706 ORegKey* pKey = static_cast< ORegKey* >(hKey);
707
709
710 OUString const aKeyName (pKey->getName());
711 if (m_openKeyTable.count(aKeyName) <= 0)
713
714 if (pKey->isModified())
715 {
716 ORegKey * pRootKey = getRootKey();
717 if (pKey != pRootKey)
718 {
719 // propagate "modified" state to RootKey.
720 pRootKey->setModified();
721 }
722 else
723 {
724 // closing modified RootKey, flush registry file.
725 (void) m_file.flush();
726 }
727 pKey->setModified(false);
728 (void) releaseKey(pRootKey);
729 }
730
731 return releaseKey(pKey);
732}
733
734RegError ORegistry::deleteKey(RegKeyHandle hKey, std::u16string_view keyName)
735{
736 ORegKey* pKey = static_cast< ORegKey* >(hKey);
737 if (keyName.empty())
739
741
742 if (!pKey)
743 pKey = m_openKeyTable[ROOT];
744
745 OUString sFullKeyName(pKey->getFullPath(keyName));
746 return eraseKey(m_openKeyTable[ROOT], sFullKeyName);
747}
748
749RegError ORegistry::eraseKey(ORegKey* pKey, std::u16string_view keyName)
750{
752
753 if (keyName.empty())
754 {
756 }
757
758 OUString sFullKeyName(pKey->getName());
759 OUString sFullPath(sFullKeyName);
760 OUString sRelativKey;
761 size_t lastIndex = keyName.rfind('/');
762
763 if (lastIndex != std::u16string_view::npos)
764 {
765 sRelativKey += keyName.substr(lastIndex + 1);
766
767 if (sFullKeyName.getLength() > 1)
768 sFullKeyName += keyName;
769 else
770 sFullKeyName += keyName.substr(1);
771
772 sFullPath = sFullKeyName.copy(0, keyName.rfind('/') + 1);
773 } else
774 {
775 if (sFullKeyName.getLength() > 1)
776 sFullKeyName += ROOT;
777
778 sRelativKey += keyName;
779 sFullKeyName += keyName;
780
781 if (sFullPath.getLength() > 1)
782 sFullPath += ROOT;
783 }
784
785 ORegKey* pOldKey = nullptr;
786 _ret = pKey->openKey(keyName, reinterpret_cast<RegKeyHandle*>(&pOldKey));
787 if (_ret != RegError::NO_ERROR)
788 return _ret;
789
790 _ret = deleteSubkeysAndValues(pOldKey);
791 if (_ret != RegError::NO_ERROR)
792 {
793 pKey->closeKey(pOldKey);
794 return _ret;
795 }
796
797 OUString tmpName = sRelativKey + ROOT;
798
799 OStoreFile sFile(pKey->getStoreFile());
800 if (sFile.isValid() && sFile.remove(sFullPath, tmpName))
801 {
803 }
804 pOldKey->setModified();
805
806 // set flag deleted !!!
807 pOldKey->setDeleted(true);
808
809 return pKey->closeKey(pOldKey);
810}
811
813{
816 OStoreDirectory rStoreDir(pKey->getStoreDir());
817 storeError _err = rStoreDir.first(iter);
818
819 while (_err == store_E_None)
820 {
821 OUString const keyName(iter.m_pszName, iter.m_nLength);
822
823 if (iter.m_nAttrib & STORE_ATTRIB_ISDIR)
824 {
825 _ret = eraseKey(pKey, keyName);
826 if (_ret != RegError::NO_ERROR)
827 return _ret;
828 }
829 else
830 {
831 OUString sFullPath(pKey->getName());
832
833 if (sFullPath.getLength() > 1)
834 sFullPath += ROOT;
835
836 if (const_cast<OStoreFile&>(pKey->getStoreFile()).remove(sFullPath, keyName))
837 {
839 }
840 pKey->setModified();
841 }
842
843 _err = rStoreDir.next(iter);
844 }
845
846 return RegError::NO_ERROR;
847}
848
850{
851 m_openKeyTable[ROOT]->acquire();
852 return m_openKeyTable[ROOT];
853}
854
856{
857 ORegKey *pKey = static_cast<ORegKey*>(hKey);
858 OUString sName;
861 OStoreDirectory rStoreDir(pKey->getStoreDir());
862 storeError _err = rStoreDir.first(iter);
863
864 OString regName(OUStringToOString(getName(), osl_getThreadTextEncoding()));
865 OString keyName(OUStringToOString(pKey->getName(), RTL_TEXTENCODING_UTF8));
866 fprintf(stdout, "Registry \"%s\":\n\n%s\n", regName.getStr(), keyName.getStr());
867
868 while (_err == store_E_None)
869 {
870 sName = OUString(iter.m_pszName, iter.m_nLength);
871
872 if (iter.m_nAttrib & STORE_ATTRIB_ISDIR)
873 {
874 _ret = dumpKey(pKey->getName(), sName, 1);
875 } else
876 {
877 _ret = dumpValue(pKey->getName(), sName, 1);
878 }
879
880 if (_ret != RegError::NO_ERROR)
881 {
882 return _ret;
883 }
884
885 _err = rStoreDir.next(iter);
886 }
887
888 return RegError::NO_ERROR;
889}
890
891RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_Int16 nSpc) const
892{
893 OStoreStream rValue;
894 sal_uInt32 valueSize;
895 RegValueType valueType;
896 OUString sFullPath(sPath);
897 OString sIndent;
898 storeAccessMode accessMode = storeAccessMode::ReadWrite;
899
900 if (isReadOnly())
901 {
902 accessMode = storeAccessMode::ReadOnly;
903 }
904
905 for (int i= 0; i < nSpc; i++) sIndent += " ";
906
907 if (sFullPath.getLength() > 1)
908 {
909 sFullPath += ROOT;
910 }
911 if (rValue.create(m_file, sFullPath, sName, accessMode))
912 {
914 }
915
916 std::vector<sal_uInt8> aBuffer(VALUE_HEADERSIZE);
917
918 sal_uInt32 rwBytes;
919 if (rValue.readAt(0, aBuffer.data(), VALUE_HEADERSIZE, rwBytes))
920 {
921 return RegError::INVALID_VALUE;
922 }
923 if (rwBytes != (VALUE_HEADERSIZE))
924 {
925 return RegError::INVALID_VALUE;
926 }
927
929 valueType = static_cast<RegValueType>(type);
930 readUINT32(aBuffer.data() + VALUE_TYPEOFFSET, valueSize);
931
932 aBuffer.resize(valueSize);
933 if (rValue.readAt(VALUE_HEADEROFFSET, aBuffer.data(), valueSize, rwBytes))
934 {
935 return RegError::INVALID_VALUE;
936 }
937 if (rwBytes != valueSize)
938 {
939 return RegError::INVALID_VALUE;
940 }
941
942 const char* indent = sIndent.getStr();
943 switch (valueType)
944 {
946 fprintf(stdout, "%sValue: Type = VALUETYPE_NOT_DEFINED\n", indent);
947 break;
949 {
950 fprintf(stdout, "%sValue: Type = RegValueType::LONG\n", indent);
951 fprintf(
952 stdout, "%s Size = %lu\n", indent,
953 sal::static_int_cast< unsigned long >(valueSize));
954 fprintf(stdout, "%s Data = ", indent);
955
956 sal_Int32 value;
957 readINT32(aBuffer.data(), value);
958 fprintf(stdout, "%ld\n", sal::static_int_cast< long >(value));
959 }
960 break;
962 {
963 char* value = static_cast<char*>(std::malloc(valueSize));
964 readUtf8(aBuffer.data(), value, valueSize);
965 fprintf(stdout, "%sValue: Type = RegValueType::STRING\n", indent);
966 fprintf(
967 stdout, "%s Size = %lu\n", indent,
968 sal::static_int_cast< unsigned long >(valueSize));
969 fprintf(stdout, "%s Data = \"%s\"\n", indent, value);
970 std::free(value);
971 }
972 break;
974 {
975 sal_uInt32 size = (valueSize / 2) * sizeof(sal_Unicode);
976 fprintf(stdout, "%sValue: Type = RegValueType::UNICODE\n", indent);
977 fprintf(
978 stdout, "%s Size = %lu\n", indent,
979 sal::static_int_cast< unsigned long >(valueSize));
980 fprintf(stdout, "%s Data = ", indent);
981
982 std::unique_ptr<sal_Unicode[]> value(new sal_Unicode[size]);
983 readString(aBuffer.data(), value.get(), size);
984
985 OString uStr(value.get(), rtl_ustr_getLength(value.get()), RTL_TEXTENCODING_UTF8);
986 fprintf(stdout, "L\"%s\"\n", uStr.getStr());
987 }
988 break;
990 {
991 fprintf(stdout, "%sValue: Type = RegValueType::BINARY\n", indent);
992 fprintf(
993 stdout, "%s Size = %lu\n", indent,
994 sal::static_int_cast< unsigned long >(valueSize));
995 fprintf(stdout, "%s Data = ", indent);
996 dumpType(
997 typereg::Reader(aBuffer.data(), valueSize),
998 sIndent + " ");
999 }
1000 break;
1002 {
1003 sal_uInt32 offset = 4; // initial 4 bytes for the size of the array
1004 sal_uInt32 len = 0;
1005
1006 readUINT32(aBuffer.data(), len);
1007
1008 fprintf(stdout, "%sValue: Type = RegValueType::LONGLIST\n", indent);
1009 fprintf(
1010 stdout, "%s Size = %lu\n", indent,
1011 sal::static_int_cast< unsigned long >(valueSize));
1012 fprintf(
1013 stdout, "%s Len = %lu\n", indent,
1014 sal::static_int_cast< unsigned long >(len));
1015 fprintf(stdout, "%s Data = ", indent);
1016
1017 sal_Int32 longValue;
1018 for (sal_uInt32 i=0; i < len; i++)
1019 {
1020 readINT32(aBuffer.data() + offset, longValue);
1021
1022 if (offset > 4)
1023 fprintf(stdout, "%s ", indent);
1024
1025 fprintf(
1026 stdout, "%lu = %ld\n",
1027 sal::static_int_cast< unsigned long >(i),
1028 sal::static_int_cast< long >(longValue));
1029 offset += 4; // 4 Bytes for sal_Int32
1030 }
1031 }
1032 break;
1034 {
1035 sal_uInt32 offset = 4; // initial 4 bytes for the size of the array
1036 sal_uInt32 sLen = 0;
1037 sal_uInt32 len = 0;
1038
1039 readUINT32(aBuffer.data(), len);
1040
1041 fprintf(stdout, "%sValue: Type = RegValueType::STRINGLIST\n", indent);
1042 fprintf(
1043 stdout, "%s Size = %lu\n", indent,
1044 sal::static_int_cast< unsigned long >(valueSize));
1045 fprintf(
1046 stdout, "%s Len = %lu\n", indent,
1047 sal::static_int_cast< unsigned long >(len));
1048 fprintf(stdout, "%s Data = ", indent);
1049
1050 for (sal_uInt32 i=0; i < len; i++)
1051 {
1052 readUINT32(aBuffer.data() + offset, sLen);
1053
1054 offset += 4; // 4 bytes (sal_uInt32) for the string size
1055
1056 char *pValue = static_cast<char*>(std::malloc(sLen));
1057 readUtf8(aBuffer.data() + offset, pValue, sLen);
1058
1059 if (offset > 8)
1060 fprintf(stdout, "%s ", indent);
1061
1062 fprintf(
1063 stdout, "%lu = \"%s\"\n",
1064 sal::static_int_cast< unsigned long >(i), pValue);
1065 std::free(pValue);
1066 offset += sLen;
1067 }
1068 }
1069 break;
1070 case RegValueType::UNICODELIST:
1071 {
1072 sal_uInt32 offset = 4; // initial 4 bytes for the size of the array
1073 sal_uInt32 sLen = 0;
1074 sal_uInt32 len = 0;
1075
1076 readUINT32(aBuffer.data(), len);
1077
1078 fprintf(stdout, "%sValue: Type = RegValueType::UNICODELIST\n", indent);
1079 fprintf(
1080 stdout, "%s Size = %lu\n", indent,
1081 sal::static_int_cast< unsigned long >(valueSize));
1082 fprintf(
1083 stdout, "%s Len = %lu\n", indent,
1084 sal::static_int_cast< unsigned long >(len));
1085 fprintf(stdout, "%s Data = ", indent);
1086
1087 OString uStr;
1088 for (sal_uInt32 i=0; i < len; i++)
1089 {
1090 readUINT32(aBuffer.data() + offset, sLen);
1091
1092 offset += 4; // 4 bytes (sal_uInt32) for the string size
1093
1094 sal_Unicode *pValue = static_cast<sal_Unicode*>(std::malloc((sLen / 2) * sizeof(sal_Unicode)));
1095 readString(aBuffer.data() + offset, pValue, sLen);
1096
1097 if (offset > 8)
1098 fprintf(stdout, "%s ", indent);
1099
1100 uStr = OString(pValue, rtl_ustr_getLength(pValue), RTL_TEXTENCODING_UTF8);
1101 fprintf(
1102 stdout, "%lu = L\"%s\"\n",
1103 sal::static_int_cast< unsigned long >(i),
1104 uStr.getStr());
1105
1106 offset += sLen;
1107
1108 std::free(pValue);
1109 }
1110 }
1111 break;
1112 }
1113
1114 fprintf(stdout, "\n");
1115
1116 return RegError::NO_ERROR;
1117}
1118
1119RegError ORegistry::dumpKey(const OUString& sPath, const OUString& sName, sal_Int16 nSpace) const
1120{
1121 OStoreDirectory rStoreDir;
1122 OUString sFullPath(sPath);
1123 OString sIndent;
1124 storeAccessMode accessMode = storeAccessMode::ReadWrite;
1126
1127 if (isReadOnly())
1128 {
1129 accessMode = storeAccessMode::ReadOnly;
1130 }
1131
1132 for (int i= 0; i < nSpace; i++) sIndent += " ";
1133
1134 if (sFullPath.getLength() > 1)
1135 sFullPath += ROOT;
1136
1137 storeError _err = rStoreDir.create(m_file, sFullPath, sName, accessMode);
1138
1139 if (_err == store_E_NotExists)
1141 else if (_err == store_E_WrongFormat)
1142 return RegError::INVALID_KEY;
1143
1144 fprintf(stdout, "%s/ %s\n", sIndent.getStr(), OUStringToOString(sName, RTL_TEXTENCODING_UTF8).getStr());
1145
1146 OUString sSubPath(sFullPath);
1147 OUString sSubName;
1148 sSubPath += sName;
1149
1151
1152 _err = rStoreDir.first(iter);
1153
1154 while (_err == store_E_None)
1155 {
1156 sSubName = OUString(iter.m_pszName, iter.m_nLength);
1157
1158 if (iter.m_nAttrib & STORE_ATTRIB_ISDIR)
1159 {
1160 _ret = dumpKey(sSubPath, sSubName, nSpace+2);
1161 } else
1162 {
1163 _ret = dumpValue(sSubPath, sSubName, nSpace+2);
1164 }
1165
1166 if (_ret != RegError::NO_ERROR)
1167 {
1168 return _ret;
1169 }
1170
1171 _err = rStoreDir.next(iter);
1172 }
1173
1174 return RegError::NO_ERROR;
1175}
1176
1177/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void acquire()
Definition: keyimpl.hxx:37
void setModified(bool bModified=true)
Definition: keyimpl.hxx:108
bool isModified() const
Definition: keyimpl.hxx:105
OUString getFullPath(std::u16string_view path) const
Definition: keyimpl.cxx:908
const store::OStoreFile & getStoreFile() const
Definition: keyimpl.hxx:119
void setDeleted(bool bKeyDeleted)
Definition: keyimpl.hxx:102
sal_uInt32 release()
Definition: keyimpl.hxx:40
RegError openKey(std::u16string_view keyName, RegKeyHandle *phOpenKey)
Definition: keyimpl.cxx:62
RegError closeKey(RegKeyHandle hKey)
Definition: keyimpl.cxx:179
const OUString & getName() const
Definition: keyimpl.hxx:124
store::OStoreDirectory getStoreDir() const
Definition: keyimpl.cxx:881
friend class ORegKey
Definition: regimpl.hxx:95
sal_uInt32 m_refCount
Definition: regimpl.hxx:112
RegError dumpKey(const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const
Definition: regimpl.cxx:1119
ORegKey * getRootKey()
Definition: regimpl.cxx:849
RegError initRegistry(const OUString &name, RegAccessMode accessMode, bool bCreate=false)
Definition: regimpl.cxx:437
~ORegistry()
Definition: regimpl.cxx:427
RegError closeKey(RegKeyHandle hKey)
Definition: regimpl.cxx:704
RegError openKey(RegKeyHandle hKey, std::u16string_view keyName, RegKeyHandle *phOpenKey)
Definition: regimpl.cxx:658
RegError eraseKey(ORegKey *pKey, std::u16string_view keyName)
Definition: regimpl.cxx:749
RegError dumpRegistry(RegKeyHandle hKey) const
Definition: regimpl.cxx:855
bool m_isOpen
Definition: regimpl.hxx:115
osl::Mutex m_mutex
Definition: regimpl.hxx:113
RegError dumpValue(const OUString &sPath, const OUString &sName, sal_Int16 nSpace) const
Definition: regimpl.cxx:891
RegError deleteKey(RegKeyHandle hKey, std::u16string_view keyName)
Definition: regimpl.cxx:734
bool isReadOnly() const
Definition: regimpl.hxx:81
bool m_readOnly
Definition: regimpl.hxx:114
store::OStoreFile m_file
Definition: regimpl.hxx:117
OUString m_name
Definition: regimpl.hxx:116
RegError acquireKey(RegKeyHandle hKey)
Definition: regimpl.cxx:575
const OUString & getName() const
Definition: regimpl.hxx:92
KeyMap m_openKeyTable
Definition: regimpl.hxx:118
RegError destroyRegistry(const OUString &name)
Definition: regimpl.cxx:516
static constexpr OUStringLiteral ROOT
Definition: regimpl.hxx:120
RegError deleteSubkeysAndValues(ORegKey *pKey)
Definition: regimpl.cxx:812
RegError closeRegistry()
Definition: regimpl.cxx:500
RegError createKey(RegKeyHandle hKey, std::u16string_view keyName, RegKeyHandle *phNewKey)
Definition: regimpl.cxx:602
RegError releaseKey(RegKeyHandle hKey)
Definition: regimpl.cxx:587
specifies a helper class for const values.
Definition: refltype.hxx:31
storeError next(iterator &it)
storeError create(storeFileHandle hFile, OUString const &rPath, OUString const &rName, storeAccessMode eMode)
storeError first(iterator &it)
storeError createInMemory()
storeError flush() const
storeError create(OUString const &rFilename, storeAccessMode eAccessMode)
storeError remove(OUString const &rPath, OUString const &rName)
bool isValid() const
storeError readAt(sal_uInt32 nOffset, void *pBuffer, sal_uInt32 nBytes, sal_uInt32 &rnDone)
storeError create(storeFileHandle hFile, OUString const &rPath, OUString const &rName, storeAccessMode eMode)
A type reader working on a binary blob that represents a UNOIDL type.
Definition: reader.hxx:41
OUString getFieldDocumentation(sal_uInt16 index) const
Returns the documentation of a field of this type reader.
Definition: reader.hxx:241
OUString getSuperTypeName(sal_uInt16 index) const
Returns the type name of a super type of this type reader.
Definition: reader.hxx:213
sal_uInt16 getSuperTypeCount() const
Returns the number of super types of this type reader.
Definition: reader.hxx:199
OUString getFileName() const
Returns the file name of this type reader.
Definition: reader.hxx:143
typereg_Version getVersion() const
Returns the binary blob version of this type reader.
Definition: reader.hxx:113
RTConstValue getFieldValue(sal_uInt16 index) const
Returns the value of a field of this type reader.
Definition: reader.hxx:325
sal_uInt16 getMethodParameterCount(sal_uInt16 index) const
Returns the number of parameters of a method of this type reader.
Definition: reader.hxx:417
OUString getMethodName(sal_uInt16 index) const
Returns the name of a method of this type reader.
Definition: reader.hxx:383
OUString getReferenceTypeName(sal_uInt16 index) const
Returns the type name of a reference of this type reader.
Definition: reader.hxx:588
OUString getFieldFileName(sal_uInt16 index) const
Returns the file name of a field of this type reader.
Definition: reader.hxx:260
OUString getMethodParameterName(sal_uInt16 methodIndex, sal_uInt16 parameterIndex) const
Returns the name of a parameter of a method of this type reader.
Definition: reader.hxx:452
OUString getDocumentation() const
Returns the documentation of this type reader.
Definition: reader.hxx:125
RTParamMode getMethodParameterFlags(sal_uInt16 methodIndex, sal_uInt16 parameterIndex) const
Returns the flags of a parameter of a method of this type reader.
Definition: reader.hxx:432
RTMethodMode getMethodFlags(sal_uInt16 index) const
Returns the flags of a method of this type reader.
Definition: reader.hxx:370
sal_uInt16 getMethodExceptionCount(sal_uInt16 index) const
Returns the number of exceptions of a method of this type reader.
Definition: reader.hxx:496
OUString getTypeName() const
Returns the type name of this type reader.
Definition: reader.hxx:184
bool isPublished() const
Returns whether this type reader is published.
Definition: reader.hxx:172
OUString getReferenceDocumentation(sal_uInt16 index) const
Returns the documentation of a reference of this type reader.
Definition: reader.hxx:545
OUString getMethodDocumentation(sal_uInt16 index) const
Returns the documentation of a method of this type reader.
Definition: reader.hxx:354
RTFieldAccess getReferenceFlags(sal_uInt16 index) const
Returns the flags of a reference of this type reader.
Definition: reader.hxx:562
OUString getMethodExceptionTypeName(sal_uInt16 methodIndex, sal_uInt16 exceptionIndex) const
Returns the type name of an exception of a method of this type reader.
Definition: reader.hxx:513
RTFieldAccess getFieldFlags(sal_uInt16 index) const
Returns the flags of a field of this type reader.
Definition: reader.hxx:276
RTTypeClass getTypeClass() const
Returns the type class of this type reader.
Definition: reader.hxx:162
OUString getFieldTypeName(sal_uInt16 index) const
Returns the type name of a field of this type reader.
Definition: reader.hxx:307
OUString getMethodReturnTypeName(sal_uInt16 index) const
Returns the return type name of a method of this type reader.
Definition: reader.hxx:401
sal_uInt16 getFieldCount() const
Returns the number of fields of this type reader.
Definition: reader.hxx:228
OUString getFieldName(sal_uInt16 index) const
Returns the name of a field of this type reader.
Definition: reader.hxx:289
OUString getMethodParameterTypeName(sal_uInt16 methodIndex, sal_uInt16 parameterIndex) const
Returns the type name of a parameter of a method of this type reader.
Definition: reader.hxx:477
sal_uInt16 getReferenceCount() const
Returns the number of references of this type reader.
Definition: reader.hxx:531
bool isValid() const
Returns whether this type reader is valid.
Definition: reader.hxx:102
sal_uInt16 getMethodCount() const
Returns the number of methods of this type reader.
Definition: reader.hxx:341
RTReferenceType getReferenceSort(sal_uInt16 index) const
Returns the sort of a reference of this type reader.
Definition: reader.hxx:574
Any value
ULONG m_refCount
OUString sName
const char * name
sal_Int32 nIndex
void * p
sal_Int64 n
size
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
int i
constexpr OUStringLiteral first
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
sal_uInt32 readString(const sal_uInt8 *buffer, sal_Unicode *v, sal_uInt32 maxSize)
Definition: reflwrit.cxx:54
sal_uInt32 readINT32(const sal_uInt8 *buffer, sal_Int32 &v)
Definition: reflcnst.hxx:123
sal_uInt32 readUINT32(const sal_uInt8 *buffer, sal_uInt32 &v)
Definition: reflcnst.hxx:145
sal_uInt32 readUtf8(const sal_uInt8 *buffer, char *v, sal_uInt32 maxSize)
Definition: reflcnst.hxx:167
#define VALUE_HEADEROFFSET
Definition: regimpl.hxx:36
#define VALUE_HEADERSIZE
Definition: regimpl.hxx:34
#define VALUE_TYPEOFFSET
Definition: regimpl.hxx:35
#define REG_GUARD(mutex)
Definition: regimpl.hxx:38
STRINGLIST
The key has a value of type ascii string list.
Definition: regtype.h:75
DESTROY_REGISTRY_FAILED
destroy a registry failed. There are may be any open keys.
Definition: regtype.h:93
INVALID_REGISTRY
registry is in an invalid state or the registry does not point to a valid registry data file.
Definition: regtype.h:101
VALUE_NOT_EXISTS
the key has no value
Definition: regtype.h:119
void * RegKeyHandle
defines the type of a registry key handle used in the C API.
Definition: regtype.h:29
KEY_NOT_OPEN
the key or key handle points to an invalid key or closed key.
Definition: regtype.h:104
UNICODE
The key has a value of type unicode string.
Definition: regtype.h:69
INVALID_KEY
the key is not in a valid state.
Definition: regtype.h:116
RegAccessMode
defines the open/access mode of the registry.
Definition: regtype.h:41
@ READWRITE
This mode allows readonly access.
REGISTRY_NOT_EXISTS
registry does not exists.
Definition: regtype.h:89
NOT_DEFINED
The key has no value or the value type is unknown.
Definition: regtype.h:63
CANNOT_OPEN_FOR_READWRITE
registry cannot be opened with readwrite access because the registry is already open with readwrite a...
Definition: regtype.h:97
INVALID_KEYNAME
the keyname is invalid.
Definition: regtype.h:114
DELETE_KEY_FAILED
the specified key cannot be deleted. Maybe an open key handle exists to this key.
Definition: regtype.h:110
enum SAL_DLLPUBLIC_RTTI RegValueType
defines the type of a key value.
Definition: regtype.h:61
CREATE_KEY_FAILED
the key with the specified keyname cannot be created.
Definition: regtype.h:108
DELETE_VALUE_FAILED
deleting of the key value failed.
Definition: regtype.h:123
LONGLIST
The key has a value of type long list.
Definition: regtype.h:73
KEY_NOT_EXISTS
the specified keyname points to a nonexisting key.
Definition: regtype.h:106
BINARY
The key has a value of type binary.
Definition: regtype.h:71
LONG
The key has a value of type long.
Definition: regtype.h:65
STRING
The key has a value of type ascii string.
Definition: regtype.h:67
NO_ERROR
no error.
Definition: regtype.h:84
enum SAL_DLLPUBLIC_RTTI RegError
specifies the possible error codes which can occur using the registry API.
Definition: regtype.h:82
sal_Unicode m_pszName[STORE_MAXIMUM_NAMESIZE]
sal_uInt32 m_nAttrib
sal_Int32 m_nLength
constexpr sal_uInt32 STORE_ATTRIB_ISDIR
storeAccessMode
unsigned char sal_uInt8
storeError
store_E_LockingViolation
store_E_None
store_E_NotExists
store_E_WrongFormat
sal_uInt16 sal_Unicode
@ TYPE_PARAMETER
Indicates a type parameter of a polymorphic struct type template.
@ EXPORTS
the service exports the specified service that means this service provides also the specified service...
@ SUPPORTS
the service support the interface that means an implementation of this service must implement this in...
RTParamMode
specifies the mode of a parameter.
Definition: types.hxx:274
@ RT_PARAM_INOUT
indicates a in and out parameter which is used also by reference
Definition: types.hxx:285
@ RT_PARAM_REST
Indicates a rest parameter (currently only valid for service constructors).
Definition: types.hxx:297
@ RT_PARAM_IN
indicates a pure in parameter which is used by value
Definition: types.hxx:279
@ RT_PARAM_OUT
indicates a pure out parameter which is used by reference
Definition: types.hxx:282
@ RT_TYPE_BYTE
Definition: types.hxx:201
@ RT_TYPE_FLOAT
Definition: types.hxx:208
@ RT_TYPE_INT64
Definition: types.hxx:206
@ RT_TYPE_INT32
Definition: types.hxx:204
@ RT_TYPE_DOUBLE
Definition: types.hxx:209
@ RT_TYPE_NONE
Definition: types.hxx:199
@ RT_TYPE_UINT16
Definition: types.hxx:203
@ RT_TYPE_BOOL
Definition: types.hxx:200
@ RT_TYPE_STRING
Definition: types.hxx:210
@ RT_TYPE_UINT64
Definition: types.hxx:207
@ RT_TYPE_UINT32
Definition: types.hxx:205
@ RT_TYPE_INT16
Definition: types.hxx:202
RTFieldAccess
specifies the type for the field access.
Definition: types.hxx:133
@ READWRITE
specifies that the property/attribute has read/write access
@ READONLY
specifies a readonly property/attribute
@ PROPERTY
specifies that the field is a property
@ OPTIONAL
specifies a property as optional that means that it must not be implemented.
@ PUBLISHED
Flag for published individual constants.
@ PARAMETERIZED_TYPE
Indicates that a member of a polymorphic struct type template is of a parameterized type.
@ CONST
specifies that the field is a constant or enum value
@ ATTRIBUTE_GET
Indicates an extended attribute getter (that has a 'raises' clause) of an interface type.
@ ATTRIBUTE_SET
Indicates an extended attribute setter (that has a 'raises' clause) of an interface type.
@ ONEWAY
indicates the asynchronous mode of a method
@ TWOWAY
indicated the synchronous mode of a method
@ RT_TYPE_INTERFACE
specifies that the blob represents an interface type.
Definition: types.hxx:40
@ RT_TYPE_MODULE
specifies that the blob represents a module type.
Definition: types.hxx:45
@ RT_TYPE_CONSTANTS
specifies that the blob represents a constants type.
Definition: types.hxx:84
@ RT_TYPE_STRUCT
specifies that the blob represents a struct type.
Definition: types.hxx:50
@ RT_TYPE_SINGLETON
specifies that the blob represents a singleton type (a named object) which refers exactly one existin...
Definition: types.hxx:76
@ RT_TYPE_SERVICE
specifies that the blob represents a service type.
Definition: types.hxx:71
@ RT_TYPE_EXCEPTION
specifies that the blob represents an exception type.
Definition: types.hxx:60
@ RT_TYPE_ENUM
specifies that the blob represents an enum type.
Definition: types.hxx:55
@ RT_TYPE_TYPEDEF
specifies that the blob represents a typedef type.
Definition: types.hxx:65
ResultType type
std::unique_ptr< char[]> aBuffer