NameRegistry.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. {
  2. File: NameRegistry.p
  3. Contains: NameRegistry Interfaces
  4. Version: Technology: MacOS
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. { Pascal Translation Updated: Gale R Paeper, <[email protected]>, 2006 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 200
  15. Please report any bugs to <[email protected]>
  16. }
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$CALLING MWPASCAL}
  22. unit NameRegistry;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  25. {$setc GAP_INTERFACES_VERSION := $0200}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __i386__ and defined CPUI386}
  41. {$setc __i386__ := 1}
  42. {$elsec}
  43. {$setc __i386__ := 0}
  44. {$endc}
  45. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  46. {$error Conflicting definitions for __ppc__ and __i386__}
  47. {$endc}
  48. {$ifc defined __ppc__ and __ppc__}
  49. {$setc TARGET_CPU_PPC := TRUE}
  50. {$setc TARGET_CPU_X86 := FALSE}
  51. {$elifc defined __i386__ and __i386__}
  52. {$setc TARGET_CPU_PPC := FALSE}
  53. {$setc TARGET_CPU_X86 := TRUE}
  54. {$elsec}
  55. {$error Neither __ppc__ nor __i386__ is defined.}
  56. {$endc}
  57. {$setc TARGET_CPU_PPC_64 := FALSE}
  58. {$ifc defined FPC_BIG_ENDIAN}
  59. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  60. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  61. {$elifc defined FPC_LITTLE_ENDIAN}
  62. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  63. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  64. {$elsec}
  65. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  66. {$endc}
  67. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  68. {$setc CALL_NOT_IN_CARBON := FALSE}
  69. {$setc OLDROUTINENAMES := FALSE}
  70. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  71. {$setc OPAQUE_UPP_TYPES := TRUE}
  72. {$setc OTCARBONAPPLICATION := TRUE}
  73. {$setc OTKERNEL := FALSE}
  74. {$setc PM_USE_SESSION_APIS := TRUE}
  75. {$setc TARGET_API_MAC_CARBON := TRUE}
  76. {$setc TARGET_API_MAC_OS8 := FALSE}
  77. {$setc TARGET_API_MAC_OSX := TRUE}
  78. {$setc TARGET_CARBON := TRUE}
  79. {$setc TARGET_CPU_68K := FALSE}
  80. {$setc TARGET_CPU_MIPS := FALSE}
  81. {$setc TARGET_CPU_SPARC := FALSE}
  82. {$setc TARGET_OS_MAC := TRUE}
  83. {$setc TARGET_OS_UNIX := FALSE}
  84. {$setc TARGET_OS_WIN32 := FALSE}
  85. {$setc TARGET_RT_MAC_68881 := FALSE}
  86. {$setc TARGET_RT_MAC_CFM := FALSE}
  87. {$setc TARGET_RT_MAC_MACHO := TRUE}
  88. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  89. {$setc TYPE_BOOL := FALSE}
  90. {$setc TYPE_EXTENDED := FALSE}
  91. {$setc TYPE_LONGLONG := TRUE}
  92. uses MacTypes;
  93. {$ALIGN POWER}
  94. {******************************************************************************
  95. *
  96. * Foundation Types
  97. *
  98. }
  99. { Value of a property }
  100. type
  101. RegPropertyValue = Ptr;
  102. { Length of property value }
  103. RegPropertyValueSize = UInt32;
  104. { ******************************************************************************
  105. *
  106. * RegEntryID : The Global x-Namespace Entry Identifier
  107. *
  108. }
  109. RegEntryIDPtr = ^RegEntryID;
  110. RegEntryID = record
  111. contents: array [0..3] of UInt32;
  112. end;
  113. { ******************************************************************************
  114. *
  115. * Root Entry Name Definitions (Applies to all Names in the RootNameSpace)
  116. *
  117. * ¥ Names are a colon-separated list of name components. Name components
  118. * may not themselves contain colons.
  119. * ¥ Names are presented as null-terminated ASCII character strings.
  120. * ¥ Names follow similar parsing rules to Apple file system absolute
  121. * and relative paths. However the '::' parent directory syntax is
  122. * not currently supported.
  123. }
  124. { Max length of Entry Name }
  125. const
  126. kRegCStrMaxEntryNameLength = 47;
  127. { Entry Names are single byte ASCII }
  128. type
  129. RegCStrEntryName = char;
  130. RegCStrEntryNamePtr = CStringPtr;
  131. { length of RegCStrEntryNameBuf = kRegCStrMaxEntryNameLength+1 }
  132. RegCStrEntryNameBuf = packed array [0..47] of char;
  133. RegCStrPathName = char;
  134. RegPathNameSize = UInt32;
  135. RegCStrPathNamePtr = CStringPtr;
  136. const
  137. kRegPathNameSeparator = 58; { 0x3A }
  138. kRegEntryNameTerminator = $00; { '\0' }
  139. kRegPathNameTerminator = $00; { '\0' }
  140. { ******************************************************************************
  141. *
  142. * Property Name and ID Definitions
  143. * (Applies to all Properties Regardless of NameSpace)
  144. }
  145. kRegMaximumPropertyNameLength = 31; { Max length of Property Name }
  146. kRegPropertyNameTerminator = $00; { '\0' }
  147. type
  148. RegPropertyNameBuf = packed array [0..31] of char;
  149. RegPropertyName = char;
  150. RegPropertyNamePtr = CStringPtr;
  151. { ******************************************************************************
  152. *
  153. * Iteration Operations
  154. *
  155. * These specify direction when traversing the name relationships
  156. }
  157. RegIterationOp = UInt32;
  158. RegEntryIterationOp = RegIterationOp;
  159. const
  160. { Absolute locations }
  161. kRegIterRoot = $00000002; { "Upward" Relationships }
  162. kRegIterParents = $00000003; { include all parent(s) of entry }
  163. { "Downward" Relationships }
  164. kRegIterChildren = $00000004; { include all children }
  165. kRegIterSubTrees = $00000005; { include all sub trees of entry }
  166. kRegIterDescendants = $00000005; { include all descendants of entry }
  167. { "Horizontal" Relationships }
  168. kRegIterSibling = $00000006; { include all siblings }
  169. { Keep doing the same thing }
  170. kRegIterContinue = $00000001;
  171. { ******************************************************************************
  172. *
  173. * Name Entry and Property Modifiers
  174. *
  175. *
  176. *
  177. * Modifiers describe special characteristics of names
  178. * and properties. Modifiers might be supported for
  179. * some names and not others.
  180. *
  181. * Device Drivers should not rely on functionality
  182. * specified as a modifier.
  183. }
  184. type
  185. RegModifiers = UInt32;
  186. RegEntryModifiers = RegModifiers;
  187. RegPropertyModifiers = RegModifiers;
  188. const
  189. kRegNoModifiers = $00000000; { no entry modifiers in place }
  190. kRegUniversalModifierMask = $0000FFFF; { mods to all entries }
  191. kRegNameSpaceModifierMask = $00FF0000; { mods to all entries within namespace }
  192. kRegModifierMask = $FF000000; { mods to just this entry }
  193. { Universal Property Modifiers }
  194. kRegPropertyValueIsSavedToNVRAM = $00000020; { property is non-volatile (saved in NVRAM) }
  195. kRegPropertyValueIsSavedToDisk = $00000040; { property is non-volatile (saved on disk) }
  196. { NameRegistry version, Gestalt/PEF-style -- MUST BE KEPT IN SYNC WITH MAKEFILE !! }
  197. LatestNR_PEFVersion = $01030000; { latest NameRegistryLib version (Gestalt/PEF-style) }
  198. { ///////////////////////
  199. //
  200. // The Registry API
  201. //
  202. /////////////////////// }
  203. { NameRegistry dispatch indexes }
  204. kSelectRegistryEntryIDInit = 0;
  205. kSelectRegistryEntryIDCompare = 1;
  206. kSelectRegistryEntryIDCopy = 2;
  207. kSelectRegistryEntryIDDispose = 3;
  208. kSelectRegistryCStrEntryCreate = 4;
  209. kSelectRegistryEntryDelete = 5;
  210. kSelectRegistryEntryCopy = 6;
  211. kSelectRegistryEntryIterateCreate = 7;
  212. kSelectRegistryEntryIterateDispose = 8;
  213. kSelectRegistryEntryIterateSet = 9;
  214. kSelectRegistryEntryIterate = 10;
  215. kSelectRegistryEntrySearch = 11;
  216. kSelectRegistryCStrEntryLookup = 12;
  217. kSelectRegistryEntryToPathSize = 13;
  218. kSelectRegistryCStrEntryToPath = 14;
  219. kSelectRegistryCStrEntryToName = 15;
  220. kSelectRegistryPropertyCreate = 16;
  221. kSelectRegistryPropertyDelete = 17;
  222. kSelectRegistryPropertyRename = 18;
  223. kSelectRegistryPropertyIterateCreate = 19;
  224. kSelectRegistryPropertyIterateDispose = 20;
  225. kSelectRegistryPropertyIterate = 21;
  226. kSelectRegistryPropertyGetSize = 22;
  227. kSelectRegistryPropertyGet = 23;
  228. kSelectRegistryPropertySet = 24;
  229. kSelectRegistryEntryGetMod = 25;
  230. kSelectRegistryEntrySetMod = 26;
  231. kSelectRegistryPropertyGetMod = 27;
  232. kSelectRegistryPropertySetMod = 28;
  233. kSelectRegistryEntryMod = 29;
  234. kSelectRegistryEntryPropertyMod = 30; { if you add more selectors here, remember to change 'kSelectRegistryHighestSelector' below }
  235. kSelectRegistryHighestSelector = 30;
  236. { ///////////////////////
  237. //
  238. // Entry Management
  239. //
  240. /////////////////////// }
  241. { -------------------------------
  242. * EntryID handling
  243. }
  244. {
  245. * Initialize an EntryID to a known invalid state
  246. * note: invalid != uninitialized
  247. }
  248. {$ifc CALL_NOT_IN_CARBON}
  249. {
  250. * RegistryEntryIDInit()
  251. *
  252. * Availability:
  253. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  254. * CarbonLib: not available
  255. * Mac OS X: not available
  256. }
  257. function RegistryEntryIDInit(var id: RegEntryID): OSStatus; external name '_RegistryEntryIDInit';
  258. {
  259. * Compare EntryID's for equality or if invalid
  260. *
  261. * If a NULL value is given for either id1 or id2, the other id
  262. * is compared with an invalid ID. If both are NULL, the id's
  263. * are consided equal (result = true).
  264. }
  265. {
  266. * RegistryEntryIDCompare()
  267. *
  268. * Availability:
  269. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  270. * CarbonLib: not available
  271. * Mac OS X: not available
  272. }
  273. function RegistryEntryIDCompare(const (*var*) id1: RegEntryID; const (*var*) id2: RegEntryID): boolean; external name '_RegistryEntryIDCompare';
  274. {
  275. * Copy an EntryID
  276. }
  277. {
  278. * RegistryEntryIDCopy()
  279. *
  280. * Availability:
  281. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  282. * CarbonLib: not available
  283. * Mac OS X: not available
  284. }
  285. function RegistryEntryIDCopy(const (*var*) src: RegEntryID; var dst: RegEntryID): OSStatus; external name '_RegistryEntryIDCopy';
  286. {
  287. * Free an ID so it can be reused.
  288. }
  289. {
  290. * RegistryEntryIDDispose()
  291. *
  292. * Availability:
  293. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  294. * CarbonLib: not available
  295. * Mac OS X: not available
  296. }
  297. function RegistryEntryIDDispose(var id: RegEntryID): OSStatus; external name '_RegistryEntryIDDispose';
  298. {-------------------------------
  299. * Adding and removing entries
  300. *
  301. * If (parentEntry) is NULL, the name is assumed
  302. * to be a rooted path. It is rooted to an anonymous, unnamed root.
  303. }
  304. {
  305. * RegistryCStrEntryCreate()
  306. *
  307. * Availability:
  308. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  309. * CarbonLib: not available
  310. * Mac OS X: not available
  311. }
  312. function RegistryCStrEntryCreate(const (*var*) parentEntry: RegEntryID; {const} name: {variable-size-array} RegCStrPathNamePtr; var newEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryCreate';
  313. {
  314. * RegistryEntryDelete()
  315. *
  316. * Availability:
  317. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  318. * CarbonLib: not available
  319. * Mac OS X: not available
  320. }
  321. function RegistryEntryDelete(const (*var*) id: RegEntryID): OSStatus; external name '_RegistryEntryDelete';
  322. {
  323. * RegistryEntryCopy()
  324. *
  325. * Availability:
  326. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  327. * CarbonLib: not available
  328. * Mac OS X: not available
  329. }
  330. function RegistryEntryCopy(var parentEntryID: RegEntryID; var sourceDevice: RegEntryID; var destDevice: RegEntryID): OSStatus; external name '_RegistryEntryCopy';
  331. {---------------------------
  332. * Traversing the namespace
  333. *
  334. * To support arbitrary namespace implementations in the future,
  335. * I have hidden the form that the place pointer takes. The previous
  336. * interface exposed the place pointer by specifying it as a
  337. * RegEntryID.
  338. *
  339. * I have also removed any notion of returning the entries
  340. * in a particular order, because an implementation might
  341. * return the names in semi-random order. Many name service
  342. * implementations will store the names in a hashed lookup
  343. * table.
  344. *
  345. * Writing code to traverse some set of names consists of
  346. * a call to begin the iteration, the iteration loop, and
  347. * a call to end the iteration. The begin call initializes
  348. * the iteration cookie data structure. The call to end the
  349. * iteration should be called even in the case of error so
  350. * that allocated data structures can be freed.
  351. *
  352. * Create(...)
  353. * do (
  354. * Iterate(...);
  355. * ) while (!done);
  356. * Dispose(...);
  357. *
  358. * This is the basic code structure for callers of the iteration
  359. * interface.
  360. }
  361. {$endc} {CALL_NOT_IN_CARBON}
  362. type
  363. RegEntryIter = ^SInt32; { an opaque 32-bit type }
  364. RegEntryIterPtr = ^RegEntryIter; { when a var xx:RegEntryIter parameter can be nil, it is changed to xx: RegEntryIterPtr }
  365. {
  366. * create/dispose the iterator structure
  367. * defaults to root with relationship = kRegIterDescendants
  368. }
  369. {$ifc CALL_NOT_IN_CARBON}
  370. {
  371. * RegistryEntryIterateCreate()
  372. *
  373. * Availability:
  374. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  375. * CarbonLib: not available
  376. * Mac OS X: not available
  377. }
  378. function RegistryEntryIterateCreate(var cookie: RegEntryIter): OSStatus; external name '_RegistryEntryIterateCreate';
  379. {
  380. * RegistryEntryIterateDispose()
  381. *
  382. * Availability:
  383. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  384. * CarbonLib: not available
  385. * Mac OS X: not available
  386. }
  387. function RegistryEntryIterateDispose(var cookie: RegEntryIter): OSStatus; external name '_RegistryEntryIterateDispose';
  388. {
  389. * set Entry Iterator to specified entry
  390. }
  391. {
  392. * RegistryEntryIterateSet()
  393. *
  394. * Availability:
  395. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  396. * CarbonLib: not available
  397. * Mac OS X: not available
  398. }
  399. function RegistryEntryIterateSet(var cookie: RegEntryIter; const (*var*) startEntryID: RegEntryID): OSStatus; external name '_RegistryEntryIterateSet';
  400. {
  401. * Return each value of the iteration
  402. *
  403. * return entries related to the current entry
  404. * with the specified relationship
  405. }
  406. {
  407. * RegistryEntryIterate()
  408. *
  409. * Availability:
  410. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  411. * CarbonLib: not available
  412. * Mac OS X: not available
  413. }
  414. function RegistryEntryIterate(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean): OSStatus; external name '_RegistryEntryIterate';
  415. {
  416. * return entries with the specified property
  417. *
  418. * A NULL RegPropertyValue pointer will return an
  419. * entry with the property containing any value.
  420. }
  421. {
  422. * RegistryEntrySearch()
  423. *
  424. * Availability:
  425. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  426. * CarbonLib: not available
  427. * Mac OS X: not available
  428. }
  429. function RegistryEntrySearch(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryEntrySearch';
  430. {--------------------------------
  431. * Find a name in the namespace
  432. *
  433. * This is the fast lookup mechanism.
  434. * NOTE: A reverse lookup mechanism
  435. * has not been provided because
  436. * some name services may not
  437. * provide a fast, general reverse
  438. * lookup.
  439. }
  440. {
  441. * RegistryCStrEntryLookup()
  442. *
  443. * Availability:
  444. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  445. * CarbonLib: not available
  446. * Mac OS X: not available
  447. }
  448. function RegistryCStrEntryLookup(const (*var*) searchPointID: RegEntryID; {const} pathName: {variable-size-array} RegCStrPathNamePtr; var foundEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryLookup';
  449. {---------------------------------------------
  450. * Convert an entry to a rooted name string
  451. *
  452. * A utility routine to turn an Entry ID
  453. * back into a name string.
  454. }
  455. {
  456. * RegistryEntryToPathSize()
  457. *
  458. * Availability:
  459. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  460. * CarbonLib: not available
  461. * Mac OS X: not available
  462. }
  463. function RegistryEntryToPathSize(const (*var*) entryID: RegEntryID; var pathSize: RegPathNameSize): OSStatus; external name '_RegistryEntryToPathSize';
  464. {
  465. * RegistryCStrEntryToPath()
  466. *
  467. * Availability:
  468. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  469. * CarbonLib: not available
  470. * Mac OS X: not available
  471. }
  472. function RegistryCStrEntryToPath(const (*var*) entryID: RegEntryID; var pathName: RegCStrPathName; pathSize: RegPathNameSize): OSStatus; external name '_RegistryCStrEntryToPath';
  473. {
  474. * Parse a path name.
  475. *
  476. * Retrieve the last component of the path, and
  477. * return a spec for the parent.
  478. }
  479. {
  480. * RegistryCStrEntryToName()
  481. *
  482. * Availability:
  483. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  484. * CarbonLib: not available
  485. * Mac OS X: not available
  486. }
  487. function RegistryCStrEntryToName(const (*var*) entryID: RegEntryID; var parentEntry: RegEntryID; var nameComponent: RegCStrEntryName; var done: boolean): OSStatus; external name '_RegistryCStrEntryToName';
  488. { //////////////////////////////////////////////////////
  489. //
  490. // Property Management
  491. //
  492. ////////////////////////////////////////////////////// }
  493. {-------------------------------
  494. * Adding and removing properties
  495. }
  496. {
  497. * RegistryPropertyCreate()
  498. *
  499. * Availability:
  500. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  501. * CarbonLib: not available
  502. * Mac OS X: not available
  503. }
  504. function RegistryPropertyCreate(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyCreate';
  505. {
  506. * RegistryPropertyDelete()
  507. *
  508. * Availability:
  509. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  510. * CarbonLib: not available
  511. * Mac OS X: not available
  512. }
  513. function RegistryPropertyDelete(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr): OSStatus; external name '_RegistryPropertyDelete';
  514. {
  515. * RegistryPropertyRename()
  516. *
  517. * Availability:
  518. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  519. * CarbonLib: not available
  520. * Mac OS X: not available
  521. }
  522. function RegistryPropertyRename(const (*var*) entry: RegEntryID; {const} oldName: {variable-size-array} RegPropertyNamePtr; {const} newName: {variable-size-array} RegPropertyNamePtr): OSStatus; external name '_RegistryPropertyRename';
  523. {---------------------------
  524. * Traversing the Properties of a name
  525. *
  526. }
  527. {$endc} {CALL_NOT_IN_CARBON}
  528. type
  529. RegPropertyIter = ^SInt32; { an opaque 32-bit type }
  530. RegPropertyIterPtr = ^RegPropertyIter; { when a var xx:RegPropertyIter parameter can be nil, it is changed to xx: RegPropertyIterPtr }
  531. {$ifc CALL_NOT_IN_CARBON}
  532. {
  533. * RegistryPropertyIterateCreate()
  534. *
  535. * Availability:
  536. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  537. * CarbonLib: not available
  538. * Mac OS X: not available
  539. }
  540. function RegistryPropertyIterateCreate(const (*var*) entry: RegEntryID; var cookie: RegPropertyIter): OSStatus; external name '_RegistryPropertyIterateCreate';
  541. {
  542. * RegistryPropertyIterateDispose()
  543. *
  544. * Availability:
  545. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  546. * CarbonLib: not available
  547. * Mac OS X: not available
  548. }
  549. function RegistryPropertyIterateDispose(var cookie: RegPropertyIter): OSStatus; external name '_RegistryPropertyIterateDispose';
  550. {
  551. * RegistryPropertyIterate()
  552. *
  553. * Availability:
  554. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  555. * CarbonLib: not available
  556. * Mac OS X: not available
  557. }
  558. function RegistryPropertyIterate(var cookie: RegPropertyIter; var foundProperty: RegPropertyName; var done: boolean): OSStatus; external name '_RegistryPropertyIterate';
  559. {
  560. * Get the value of the specified property for the specified entry.
  561. *
  562. }
  563. {
  564. * RegistryPropertyGetSize()
  565. *
  566. * Availability:
  567. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  568. * CarbonLib: not available
  569. * Mac OS X: not available
  570. }
  571. function RegistryPropertyGetSize(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGetSize';
  572. {
  573. * (*propertySize) is the maximum size of the value returned in the buffer
  574. * pointed to by (propertyValue). Upon return, (*propertySize) is the size of the
  575. * value returned.
  576. }
  577. {
  578. * RegistryPropertyGet()
  579. *
  580. * Availability:
  581. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  582. * CarbonLib: not available
  583. * Mac OS X: not available
  584. }
  585. function RegistryPropertyGet(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGet';
  586. {
  587. * RegistryPropertySet()
  588. *
  589. * Availability:
  590. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  591. * CarbonLib: not available
  592. * Mac OS X: not available
  593. }
  594. function RegistryPropertySet(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertySet';
  595. { //////////////////////////////////////////////////////
  596. //
  597. // Modifier Management
  598. //
  599. ////////////////////////////////////////////////////// }
  600. {
  601. * Modifiers describe special characteristics of names
  602. * and properties. Modifiers might be supported for
  603. * some names and not others.
  604. *
  605. * Device Drivers should not rely on functionality
  606. * specified as a modifier. These interfaces
  607. * are for use in writing Experts.
  608. }
  609. {
  610. * Get and Set operators for entry modifiers
  611. }
  612. {
  613. * RegistryEntryGetMod()
  614. *
  615. * Availability:
  616. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  617. * CarbonLib: not available
  618. * Mac OS X: not available
  619. }
  620. function RegistryEntryGetMod(const (*var*) entry: RegEntryID; var modifiers: RegEntryModifiers): OSStatus; external name '_RegistryEntryGetMod';
  621. {
  622. * RegistryEntrySetMod()
  623. *
  624. * Availability:
  625. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  626. * CarbonLib: not available
  627. * Mac OS X: not available
  628. }
  629. function RegistryEntrySetMod(const (*var*) entry: RegEntryID; modifiers: RegEntryModifiers): OSStatus; external name '_RegistryEntrySetMod';
  630. {
  631. * Get and Set operators for property modifiers
  632. }
  633. {
  634. * RegistryPropertyGetMod()
  635. *
  636. * Availability:
  637. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  638. * CarbonLib: not available
  639. * Mac OS X: not available
  640. }
  641. function RegistryPropertyGetMod(const (*var*) entry: RegEntryID; {const} name: {variable-size-array} RegPropertyNamePtr; var modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertyGetMod';
  642. {
  643. * RegistryPropertySetMod()
  644. *
  645. * Availability:
  646. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  647. * CarbonLib: not available
  648. * Mac OS X: not available
  649. }
  650. function RegistryPropertySetMod(const (*var*) entry: RegEntryID; {const} name: {variable-size-array} RegPropertyNamePtr; modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertySetMod';
  651. {
  652. * Iterator operator for entry modifier search
  653. }
  654. {
  655. * RegistryEntryMod()
  656. *
  657. * Availability:
  658. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  659. * CarbonLib: not available
  660. * Mac OS X: not available
  661. }
  662. function RegistryEntryMod(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; matchingModifiers: RegEntryModifiers): OSStatus; external name '_RegistryEntryMod';
  663. {
  664. * Iterator operator for entries with matching
  665. * property modifiers
  666. }
  667. {
  668. * RegistryEntryPropertyMod()
  669. *
  670. * Availability:
  671. * Non-Carbon CFM: in NameRegistryLib 1.0 and later
  672. * CarbonLib: not available
  673. * Mac OS X: not available
  674. }
  675. function RegistryEntryPropertyMod(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; matchingModifiers: RegPropertyModifiers): OSStatus; external name '_RegistryEntryPropertyMod';
  676. {$endc} {CALL_NOT_IN_CARBON}
  677. {$ALIGN MAC68K}
  678. end.