Mac OS 9
NameRegistry.h
Go to the documentation of this file.
1 
19 #ifndef __NAMEREGISTRY__
20 #define __NAMEREGISTRY__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #if PRAGMA_ONCE
27 #pragma once
28 #endif
29 
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34 
35 #if PRAGMA_IMPORT
36 #pragma import on
37 #endif
38 
39 #if PRAGMA_STRUCT_ALIGN
40 #pragma options align = power
41 #elif PRAGMA_STRUCT_PACKPUSH
42 #pragma pack(push, 2)
43 #elif PRAGMA_STRUCT_PACK
44 #pragma pack(2)
45 #endif
46 
47  /********************************************************************************
48  *
49  * Foundation Types
50  *
51  */
53  typedef void *RegPropertyValue;
55  typedef UInt32 RegPropertyValueSize;
56  /********************************************************************************
57  *
58  * RegEntryID : The Global x-Namespace Entry Identifier
59  *
60  */
61  struct RegEntryID
62  {
63  UInt32 contents[4];
64  };
65  typedef struct RegEntryID RegEntryID;
66  typedef RegEntryID *RegEntryIDPtr;
67  /********************************************************************************
68  *
69  * Root Entry Name Definitions (Applies to all Names in the RootNameSpace)
70  *
71  * © Names are a colon-separated list of name components. Name components
72  * may not themselves contain colons.
73  * © Names are presented as null-terminated ASCII character strings.
74  * © Names follow similar parsing rules to Apple file system absolute
75  * and relative paths. However the '::' parent directory syntax is
76  * not currently supported.
77  */
79  enum
80  {
81  kRegCStrMaxEntryNameLength = 47
82  };
83 
85  typedef char RegCStrEntryName;
86  typedef char *RegCStrEntryNamePtr;
88  typedef char RegCStrEntryNameBuf[48];
89  typedef char RegCStrPathName;
90  typedef UInt32 RegPathNameSize;
91  enum
92  {
93  kRegPathNameSeparator = ':',
96  };
97 
98  /********************************************************************************
99  *
100  * Property Name and ID Definitions
101  * (Applies to all Properties Regardless of NameSpace)
102  */
103  enum
104  {
105  kRegMaximumPropertyNameLength = 31,
107  };
108 
109  typedef char RegPropertyNameBuf[32];
110  typedef char RegPropertyName;
111  typedef char *RegPropertyNamePtr;
112  /********************************************************************************
113  *
114  * Iteration Operations
115  *
116  * These specify direction when traversing the name relationships
117  */
118  typedef UInt32 RegIterationOp;
119  typedef RegIterationOp RegEntryIterationOp;
120  enum
121  {
123  kRegIterRoot = 0x00000002,
124  kRegIterParents = 0x00000003,
126  kRegIterChildren = 0x00000004,
127  kRegIterSubTrees = 0x00000005,
128  kRegIterDescendants = 0x00000005,
130  kRegIterSibling = 0x00000006,
132  kRegIterContinue = 0x00000001
133  };
134 
135  /********************************************************************************
136  *
137  * Name Entry and Property Modifiers
138  *
139  *
140  *
141  * Modifiers describe special characteristics of names
142  * and properties. Modifiers might be supported for
143  * some names and not others.
144  *
145  * Device Drivers should not rely on functionality
146  * specified as a modifier.
147  */
148  typedef UInt32 RegModifiers;
149  typedef RegModifiers RegEntryModifiers;
150  typedef RegModifiers RegPropertyModifiers;
151  enum
152  {
153  kRegNoModifiers = 0x00000000,
156  0x00FF0000,
157  kRegModifierMask = (long)0xFF000000
158  };
159 
161  enum
162  {
163  kRegPropertyValueIsSavedToNVRAM =
164  0x00000020,
166  0x00000040
167  };
168 
171  enum
172  {
173  LatestNR_PEFVersion =
174  0x01030000
175  };
176 
182 
183  enum
184  {
185  kSelectRegistryEntryIDInit = 0,
186  kSelectRegistryEntryIDCompare = 1,
187  kSelectRegistryEntryIDCopy = 2,
188  kSelectRegistryEntryIDDispose = 3,
189  kSelectRegistryCStrEntryCreate = 4,
190  kSelectRegistryEntryDelete = 5,
191  kSelectRegistryEntryCopy = 6,
192  kSelectRegistryEntryIterateCreate = 7,
193  kSelectRegistryEntryIterateDispose = 8,
194  kSelectRegistryEntryIterateSet = 9,
195  kSelectRegistryEntryIterate = 10,
196  kSelectRegistryEntrySearch = 11,
197  kSelectRegistryCStrEntryLookup = 12,
198  kSelectRegistryEntryToPathSize = 13,
199  kSelectRegistryCStrEntryToPath = 14,
200  kSelectRegistryCStrEntryToName = 15,
201  kSelectRegistryPropertyCreate = 16,
202  kSelectRegistryPropertyDelete = 17,
203  kSelectRegistryPropertyRename = 18,
204  kSelectRegistryPropertyIterateCreate = 19,
205  kSelectRegistryPropertyIterateDispose = 20,
206  kSelectRegistryPropertyIterate = 21,
207  kSelectRegistryPropertyGetSize = 22,
208  kSelectRegistryPropertyGet = 23,
209  kSelectRegistryPropertySet = 24,
210  kSelectRegistryEntryGetMod = 25,
211  kSelectRegistryEntrySetMod = 26,
212  kSelectRegistryPropertyGetMod = 27,
213  kSelectRegistryPropertySetMod = 28,
214  kSelectRegistryEntryMod = 29,
215  kSelectRegistryEntryPropertyMod =
216  30,
218  kSelectRegistryHighestSelector = kSelectRegistryEntryPropertyMod
219  };
220 
226 
234 #if CALL_NOT_IN_CARBON
243  OSStatus
245 
261  Boolean
263 
275  OSStatus
277 
289  OSStatus
291 
306  OSStatus
308  const RegCStrPathName *name, RegEntryID *newEntry);
309 
318  OSStatus
320 
329  OSStatus
330  RegistryEntryCopy(RegEntryID *parentEntryID, RegEntryID *sourceDevice,
331  RegEntryID *destDevice);
332 
363 #endif
365  typedef struct OpaqueRegEntryIter *RegEntryIter;
370 #if CALL_NOT_IN_CARBON
379  OSStatus
381 
390  OSStatus
392 
404  OSStatus
405  RegistryEntryIterateSet(RegEntryIter *cookie, const RegEntryID *startEntryID);
406 
421  OSStatus
422  RegistryEntryIterate(RegEntryIter *cookie, RegEntryIterationOp relationship,
423  RegEntryID *foundEntry, Boolean *done);
424 
439  OSStatus
440  RegistryEntrySearch(RegEntryIter *cookie, RegEntryIterationOp relationship,
441  RegEntryID *foundEntry, Boolean *done,
442  const RegPropertyName *propertyName,
443  const void *propertyValue,
444  RegPropertyValueSize propertySize);
445 
464  OSStatus
465  RegistryCStrEntryLookup(const RegEntryID *searchPointID,
466  const RegCStrPathName *pathName, RegEntryID *foundEntry);
467 
482  OSStatus
483  RegistryEntryToPathSize(const RegEntryID *entryID, RegPathNameSize *pathSize);
484 
493  OSStatus
494  RegistryCStrEntryToPath(const RegEntryID *entryID, RegCStrPathName *pathName,
495  RegPathNameSize pathSize);
496 
511  OSStatus
512  RegistryCStrEntryToName(const RegEntryID *entryID, RegEntryID *parentEntry,
513  RegCStrEntryName *nameComponent, Boolean *done);
514 
520 
531  OSStatus
533  const RegPropertyName *propertyName,
534  const void *propertyValue,
535  RegPropertyValueSize propertySize);
536 
545  OSStatus
547  const RegPropertyName *propertyName);
548 
557  OSStatus
558  RegistryPropertyRename(const RegEntryID *entry, const RegPropertyName *oldName,
559  const RegPropertyName *newName);
560 
565 #endif
567  typedef struct OpaqueRegPropertyIter *RegPropertyIter;
568 #if CALL_NOT_IN_CARBON
577  OSStatus
579 
588  OSStatus
590 
599  OSStatus
600  RegistryPropertyIterate(RegPropertyIter *cookie, RegPropertyName *foundProperty,
601  Boolean *done);
602 
615  OSStatus
617  const RegPropertyName *propertyName,
618  RegPropertyValueSize *propertySize);
619 
633  OSStatus
635  const RegPropertyName *propertyName, void *propertyValue,
636  RegPropertyValueSize *propertySize);
637 
646  OSStatus
648  const RegPropertyName *propertyName,
649  const void *propertyValue,
650  RegPropertyValueSize propertySize);
651 
657 
677  OSStatus
678  RegistryEntryGetMod(const RegEntryID *entry, RegEntryModifiers *modifiers);
679 
688  OSStatus
689  RegistryEntrySetMod(const RegEntryID *entry, RegEntryModifiers modifiers);
690 
702  OSStatus
703  RegistryPropertyGetMod(const RegEntryID *entry, const RegPropertyName *name,
704  RegPropertyModifiers *modifiers);
705 
714  OSStatus
715  RegistryPropertySetMod(const RegEntryID *entry, const RegPropertyName *name,
716  RegPropertyModifiers modifiers);
717 
729  OSStatus
730  RegistryEntryMod(RegEntryIter *cookie, RegEntryIterationOp relationship,
731  RegEntryID *foundEntry, Boolean *done,
732  RegEntryModifiers matchingModifiers);
733 
746  OSStatus
747  RegistryEntryPropertyMod(RegEntryIter *cookie, RegEntryIterationOp relationship,
748  RegEntryID *foundEntry, Boolean *done,
749  RegPropertyModifiers matchingModifiers);
750 
751 #endif
753 #if PRAGMA_STRUCT_ALIGN
754 #pragma options align = reset
755 #elif PRAGMA_STRUCT_PACKPUSH
756 #pragma pack(pop)
757 #elif PRAGMA_STRUCT_PACK
758 #pragma pack()
759 #endif
760 
761 #ifdef PRAGMA_IMPORT_OFF
762 #pragma import off
763 #elif PRAGMA_IMPORT
764 #pragma import reset
765 #endif
766 
767 #ifdef __cplusplus
768 }
769 #endif
770 
771 #endif
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
Boolean RegistryEntryIDCompare(const RegEntryID *id1, const RegEntryID *id2)
OSStatus RegistryCStrEntryLookup(const RegEntryID *searchPointID, const RegCStrPathName *pathName, RegEntryID *foundEntry)
OSStatus RegistryEntryPropertyMod(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done, RegPropertyModifiers matchingModifiers)
OSStatus RegistryEntryIDInit(RegEntryID *id)
OSStatus RegistryEntryIterateCreate(RegEntryIter *cookie)
@ kRegPropertyValueIsSavedToDisk
Definition: NameRegistry.h:165
OSStatus RegistryEntryToPathSize(const RegEntryID *entryID, RegPathNameSize *pathSize)
OSStatus RegistryEntryMod(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done, RegEntryModifiers matchingModifiers)
OSStatus RegistryEntryIDDispose(RegEntryID *id)
OSStatus RegistryCStrEntryToPath(const RegEntryID *entryID, RegCStrPathName *pathName, RegPathNameSize pathSize)
OSStatus RegistryPropertyGet(const RegEntryID *entryID, const RegPropertyName *propertyName, void *propertyValue, RegPropertyValueSize *propertySize)
OSStatus RegistryPropertyRename(const RegEntryID *entry, const RegPropertyName *oldName, const RegPropertyName *newName)
OSStatus RegistryCStrEntryToName(const RegEntryID *entryID, RegEntryID *parentEntry, RegCStrEntryName *nameComponent, Boolean *done)
void * RegPropertyValue
Definition: NameRegistry.h:53
@ kRegIterSubTrees
Definition: NameRegistry.h:127
@ kRegIterRoot
Definition: NameRegistry.h:123
@ kRegIterSibling
Definition: NameRegistry.h:130
@ kRegIterParents
Definition: NameRegistry.h:124
@ kRegIterChildren
Definition: NameRegistry.h:126
@ kRegIterContinue
Definition: NameRegistry.h:132
@ kRegIterDescendants
Definition: NameRegistry.h:128
OSStatus RegistryEntryCopy(RegEntryID *parentEntryID, RegEntryID *sourceDevice, RegEntryID *destDevice)
char RegCStrEntryNameBuf[48]
Definition: NameRegistry.h:88
OSStatus RegistryEntryIterate(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done)
OSStatus RegistryCStrEntryCreate(const RegEntryID *parentEntry, const RegCStrPathName *name, RegEntryID *newEntry)
OSStatus RegistryEntryIDCopy(const RegEntryID *src, RegEntryID *dst)
@ kRegPathNameTerminator
Definition: NameRegistry.h:95
@ kRegEntryNameTerminator
Definition: NameRegistry.h:94
struct OpaqueRegPropertyIter * RegPropertyIter
Definition: NameRegistry.h:567
OSStatus RegistryEntrySetMod(const RegEntryID *entry, RegEntryModifiers modifiers)
OSStatus RegistryPropertyIterateDispose(RegPropertyIter *cookie)
OSStatus RegistryEntryDelete(const RegEntryID *id)
OSStatus RegistryPropertySetMod(const RegEntryID *entry, const RegPropertyName *name, RegPropertyModifiers modifiers)
OSStatus RegistryPropertyGetSize(const RegEntryID *entryID, const RegPropertyName *propertyName, RegPropertyValueSize *propertySize)
@ kSelectRegistryHighestSelector
Definition: NameRegistry.h:218
OSStatus RegistryPropertySet(const RegEntryID *entryID, const RegPropertyName *propertyName, const void *propertyValue, RegPropertyValueSize propertySize)
OSStatus RegistryPropertyIterateCreate(const RegEntryID *entry, RegPropertyIter *cookie)
OSStatus RegistryPropertyCreate(const RegEntryID *entryID, const RegPropertyName *propertyName, const void *propertyValue, RegPropertyValueSize propertySize)
@ kRegNameSpaceModifierMask
Definition: NameRegistry.h:155
@ kRegModifierMask
Definition: NameRegistry.h:157
@ kRegUniversalModifierMask
Definition: NameRegistry.h:154
OSStatus RegistryPropertyDelete(const RegEntryID *entryID, const RegPropertyName *propertyName)
struct OpaqueRegEntryIter * RegEntryIter
Definition: NameRegistry.h:365
UInt32 RegPropertyValueSize
Definition: NameRegistry.h:55
OSStatus RegistryEntryIterateDispose(RegEntryIter *cookie)
OSStatus RegistryPropertyGetMod(const RegEntryID *entry, const RegPropertyName *name, RegPropertyModifiers *modifiers)
OSStatus RegistryEntryIterateSet(RegEntryIter *cookie, const RegEntryID *startEntryID)
char RegCStrEntryName
Definition: NameRegistry.h:85
OSStatus RegistryEntryGetMod(const RegEntryID *entry, RegEntryModifiers *modifiers)
OSStatus RegistryPropertyIterate(RegPropertyIter *cookie, RegPropertyName *foundProperty, Boolean *done)
@ kRegPropertyNameTerminator
Definition: NameRegistry.h:106
OSStatus RegistryEntrySearch(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done, const RegPropertyName *propertyName, const void *propertyValue, RegPropertyValueSize propertySize)
Definition: NameRegistry.h:62