Aliases.pas 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215
  1. {
  2. File: CarbonCore/Aliases.h
  3. Contains: Alias Manager Interfaces.
  4. The contents of this header file are deprecated.
  5. Use Foundation or CoreFoundation URL Bookmarks instead.
  6. Copyright: © 1989-2011 by Apple Inc. All rights reserved.
  7. }
  8. {
  9. Modified for use with Free Pascal
  10. Version 308
  11. Please report any bugs to <[email protected]>
  12. }
  13. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  14. {$mode macpas}
  15. {$modeswitch cblocks}
  16. {$packenum 1}
  17. {$macro on}
  18. {$inline on}
  19. {$calling mwpascal}
  20. {$IFNDEF FPC_DOTTEDUNITS}
  21. unit Aliases;
  22. {$ENDIF FPC_DOTTEDUNITS}
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  25. {$setc GAP_INTERFACES_VERSION := $0308}
  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 CPUPOWERPC32}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  41. {$setc __ppc64__ := 1}
  42. {$elsec}
  43. {$setc __ppc64__ := 0}
  44. {$endc}
  45. {$ifc not defined __i386__ and defined CPUI386}
  46. {$setc __i386__ := 1}
  47. {$elsec}
  48. {$setc __i386__ := 0}
  49. {$endc}
  50. {$ifc not defined __x86_64__ and defined CPUX86_64}
  51. {$setc __x86_64__ := 1}
  52. {$elsec}
  53. {$setc __x86_64__ := 0}
  54. {$endc}
  55. {$ifc not defined __arm__ and defined CPUARM}
  56. {$setc __arm__ := 1}
  57. {$elsec}
  58. {$setc __arm__ := 0}
  59. {$endc}
  60. {$ifc not defined __arm64__ and defined CPUAARCH64}
  61. {$setc __arm64__ := 1}
  62. {$elsec}
  63. {$setc __arm64__ := 0}
  64. {$endc}
  65. {$ifc defined cpu64}
  66. {$setc __LP64__ := 1}
  67. {$elsec}
  68. {$setc __LP64__ := 0}
  69. {$endc}
  70. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  71. {$error Conflicting definitions for __ppc__ and __i386__}
  72. {$endc}
  73. {$ifc defined __ppc__ and __ppc__}
  74. {$setc TARGET_CPU_PPC := TRUE}
  75. {$setc TARGET_CPU_PPC64 := FALSE}
  76. {$setc TARGET_CPU_X86 := FALSE}
  77. {$setc TARGET_CPU_X86_64 := FALSE}
  78. {$setc TARGET_CPU_ARM := FALSE}
  79. {$setc TARGET_CPU_ARM64 := FALSE}
  80. {$setc TARGET_OS_MAC := TRUE}
  81. {$setc TARGET_OS_IPHONE := FALSE}
  82. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  83. {$setc TARGET_OS_EMBEDDED := FALSE}
  84. {$elifc defined __ppc64__ and __ppc64__}
  85. {$setc TARGET_CPU_PPC := FALSE}
  86. {$setc TARGET_CPU_PPC64 := TRUE}
  87. {$setc TARGET_CPU_X86 := FALSE}
  88. {$setc TARGET_CPU_X86_64 := FALSE}
  89. {$setc TARGET_CPU_ARM := FALSE}
  90. {$setc TARGET_CPU_ARM64 := FALSE}
  91. {$setc TARGET_OS_MAC := TRUE}
  92. {$setc TARGET_OS_IPHONE := FALSE}
  93. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  94. {$setc TARGET_OS_EMBEDDED := FALSE}
  95. {$elifc defined __i386__ and __i386__}
  96. {$setc TARGET_CPU_PPC := FALSE}
  97. {$setc TARGET_CPU_PPC64 := FALSE}
  98. {$setc TARGET_CPU_X86 := TRUE}
  99. {$setc TARGET_CPU_X86_64 := FALSE}
  100. {$setc TARGET_CPU_ARM := FALSE}
  101. {$setc TARGET_CPU_ARM64 := FALSE}
  102. {$ifc defined iphonesim}
  103. {$setc TARGET_OS_MAC := FALSE}
  104. {$setc TARGET_OS_IPHONE := TRUE}
  105. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  106. {$elsec}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$endc}
  111. {$setc TARGET_OS_EMBEDDED := FALSE}
  112. {$elifc defined __x86_64__ and __x86_64__}
  113. {$setc TARGET_CPU_PPC := FALSE}
  114. {$setc TARGET_CPU_PPC64 := FALSE}
  115. {$setc TARGET_CPU_X86 := FALSE}
  116. {$setc TARGET_CPU_X86_64 := TRUE}
  117. {$setc TARGET_CPU_ARM := FALSE}
  118. {$setc TARGET_CPU_ARM64 := FALSE}
  119. {$ifc defined iphonesim}
  120. {$setc TARGET_OS_MAC := FALSE}
  121. {$setc TARGET_OS_IPHONE := TRUE}
  122. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  123. {$elsec}
  124. {$setc TARGET_OS_MAC := TRUE}
  125. {$setc TARGET_OS_IPHONE := FALSE}
  126. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  127. {$endc}
  128. {$setc TARGET_OS_EMBEDDED := FALSE}
  129. {$elifc defined __arm__ and __arm__}
  130. {$setc TARGET_CPU_PPC := FALSE}
  131. {$setc TARGET_CPU_PPC64 := FALSE}
  132. {$setc TARGET_CPU_X86 := FALSE}
  133. {$setc TARGET_CPU_X86_64 := FALSE}
  134. {$setc TARGET_CPU_ARM := TRUE}
  135. {$setc TARGET_CPU_ARM64 := FALSE}
  136. {$setc TARGET_OS_MAC := FALSE}
  137. {$setc TARGET_OS_IPHONE := TRUE}
  138. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  139. {$setc TARGET_OS_EMBEDDED := TRUE}
  140. {$elifc defined __arm64__ and __arm64__}
  141. {$setc TARGET_CPU_PPC := FALSE}
  142. {$setc TARGET_CPU_PPC64 := FALSE}
  143. {$setc TARGET_CPU_X86 := FALSE}
  144. {$setc TARGET_CPU_X86_64 := FALSE}
  145. {$setc TARGET_CPU_ARM := FALSE}
  146. {$setc TARGET_CPU_ARM64 := TRUE}
  147. {$ifc defined ios}
  148. {$setc TARGET_OS_MAC := FALSE}
  149. {$setc TARGET_OS_IPHONE := TRUE}
  150. {$setc TARGET_OS_EMBEDDED := TRUE}
  151. {$elsec}
  152. {$setc TARGET_OS_MAC := TRUE}
  153. {$setc TARGET_OS_IPHONE := FALSE}
  154. {$setc TARGET_OS_EMBEDDED := FALSE}
  155. {$endc}
  156. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  157. {$elsec}
  158. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  159. {$endc}
  160. {$ifc defined __LP64__ and __LP64__ }
  161. {$setc TARGET_CPU_64 := TRUE}
  162. {$elsec}
  163. {$setc TARGET_CPU_64 := FALSE}
  164. {$endc}
  165. {$ifc defined FPC_BIG_ENDIAN}
  166. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  167. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  168. {$elifc defined FPC_LITTLE_ENDIAN}
  169. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  170. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  171. {$elsec}
  172. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  173. {$endc}
  174. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  175. {$setc CALL_NOT_IN_CARBON := FALSE}
  176. {$setc OLDROUTINENAMES := FALSE}
  177. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  178. {$setc OPAQUE_UPP_TYPES := TRUE}
  179. {$setc OTCARBONAPPLICATION := TRUE}
  180. {$setc OTKERNEL := FALSE}
  181. {$setc PM_USE_SESSION_APIS := TRUE}
  182. {$setc TARGET_API_MAC_CARBON := TRUE}
  183. {$setc TARGET_API_MAC_OS8 := FALSE}
  184. {$setc TARGET_API_MAC_OSX := TRUE}
  185. {$setc TARGET_CARBON := TRUE}
  186. {$setc TARGET_CPU_68K := FALSE}
  187. {$setc TARGET_CPU_MIPS := FALSE}
  188. {$setc TARGET_CPU_SPARC := FALSE}
  189. {$setc TARGET_OS_UNIX := FALSE}
  190. {$setc TARGET_OS_WIN32 := FALSE}
  191. {$setc TARGET_RT_MAC_68881 := FALSE}
  192. {$setc TARGET_RT_MAC_CFM := FALSE}
  193. {$setc TARGET_RT_MAC_MACHO := TRUE}
  194. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  195. {$setc TYPE_BOOL := FALSE}
  196. {$setc TYPE_EXTENDED := FALSE}
  197. {$setc TYPE_LONGLONG := TRUE}
  198. {$IFDEF FPC_DOTTEDUNITS}
  199. uses MacOsApi.MacTypes,MacOsApi.Files,MacOsApi.UTCUtils,MacOsApi.CFBase;
  200. {$ELSE FPC_DOTTEDUNITS}
  201. uses MacTypes,Files,UTCUtils,CFBase;
  202. {$ENDIF FPC_DOTTEDUNITS}
  203. {$endc} {not MACOSALLINCLUDE}
  204. {$ifc TARGET_OS_MAC}
  205. {$ALIGN MAC68K}
  206. type
  207. FSAliasInfoBitmap = UInt32;
  208. FSAliasInfoBitmapPtr = ^FSAliasInfoBitmap;
  209. const
  210. kFSAliasInfoNone = $00000000; { no valid info}
  211. kFSAliasInfoVolumeCreateDate = $00000001; { volume creation date is valid}
  212. kFSAliasInfoTargetCreateDate = $00000002; { target creation date is valid}
  213. kFSAliasInfoFinderInfo = $00000004; { file type and creator are valid}
  214. kFSAliasInfoIsDirectory = $00000008; { isDirectory boolean is valid}
  215. kFSAliasInfoIDs = $00000010; { parentDirID and nodeID are valid}
  216. kFSAliasInfoFSInfo = $00000020; { filesystemID and signature are valid}
  217. kFSAliasInfoVolumeFlags = $00000040; { volumeIsBootVolume, volumeIsAutomounted, volumeIsEjectable and volumeHasPersistentFileIDs are valid}
  218. const
  219. rAliasType = FourCharCode('alis'); { Aliases are stored as resources of this type }
  220. const
  221. { define alias resolution action rules mask }
  222. kARMMountVol = $00000001; { mount the volume automatically }
  223. kARMNoUI = $00000002; { no user interface allowed during resolution }
  224. kARMMultVols = $00000008; { search on multiple volumes }
  225. kARMSearch = $00000100; { search quickly }
  226. kARMSearchMore = $00000200; { search further }
  227. kARMSearchRelFirst = $00000400; { search target on a relative path first }
  228. kARMTryFileIDFirst = $00000800; { search by file id before path }
  229. const
  230. { define alias record information types }
  231. asiZoneName = -3; { get zone name }
  232. asiServerName = -2; { get server name }
  233. asiVolumeName = -1; { get volume name }
  234. asiAliasName = 0; { get aliased file/folder/volume name }
  235. asiParentName = 1; { get parent folder name }
  236. { ResolveAliasFileWithMountFlags options }
  237. const
  238. kResolveAliasFileNoUI = $00000001; { no user interaction during resolution }
  239. kResolveAliasTryFileIDFirst = $00000002; { search by file id before path }
  240. { define the alias record that will be the blackbox for the caller }
  241. type
  242. AliasRecordPtr = ^AliasRecord;
  243. { Opaque as of Mac OS X 10.4 ... }
  244. AliasRecord = record
  245. userType: OSType; { appl stored type like creator type }
  246. aliasSize: UInt16; { alias record size in bytes, for appl usage }
  247. end;
  248. type
  249. AliasPtr = AliasRecordPtr;
  250. AliasHandle = ^AliasPtr;
  251. { info block to pass to FSCopyAliasInfo }
  252. type
  253. FSAliasInfo = record
  254. volumeCreateDate: UTCDateTime;
  255. targetCreateDate: UTCDateTime;
  256. fileType: OSType;
  257. fileCreator: OSType;
  258. parentDirID: UInt32;
  259. nodeID: UInt32;
  260. filesystemID: UInt16;
  261. signature: UInt16;
  262. volumeIsBootVolume: Boolean;
  263. volumeIsAutomounted: Boolean;
  264. volumeIsEjectable: Boolean;
  265. volumeHasPersistentFileIDs: Boolean;
  266. isDirectory: Boolean;
  267. end;
  268. FSAliasInfoPtr = ^FSAliasInfo;
  269. { alias record information type }
  270. type
  271. AliasInfoType = SInt16;
  272. {$ifc not TARGET_CPU_64}
  273. type
  274. AliasFilterProcPtr = function( cpbPtr: CInfoPBPtr; var quitFlag: Boolean; myDataPtr: Ptr ): Boolean;
  275. AliasFilterUPP = AliasFilterProcPtr;
  276. {
  277. * NewAliasFilterUPP()
  278. *
  279. * Availability:
  280. * Mac OS X: in version 10.0 and later in CoreServices.framework
  281. * CarbonLib: in CarbonLib 1.0 and later
  282. * Non-Carbon CFM: available as macro/inline
  283. }
  284. { old name was NewAliasFilterProc }
  285. function NewAliasFilterUPP( userRoutine: AliasFilterProcPtr ): AliasFilterUPP; external name '_NewAliasFilterUPP';
  286. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  287. {
  288. * DisposeAliasFilterUPP()
  289. *
  290. * Availability:
  291. * Mac OS X: in version 10.0 and later in CoreServices.framework
  292. * CarbonLib: in CarbonLib 1.0 and later
  293. * Non-Carbon CFM: available as macro/inline
  294. }
  295. procedure DisposeAliasFilterUPP( userUPP: AliasFilterUPP ); external name '_DisposeAliasFilterUPP';
  296. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  297. {
  298. * InvokeAliasFilterUPP()
  299. *
  300. * Availability:
  301. * Mac OS X: in version 10.0 and later in CoreServices.framework
  302. * CarbonLib: in CarbonLib 1.0 and later
  303. * Non-Carbon CFM: available as macro/inline
  304. }
  305. function InvokeAliasFilterUPP( cpbPtr: CInfoPBPtr; var quitFlag: Boolean; myDataPtr: Ptr; userUPP: AliasFilterUPP ): Boolean; external name '_InvokeAliasFilterUPP';
  306. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  307. {#if __MACH__
  308. #define NewAliasFilterUPP(userRoutine) ((AliasFilterUPP)userRoutine)
  309. #define DisposeAliasFilterUPP(userUPP)
  310. #define InvokeAliasFilterUPP(cpbPtr, quitFlag, myDataPtr, userUPP) (*userUPP)(cpbPtr, quitFlag, myDataPtr)
  311. #endif}
  312. {$endc} {not TARGET_CPU_64}
  313. type
  314. FSAliasFilterProcPtr = function( const (*var*) ref: FSRef; var quitFlag: Boolean; myDataPtr: Ptr ): Boolean;
  315. FSAliasFilterUPP = FSAliasFilterProcPtr;
  316. {
  317. * FSNewAlias()
  318. *
  319. * Mac OS X threading:
  320. * Thread safe since version 10.3
  321. *
  322. * Availability:
  323. * Mac OS X: in version 10.0 and later in CoreServices.framework
  324. * CarbonLib: in CarbonLib 1.1 and later
  325. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  326. }
  327. function FSNewAlias( {const} fromFile: FSRefPtr { can be NULL }; const (*var*) target: FSRef; var inAlias: AliasHandle ): OSErr; external name '_FSNewAlias';
  328. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  329. {
  330. * FSNewAliasMinimal()
  331. *
  332. * Mac OS X threading:
  333. * Thread safe since version 10.3
  334. *
  335. * Availability:
  336. * Mac OS X: in version 10.0 and later in CoreServices.framework
  337. * CarbonLib: in CarbonLib 1.1 and later
  338. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  339. }
  340. function FSNewAliasMinimal( const (*var*) target: FSRef; var inAlias: AliasHandle ): OSErr; external name '_FSNewAliasMinimal';
  341. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  342. {
  343. * FSIsAliasFile()
  344. *
  345. * Mac OS X threading:
  346. * Thread safe since version 10.3
  347. *
  348. * Availability:
  349. * Mac OS X: in version 10.0 and later in CoreServices.framework
  350. * CarbonLib: in CarbonLib 1.1 and later
  351. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  352. }
  353. function FSIsAliasFile( const (*var*) fileRef: FSRef; var aliasFileFlag: Boolean; var folderFlag: Boolean ): OSErr; external name '_FSIsAliasFile';
  354. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  355. {
  356. * FSResolveAliasWithMountFlags()
  357. *
  358. * Mac OS X threading:
  359. * Thread safe since version 10.3
  360. *
  361. * Availability:
  362. * Mac OS X: in version 10.0 and later in CoreServices.framework
  363. * CarbonLib: in CarbonLib 1.1 and later
  364. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  365. }
  366. function FSResolveAliasWithMountFlags( {const} fromFile: FSRefPtr { can be NULL }; inAlias: AliasHandle; var target: FSRef; var wasChanged: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_FSResolveAliasWithMountFlags';
  367. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  368. {
  369. * FSResolveAlias()
  370. *
  371. * Mac OS X threading:
  372. * Thread safe since version 10.3
  373. *
  374. * Availability:
  375. * Mac OS X: in version 10.0 and later in CoreServices.framework
  376. * CarbonLib: in CarbonLib 1.1 and later
  377. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  378. }
  379. function FSResolveAlias( {const} fromFile: FSRefPtr { can be NULL }; alias: AliasHandle; var target: FSRef; var wasChanged: Boolean ): OSErr; external name '_FSResolveAlias';
  380. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  381. {
  382. * FSResolveAliasFileWithMountFlags()
  383. *
  384. * Mac OS X threading:
  385. * Thread safe since version 10.3
  386. *
  387. * Availability:
  388. * Mac OS X: in version 10.0 and later in CoreServices.framework
  389. * CarbonLib: in CarbonLib 1.1 and later
  390. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  391. }
  392. function FSResolveAliasFileWithMountFlags( var theRef: FSRef; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_FSResolveAliasFileWithMountFlags';
  393. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  394. {
  395. * FSResolveAliasFile()
  396. *
  397. * Mac OS X threading:
  398. * Thread safe since version 10.3
  399. *
  400. * Availability:
  401. * Mac OS X: in version 10.0 and later in CoreServices.framework
  402. * CarbonLib: in CarbonLib 1.1 and later
  403. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  404. }
  405. function FSResolveAliasFile( var theRef: FSRef; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean ): OSErr; external name '_FSResolveAliasFile';
  406. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  407. {
  408. * FSFollowFinderAlias()
  409. *
  410. * Mac OS X threading:
  411. * Thread safe since version 10.3
  412. *
  413. * Availability:
  414. * Mac OS X: in version 10.0 and later in CoreServices.framework
  415. * CarbonLib: in CarbonLib 1.1 and later
  416. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  417. }
  418. function FSFollowFinderAlias( fromFile: FSRefPtr { can be NULL }; alias: AliasHandle; logon: Boolean; var target: FSRef; var wasChanged: Boolean ): OSErr; external name '_FSFollowFinderAlias';
  419. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  420. {
  421. * FSUpdateAlias()
  422. *
  423. * Mac OS X threading:
  424. * Thread safe since version 10.3
  425. *
  426. * Availability:
  427. * Mac OS X: in version 10.0 and later in CoreServices.framework
  428. * CarbonLib: in CarbonLib 1.1 and later
  429. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  430. }
  431. function FSUpdateAlias( {const} fromFile: FSRefPtr { can be NULL }; const (*var*) target: FSRef; alias: AliasHandle; var wasChanged: Boolean ): OSErr; external name '_FSUpdateAlias';
  432. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  433. {
  434. * FSNewAliasUnicode()
  435. *
  436. * Summary:
  437. * Creates an alias given a ref to the target's parent directory and
  438. * the target's unicode name. If the target does not exist fnfErr
  439. * will be returned but the alias will still be created. This
  440. * allows the creation of aliases to targets that do not exist.
  441. *
  442. * Mac OS X threading:
  443. * Thread safe since version 10.3
  444. *
  445. * Parameters:
  446. *
  447. * fromFile:
  448. * The starting point for a relative search.
  449. *
  450. * targetParentRef:
  451. * An FSRef to the parent directory of the target.
  452. *
  453. * targetNameLength:
  454. * Number of Unicode characters in the target's name.
  455. *
  456. * targetName:
  457. * A pointer to the Unicode name.
  458. *
  459. * inAlias:
  460. * A Handle to the newly created alias record.
  461. *
  462. * isDirectory:
  463. * On input, if target does not exist, a flag to indicate whether
  464. * or not the target is a directory. On output, if the target did
  465. * exist, a flag indicating if the target is a directory. Pass
  466. * NULL in the non-existant case if unsure.
  467. *
  468. * Availability:
  469. * Mac OS X: in version 10.2 and later in CoreServices.framework
  470. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  471. * Non-Carbon CFM: not available
  472. }
  473. function FSNewAliasUnicode( {const} fromFile: FSRefPtr { can be NULL }; const (*var*) targetParentRef: FSRef; targetNameLength: UniCharCount; targetName: ConstUniCharPtr; var inAlias: AliasHandle; isDirectory: BooleanPtr { can be NULL } ): OSErr; external name '_FSNewAliasUnicode';
  474. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  475. {
  476. * FSNewAliasMinimalUnicode()
  477. *
  478. * Summary:
  479. * Creates a minimal alias given a ref to the target's parent
  480. * directory and the target's unicode name. If the target does not
  481. * exist fnfErr will be returned but the alias will still be created.
  482. *
  483. * Mac OS X threading:
  484. * Thread safe since version 10.3
  485. *
  486. * Parameters:
  487. *
  488. * targetParentRef:
  489. * An FSRef to the parent directory of the target.
  490. *
  491. * targetNameLength:
  492. * Number of Unicode characters in the target's name.
  493. *
  494. * targetName:
  495. * A pointer to the Unicode name.
  496. *
  497. * inAlias:
  498. * A Handle to the newly created alias record.
  499. *
  500. * isDirectory:
  501. * On input, if target does not exist, a flag to indicate whether
  502. * or not the target is a directory. On output, if the target did
  503. * exist, a flag indicating if the target is a directory. Pass
  504. * NULL in the non-existant case if unsure.
  505. *
  506. * Availability:
  507. * Mac OS X: in version 10.2 and later in CoreServices.framework
  508. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  509. * Non-Carbon CFM: not available
  510. }
  511. function FSNewAliasMinimalUnicode( const (*var*) targetParentRef: FSRef; targetNameLength: UniCharCount; targetName: ConstUniCharPtr; var inAlias: AliasHandle; isDirectory: BooleanPtr { can be NULL } ): OSErr; external name '_FSNewAliasMinimalUnicode';
  512. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  513. {
  514. * FSNewAliasFromPath()
  515. *
  516. * Summary:
  517. * Creates an alias given a POSIX style utf-8 path to the target.
  518. * If the target file does not exist but the path up to the leaf
  519. * does then fnfErr will be returned but the alias will still be
  520. * created.
  521. *
  522. * Mac OS X threading:
  523. * Thread safe since version 10.5
  524. *
  525. * Parameters:
  526. *
  527. * fromFilePath:
  528. * The starting point for a relative search.
  529. *
  530. * targetPath:
  531. * POSIX style UTF-8 path to target.
  532. *
  533. * flags:
  534. * Options for future use. Pass in 0.
  535. *
  536. * inAlias:
  537. * A Handle to the newly created alias record.
  538. *
  539. * isDirectory:
  540. * On input, if target does not exist, a flag to indicate whether
  541. * or not the target is a directory. On output, if the target did
  542. * exist, a flag indicating if the target is a directory. Pass
  543. * NULL in the non-existant case if unsure.
  544. *
  545. * Availability:
  546. * Mac OS X: in version 10.5 and later in CoreServices.framework
  547. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.5 and later
  548. * Non-Carbon CFM: not available
  549. }
  550. function FSNewAliasFromPath( fromFilePath: ConstCStringPtr { can be NULL }; targetPath: ConstCStringPtr; flags: OptionBits; var inAlias: AliasHandle; isDirectory: BooleanPtr { can be NULL } ): OSStatus; external name '_FSNewAliasFromPath';
  551. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  552. {
  553. * FSMatchAliasBulk()
  554. *
  555. * Summary:
  556. * Given an alias handle and fromFile, match the alias and return
  557. * FSRefs to the aliased file(s) and needsUpdate flag
  558. *
  559. * Mac OS X threading:
  560. * Thread safe since version 10.5
  561. *
  562. * Availability:
  563. * Mac OS X: in version 10.5 and later in CoreServices.framework
  564. * CarbonLib: not available
  565. * Non-Carbon CFM: not available
  566. }
  567. function FSMatchAliasBulk( {const} fromFile: FSRefPtr { can be NULL }; rulesMask: UNSIGNEDLONG; inAlias: AliasHandle; var aliasCount: SInt16; var aliasList: FSRef; var needsUpdate: Boolean; aliasFilter: FSAliasFilterProcPtr { can be NULL }; yourDataPtr: UnivPtr { can be NULL } ): OSStatus; external name '_FSMatchAliasBulk';
  568. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  569. {
  570. * FSCopyAliasInfo()
  571. *
  572. * Discussion:
  573. * This routine will return the requested information from the
  574. * passed in aliasHandle. The information is gathered only from the
  575. * alias record so it may not match what is on disk (no disk i/o is
  576. * performed). The whichInfo paramter is an output parameter that
  577. * signifies which fields in the info record contain valid data.
  578. *
  579. * Mac OS X threading:
  580. * Thread safe since version 10.2
  581. *
  582. * Parameters:
  583. *
  584. * inAlias:
  585. * A handle to the alias record to get the information from.
  586. *
  587. * targetName:
  588. * The name of the target item.
  589. *
  590. * volumeName:
  591. * The name of the volume the target resides on.
  592. *
  593. * pathString:
  594. * POSIX path to target.
  595. *
  596. * whichInfo:
  597. * An indication of which fields in the info block contain valid
  598. * data.
  599. *
  600. * info:
  601. * Returned information about the alias.
  602. *
  603. * Availability:
  604. * Mac OS X: in version 10.2 and later in CoreServices.framework
  605. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  606. * Non-Carbon CFM: not available
  607. }
  608. function FSCopyAliasInfo( inAlias: AliasHandle; targetName: HFSUniStr255Ptr { can be NULL }; volumeName: HFSUniStr255Ptr { can be NULL }; pathString: CFStringRefPtr { can be NULL }; whichInfo: FSAliasInfoBitmapPtr { can be NULL }; info: FSAliasInfoPtr { can be NULL } ): OSStatus; external name '_FSCopyAliasInfo';
  609. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  610. {
  611. * GetAliasSize()
  612. *
  613. * Discussion:
  614. * This routine will return the size of the alias record referenced
  615. * by the AliasHandle alias. This will be smaller than the size
  616. * returned by GetHandleSize if any custom data has been added (IM
  617. * Files 4-13).
  618. *
  619. * Mac OS X threading:
  620. * Thread safe since version 10.4
  621. *
  622. * Parameters:
  623. *
  624. * alias:
  625. * A handle to the alias record to get the information from.
  626. *
  627. * Result:
  628. * The size of the private section of the alias record.
  629. *
  630. * Availability:
  631. * Mac OS X: in version 10.4 and later in CoreServices.framework
  632. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  633. * Non-Carbon CFM: not available
  634. }
  635. function GetAliasSize( alias: AliasHandle ): Size; external name '_GetAliasSize';
  636. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  637. {
  638. * GetAliasUserType()
  639. *
  640. * Discussion:
  641. * This routine will return the usertype associated with the alias
  642. * record referenced by the AliasHandle alias.
  643. *
  644. * Mac OS X threading:
  645. * Thread safe since version 10.4
  646. *
  647. * Parameters:
  648. *
  649. * alias:
  650. * A handle to the alias record to get the userType from.
  651. *
  652. * Result:
  653. * The userType associated with the alias as an OSType
  654. *
  655. * Availability:
  656. * Mac OS X: in version 10.4 and later in CoreServices.framework
  657. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  658. * Non-Carbon CFM: not available
  659. }
  660. function GetAliasUserType( alias: AliasHandle ): OSType; external name '_GetAliasUserType';
  661. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  662. {
  663. * SetAliasUserType()
  664. *
  665. * Discussion:
  666. * This routine will set the userType associated with an alias
  667. * record.
  668. *
  669. * Mac OS X threading:
  670. * Thread safe since version 10.4
  671. *
  672. * Parameters:
  673. *
  674. * alias:
  675. * A handle to the alias record to set the userType for.
  676. *
  677. * userType:
  678. * The OSType to set the userType to.
  679. *
  680. * Availability:
  681. * Mac OS X: in version 10.4 and later in CoreServices.framework
  682. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  683. * Non-Carbon CFM: not available
  684. }
  685. procedure SetAliasUserType( alias: AliasHandle; userType: OSType ); external name '_SetAliasUserType';
  686. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  687. {
  688. * GetAliasSizeFromPtr()
  689. *
  690. * Discussion:
  691. * This routine will return the size of the alias record referenced
  692. * by a pointer to the AliasRecord.
  693. *
  694. * Mac OS X threading:
  695. * Thread safe since version 10.4
  696. *
  697. * Parameters:
  698. *
  699. * alias:
  700. * A pointer to the alias record to get the information from.
  701. *
  702. * Result:
  703. * The size of the private section of the alias record.
  704. *
  705. * Availability:
  706. * Mac OS X: in version 10.4 and later in CoreServices.framework
  707. * CarbonLib: not available
  708. * Non-Carbon CFM: not available
  709. }
  710. function GetAliasSizeFromPtr( const (*var*) alias: AliasRecord ): Size; external name '_GetAliasSizeFromPtr';
  711. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  712. {
  713. * GetAliasUserTypeFromPtr()
  714. *
  715. * Discussion:
  716. * This routine will return the usertype associated withthe alias
  717. * record pointed to by alias.
  718. *
  719. * Mac OS X threading:
  720. * Thread safe since version 10.4
  721. *
  722. * Parameters:
  723. *
  724. * alias:
  725. * A pointer to the alias record to get the userType from.
  726. *
  727. * Result:
  728. * The userType associated with the alias as an OSType
  729. *
  730. * Availability:
  731. * Mac OS X: in version 10.4 and later in CoreServices.framework
  732. * CarbonLib: not available
  733. * Non-Carbon CFM: not available
  734. }
  735. function GetAliasUserTypeFromPtr( const (*var*) alias: AliasRecord ): OSType; external name '_GetAliasUserTypeFromPtr';
  736. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  737. {
  738. * SetAliasUserTypeWithPtr()
  739. *
  740. * Discussion:
  741. * This routine will set the userType associated with an alias
  742. * record.
  743. *
  744. * Mac OS X threading:
  745. * Thread safe since version 10.4
  746. *
  747. * Parameters:
  748. *
  749. * alias:
  750. * A pointer to the alias record to set the userType for.
  751. *
  752. * userType:
  753. * The OSType to set the userType to.
  754. *
  755. * Availability:
  756. * Mac OS X: in version 10.4 and later in CoreServices.framework
  757. * CarbonLib: not available
  758. * Non-Carbon CFM: not available
  759. }
  760. procedure SetAliasUserTypeWithPtr( alias: AliasPtr; userType: OSType ); external name '_SetAliasUserTypeWithPtr';
  761. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  762. { Functions beyond this point are deprecated}
  763. {$ifc not TARGET_CPU_64}
  764. {
  765. * FSMatchAlias() *** DEPRECATED ***
  766. *
  767. * Deprecated:
  768. * Use FSMatchAliasBulk instead
  769. *
  770. * Summary:
  771. * Given an alias handle and fromFile, match the alias and return
  772. * FSRefs to the aliased file(s) and needsUpdate flag
  773. *
  774. * Mac OS X threading:
  775. * Thread safe since version 10.3
  776. *
  777. * Availability:
  778. * Mac OS X: in version 10.2 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  779. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  780. * Non-Carbon CFM: not available
  781. }
  782. function FSMatchAlias( {const} fromFile: FSRefPtr { can be NULL }; rulesMask: UNSIGNEDLONG; inAlias: AliasHandle; var aliasCount: SInt16; var aliasList: FSRef; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_FSMatchAlias';
  783. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  784. {
  785. * FSMatchAliasNoUI() *** DEPRECATED ***
  786. *
  787. * Deprecated:
  788. * Use FSMatchAliasBulk with the kARMNoUI flag instead
  789. *
  790. * Summary:
  791. * variation on FSMatchAlias that does not prompt user with a dialog
  792. *
  793. * Mac OS X threading:
  794. * Thread safe since version 10.3
  795. *
  796. * Availability:
  797. * Mac OS X: in version 10.2 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  798. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  799. * Non-Carbon CFM: not available
  800. }
  801. function FSMatchAliasNoUI( {const} fromFile: FSRefPtr { can be NULL }; rulesMask: UNSIGNEDLONG; inAlias: AliasHandle; var aliasCount: SInt16; var aliasList: FSRef; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_FSMatchAliasNoUI';
  802. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  803. {
  804. * NewAlias() *** DEPRECATED ***
  805. *
  806. * Deprecated:
  807. * Use FSNewAlias
  808. *
  809. * Summary:
  810. * create a new alias between fromFile and target, returns alias
  811. * record handle
  812. *
  813. * Discussion:
  814. * Create an alias betwen fromFile and target, and return it in an
  815. * AliasHandle. This function is deprecated in Mac OS X 10.4;
  816. * instead, you should use FSNewAliasUnicode() because NewAlias()
  817. * has problems creating aliases to certain files, including those
  818. * which are impossible to represent in an FSSpec.
  819. *
  820. * Mac OS X threading:
  821. * Thread safe since version 10.3
  822. *
  823. * Availability:
  824. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  825. * CarbonLib: in CarbonLib 1.0 and later
  826. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  827. }
  828. function NewAlias( {const} fromFile: FSSpecPtr { can be NULL }; const (*var*) target: FSSpec; var alias: AliasHandle ): OSErr; external name '_NewAlias';
  829. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  830. {
  831. * NewAliasMinimal() *** DEPRECATED ***
  832. *
  833. * Deprecated:
  834. * Use FSNewAliasMinimalUnicode
  835. *
  836. * Summary:
  837. * create a minimal new alias for a target and return alias record
  838. * handle
  839. *
  840. * Discussion:
  841. * Create a minimal alias for a target, and return it in an
  842. * AliasHandle. This function is deprecated in Mac OS X 10.4;
  843. * instead, you should use FSNewAliasMinimalUnicode() because
  844. * NewAliasMinimalAlias() has problems creating aliases to certain
  845. * files, including those which are impossible to represent in an
  846. * FSSpec.
  847. *
  848. * Mac OS X threading:
  849. * Thread safe since version 10.3
  850. *
  851. * Availability:
  852. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  853. * CarbonLib: in CarbonLib 1.0 and later
  854. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  855. }
  856. function NewAliasMinimal( const (*var*) target: FSSpec; var alias: AliasHandle ): OSErr; external name '_NewAliasMinimal';
  857. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  858. {
  859. * NewAliasMinimalFromFullPath() *** DEPRECATED ***
  860. *
  861. * Deprecated:
  862. * Use FSNewAliasMinimalUnicode
  863. *
  864. * Summary:
  865. * create a minimal new alias from a target fullpath (optional zone
  866. * and server name) and return alias record handle
  867. *
  868. * Discussion:
  869. * Create a minimal alias for a target fullpath, and return it in an
  870. * AliasHandle. This function is deprecated in Mac OS X 10.4;
  871. * instead, you should use FSNewAliasMinimalUnicode() because
  872. * NewAliasMinimalFromFullPath() has problems creating aliases to
  873. * certain files, including those which are impossible to represent
  874. * in an FSSpec.
  875. *
  876. * Mac OS X threading:
  877. * Thread safe since version 10.3
  878. *
  879. * Availability:
  880. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  881. * CarbonLib: in CarbonLib 1.0 and later
  882. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  883. }
  884. function NewAliasMinimalFromFullPath( fullPathLength: SInt16; fullPath: {const} UnivPtr; const (*var*) zoneName: Str32; const (*var*) serverName: Str31; var alias: AliasHandle ): OSErr; external name '_NewAliasMinimalFromFullPath';
  885. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  886. {
  887. * ResolveAlias() *** DEPRECATED ***
  888. *
  889. * Deprecated:
  890. * Use FSResolveAlias() or FSResolveAliasWithMountFlags() instead.
  891. *
  892. * Summary:
  893. * given an alias handle and fromFile, resolve the alias, update the
  894. * alias record and return aliased filename and wasChanged flag.
  895. *
  896. * Mac OS X threading:
  897. * Thread safe since version 10.3
  898. *
  899. * Availability:
  900. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  901. * CarbonLib: in CarbonLib 1.0 and later
  902. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  903. }
  904. function ResolveAlias( {const} fromFile: FSSpecPtr { can be NULL }; alias: AliasHandle; var target: FSSpec; var wasChanged: Boolean ): OSErr; external name '_ResolveAlias';
  905. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  906. {
  907. * GetAliasInfo() *** DEPRECATED ***
  908. *
  909. * Deprecated:
  910. * Use FSCopyAliasInfo instead.
  911. *
  912. * Summary:
  913. * This call does not work on all aliases. Given an alias handle and
  914. * an index specifying requested alias information type, return the
  915. * information from alias record as a string. An empty string is
  916. * returned when the index is greater than the number of levels
  917. * between the target and root.
  918. *
  919. * Mac OS X threading:
  920. * Thread safe since version 10.0
  921. *
  922. * Availability:
  923. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.3
  924. * CarbonLib: in CarbonLib 1.0 and later
  925. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  926. }
  927. function GetAliasInfo( alias: AliasHandle; itemIndex: AliasInfoType; var theString: Str63 ): OSErr; external name '_GetAliasInfo';
  928. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_NA, __IPHONE_NA) *)
  929. {
  930. * IsAliasFile() *** DEPRECATED ***
  931. *
  932. * Deprecated:
  933. * Use FSIsAliasFile() instead.
  934. *
  935. * Summary:
  936. * Return true if the file pointed to by fileFSSpec is an alias file.
  937. *
  938. * Mac OS X threading:
  939. * Thread safe since version 10.0
  940. *
  941. * Availability:
  942. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  943. * CarbonLib: in CarbonLib 1.0 and later
  944. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  945. }
  946. function IsAliasFile( const (*var*) fileFSSpec: FSSpec; var aliasFileFlag: Boolean; var folderFlag: Boolean ): OSErr; external name '_IsAliasFile';
  947. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  948. {
  949. * ResolveAliasWithMountFlags() *** DEPRECATED ***
  950. *
  951. * Deprecated:
  952. * Use FSResolveAliasWithMountFlags() instead.
  953. *
  954. * Summary:
  955. * Given an AliasHandle, return target file spec. It resolves the
  956. * entire alias chain or one step of the chain. It returns info
  957. * about whether the target is a folder or file; and whether the
  958. * input file spec was an alias or not.
  959. *
  960. * Mac OS X threading:
  961. * Thread safe since version 10.3
  962. *
  963. * Availability:
  964. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  965. * CarbonLib: in CarbonLib 1.0 and later
  966. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  967. }
  968. function ResolveAliasWithMountFlags( {const} fromFile: FSSpecPtr { can be NULL }; alias: AliasHandle; var target: FSSpec; var wasChanged: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_ResolveAliasWithMountFlags';
  969. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  970. {
  971. * ResolveAliasFile() *** DEPRECATED ***
  972. *
  973. * Deprecated:
  974. * Use FSResolveAliasFile
  975. *
  976. * Summary:
  977. * Given a file spec, return target file spec if input file spec is
  978. * an alias. It resolves the entire alias chain or one step of the
  979. * chain. It returns info about whether the target is a folder or
  980. * file; and whether the input file spec was an alias or not.
  981. *
  982. * Mac OS X threading:
  983. * Thread safe since version 10.3
  984. *
  985. * Availability:
  986. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  987. * CarbonLib: in CarbonLib 1.0 and later
  988. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  989. }
  990. function ResolveAliasFile( var theSpec: FSSpec; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean ): OSErr; external name '_ResolveAliasFile';
  991. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  992. { Deprecated: Use FSResolveAliasFileWithMountFlags instead}
  993. {
  994. * ResolveAliasFileWithMountFlags() *** DEPRECATED ***
  995. *
  996. * Mac OS X threading:
  997. * Thread safe since version 10.3
  998. *
  999. * Availability:
  1000. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1001. * CarbonLib: in CarbonLib 1.0 and later
  1002. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1003. }
  1004. function ResolveAliasFileWithMountFlags( var theSpec: FSSpec; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_ResolveAliasFileWithMountFlags';
  1005. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1006. { Deprecated: Use FSFollowFinderAlias instead}
  1007. {
  1008. * FollowFinderAlias() *** DEPRECATED ***
  1009. *
  1010. * Mac OS X threading:
  1011. * Thread safe since version 10.3
  1012. *
  1013. * Availability:
  1014. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1015. * CarbonLib: in CarbonLib 1.0 and later
  1016. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  1017. }
  1018. function FollowFinderAlias( {const} fromFile: FSSpecPtr { can be NULL }; alias: AliasHandle; logon: Boolean; var target: FSSpec; var wasChanged: Boolean ): OSErr; external name '_FollowFinderAlias';
  1019. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1020. {
  1021. Low Level Routines
  1022. }
  1023. {
  1024. * UpdateAlias() *** DEPRECATED ***
  1025. *
  1026. * Deprecated:
  1027. * UseFSUpdateAlias
  1028. *
  1029. * Summary:
  1030. * given a fromFile-target pair and an alias handle, update the
  1031. * alias record pointed to by alias handle to represent target as
  1032. * the new alias.
  1033. *
  1034. * Mac OS X threading:
  1035. * Thread safe since version 10.3
  1036. *
  1037. * Availability:
  1038. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1039. * CarbonLib: in CarbonLib 1.0 and later
  1040. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1041. }
  1042. function UpdateAlias( {const} fromFile: FSSpecPtr { can be NULL }; const (*var*) target: FSSpec; alias: AliasHandle; var wasChanged: Boolean ): OSErr; external name '_UpdateAlias';
  1043. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1044. {
  1045. * MatchAlias() *** DEPRECATED ***
  1046. *
  1047. * Deprecated:
  1048. * Use FSMatchAliasBulk instead
  1049. *
  1050. * Summary:
  1051. * Given an alias handle and fromFile, match the alias and return
  1052. * FSSpecs to the aliased file(s) and needsUpdate flag
  1053. *
  1054. * Mac OS X threading:
  1055. * Thread safe since version 10.3
  1056. *
  1057. * Availability:
  1058. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1059. * CarbonLib: in CarbonLib 1.0 and later
  1060. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1061. }
  1062. function MatchAlias( {const} fromFile: FSSpecPtr { can be NULL }; rulesMask: UNSIGNEDLONG; alias: AliasHandle; var aliasCount: SInt16; aliasList: FSSpecArrayPtr; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_MatchAlias';
  1063. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1064. {
  1065. * ResolveAliasFileWithMountFlagsNoUI() *** DEPRECATED ***
  1066. *
  1067. * Deprecated:
  1068. * Use FSResolveAliasFileWithMountFlags passing in the
  1069. * kResolveAliasFileNoUI flag
  1070. *
  1071. * Summary:
  1072. * variation on ResolveAliasFile that does not prompt user with a
  1073. * dialog
  1074. *
  1075. * Mac OS X threading:
  1076. * Thread safe since version 10.3
  1077. *
  1078. * Availability:
  1079. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1080. * CarbonLib: in CarbonLib 1.0 and later
  1081. * Non-Carbon CFM: not available
  1082. }
  1083. function ResolveAliasFileWithMountFlagsNoUI( var theSpec: FSSpec; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_ResolveAliasFileWithMountFlagsNoUI';
  1084. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1085. {
  1086. * MatchAliasNoUI() *** DEPRECATED ***
  1087. *
  1088. * Deprecated:
  1089. * Use FSMatchAliasBulk with the kARMNoUI flag instead
  1090. *
  1091. * Summary:
  1092. * variation on MatchAlias that does not prompt user with a dialog
  1093. *
  1094. * Mac OS X threading:
  1095. * Thread safe since version 10.3
  1096. *
  1097. * Availability:
  1098. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1099. * CarbonLib: in CarbonLib 1.0 and later
  1100. * Non-Carbon CFM: not available
  1101. }
  1102. function MatchAliasNoUI( {const} fromFile: FSSpecPtr { can be NULL }; rulesMask: UNSIGNEDLONG; alias: AliasHandle; var aliasCount: SInt16; aliasList: FSSpecArrayPtr; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_MatchAliasNoUI';
  1103. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1104. {$endc} {not TARGET_CPU_64}
  1105. {$endc} {TARGET_OS_MAC}
  1106. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1107. end.
  1108. {$endc} {not MACOSALLINCLUDE}