URLAccess.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  1. {
  2. File: SecurityHI/URLAccess.h
  3. Contains: URL Access Interfaces.
  4. Version: SecurityHI-36638~75
  5. Copyright: © 1994-2008 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. unit URLAccess;
  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 defined cpu64}
  61. {$setc __LP64__ := 1}
  62. {$elsec}
  63. {$setc __LP64__ := 0}
  64. {$endc}
  65. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  66. {$error Conflicting definitions for __ppc__ and __i386__}
  67. {$endc}
  68. {$ifc defined __ppc__ and __ppc__}
  69. {$setc TARGET_CPU_PPC := TRUE}
  70. {$setc TARGET_CPU_PPC64 := FALSE}
  71. {$setc TARGET_CPU_X86 := FALSE}
  72. {$setc TARGET_CPU_X86_64 := FALSE}
  73. {$setc TARGET_CPU_ARM := FALSE}
  74. {$setc TARGET_OS_MAC := TRUE}
  75. {$setc TARGET_OS_IPHONE := FALSE}
  76. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  77. {$elifc defined __ppc64__ and __ppc64__}
  78. {$setc TARGET_CPU_PPC := FALSE}
  79. {$setc TARGET_CPU_PPC64 := TRUE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$elifc defined __i386__ and __i386__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := FALSE}
  89. {$setc TARGET_CPU_X86 := TRUE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$ifc defined(iphonesim)}
  93. {$setc TARGET_OS_MAC := FALSE}
  94. {$setc TARGET_OS_IPHONE := TRUE}
  95. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  96. {$elsec}
  97. {$setc TARGET_OS_MAC := TRUE}
  98. {$setc TARGET_OS_IPHONE := FALSE}
  99. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  100. {$endc}
  101. {$elifc defined __x86_64__ and __x86_64__}
  102. {$setc TARGET_CPU_PPC := FALSE}
  103. {$setc TARGET_CPU_PPC64 := FALSE}
  104. {$setc TARGET_CPU_X86 := FALSE}
  105. {$setc TARGET_CPU_X86_64 := TRUE}
  106. {$setc TARGET_CPU_ARM := FALSE}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$elifc defined __arm__ and __arm__}
  111. {$setc TARGET_CPU_PPC := FALSE}
  112. {$setc TARGET_CPU_PPC64 := FALSE}
  113. {$setc TARGET_CPU_X86 := FALSE}
  114. {$setc TARGET_CPU_X86_64 := FALSE}
  115. {$setc TARGET_CPU_ARM := TRUE}
  116. { will require compiler define when/if other Apple devices with ARM cpus ship }
  117. {$setc TARGET_OS_MAC := FALSE}
  118. {$setc TARGET_OS_IPHONE := TRUE}
  119. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  120. {$elsec}
  121. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  122. {$endc}
  123. {$ifc defined __LP64__ and __LP64__ }
  124. {$setc TARGET_CPU_64 := TRUE}
  125. {$elsec}
  126. {$setc TARGET_CPU_64 := FALSE}
  127. {$endc}
  128. {$ifc defined FPC_BIG_ENDIAN}
  129. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  130. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  131. {$elifc defined FPC_LITTLE_ENDIAN}
  132. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  133. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  134. {$elsec}
  135. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  136. {$endc}
  137. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  138. {$setc CALL_NOT_IN_CARBON := FALSE}
  139. {$setc OLDROUTINENAMES := FALSE}
  140. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  141. {$setc OPAQUE_UPP_TYPES := TRUE}
  142. {$setc OTCARBONAPPLICATION := TRUE}
  143. {$setc OTKERNEL := FALSE}
  144. {$setc PM_USE_SESSION_APIS := TRUE}
  145. {$setc TARGET_API_MAC_CARBON := TRUE}
  146. {$setc TARGET_API_MAC_OS8 := FALSE}
  147. {$setc TARGET_API_MAC_OSX := TRUE}
  148. {$setc TARGET_CARBON := TRUE}
  149. {$setc TARGET_CPU_68K := FALSE}
  150. {$setc TARGET_CPU_MIPS := FALSE}
  151. {$setc TARGET_CPU_SPARC := FALSE}
  152. {$setc TARGET_OS_UNIX := FALSE}
  153. {$setc TARGET_OS_WIN32 := FALSE}
  154. {$setc TARGET_RT_MAC_68881 := FALSE}
  155. {$setc TARGET_RT_MAC_CFM := FALSE}
  156. {$setc TARGET_RT_MAC_MACHO := TRUE}
  157. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  158. {$setc TYPE_BOOL := FALSE}
  159. {$setc TYPE_EXTENDED := FALSE}
  160. {$setc TYPE_LONGLONG := TRUE}
  161. uses MacTypes,Files,CodeFragments,MacErrors,Events;
  162. {$endc} {not MACOSALLINCLUDE}
  163. {$ifc TARGET_OS_MAC}
  164. {$ALIGN MAC68K}
  165. { Data structures and types }
  166. type
  167. URLReference = ^OpaqueURLReference; { an opaque type }
  168. OpaqueURLReference = record end;
  169. URLReferencePtr = ^URLReference; { when a var xx:URLReference parameter can be nil, it is changed to xx: URLReferencePtr }
  170. URLOpenFlags = UInt32;
  171. const
  172. kURLReplaceExistingFlag = 1 shl 0;
  173. kURLBinHexFileFlag = 1 shl 1; { Binhex before uploading if necessary}
  174. kURLExpandFileFlag = 1 shl 2; { Use StuffIt engine to expand file if necessary}
  175. kURLDisplayProgressFlag = 1 shl 3;
  176. kURLDisplayAuthFlag = 1 shl 4; { Display auth dialog if guest connection fails}
  177. kURLUploadFlag = 1 shl 5; { Do an upload instead of a download}
  178. kURLIsDirectoryHintFlag = 1 shl 6; { Hint: the URL is a directory}
  179. kURLDoNotTryAnonymousFlag = 1 shl 7; { Don't try to connect anonymously before getting logon info}
  180. kURLDirectoryListingFlag = 1 shl 8; { Download the directory listing, not the whole directory}
  181. kURLExpandAndVerifyFlag = 1 shl 9; { Expand file and then verify using signature resource}
  182. kURLNoAutoRedirectFlag = 1 shl 10; { Do not automatically redirect to new URL}
  183. kURLDebinhexOnlyFlag = 1 shl 11; { Do not use Stuffit Expander - just internal debinhex engine}
  184. kURLDoNotDeleteOnErrorFlag = 1 shl 12; { Do not delete the downloaded file if an error or abort occurs.}
  185. { This flag applies to downloading only and should be used if}
  186. { interested in later resuming the download.}
  187. kURLResumeDownloadFlag = 1 shl 13; { The passed in file is partially downloaded, attempt to resume}
  188. { it. Currently works for HTTP only. If no FSSpec passed in,}
  189. { this flag will be ignored. Overriden by kURLReplaceExistingFlag. }
  190. kURLReservedFlag = $80000000; { reserved for Apple internal use}
  191. type
  192. URLState = UInt32;
  193. const
  194. kURLNullState = 0;
  195. kURLInitiatingState = 1;
  196. kURLLookingUpHostState = 2;
  197. kURLConnectingState = 3;
  198. kURLResourceFoundState = 4;
  199. kURLDownloadingState = 5;
  200. kURLDataAvailableState = $10 + kURLDownloadingState;
  201. kURLTransactionCompleteState = 6;
  202. kURLErrorOccurredState = 7;
  203. kURLAbortingState = 8;
  204. kURLCompletedState = 9;
  205. kURLUploadingState = 10;
  206. type
  207. URLEvent = UInt32;
  208. const
  209. kURLInitiatedEvent = kURLInitiatingState;
  210. kURLResourceFoundEvent = kURLResourceFoundState;
  211. kURLDownloadingEvent = kURLDownloadingState;
  212. kURLAbortInitiatedEvent = kURLAbortingState;
  213. kURLCompletedEvent = kURLCompletedState;
  214. kURLErrorOccurredEvent = kURLErrorOccurredState;
  215. kURLDataAvailableEvent = kURLDataAvailableState;
  216. kURLTransactionCompleteEvent = kURLTransactionCompleteState;
  217. kURLUploadingEvent = kURLUploadingState;
  218. kURLSystemEvent = 29;
  219. kURLPercentEvent = 30;
  220. kURLPeriodicEvent = 31;
  221. kURLPropertyChangedEvent = 32;
  222. type
  223. URLEventMask = UNSIGNEDLONG;
  224. const
  225. kURLInitiatedEventMask = 1 shl (kURLInitiatedEvent - 1);
  226. kURLResourceFoundEventMask = 1 shl (kURLResourceFoundEvent - 1);
  227. kURLDownloadingMask = 1 shl (kURLDownloadingEvent - 1);
  228. kURLUploadingMask = 1 shl (kURLUploadingEvent - 1);
  229. kURLAbortInitiatedMask = 1 shl (kURLAbortInitiatedEvent - 1);
  230. kURLCompletedEventMask = 1 shl (kURLCompletedEvent - 1);
  231. kURLErrorOccurredEventMask = 1 shl (kURLErrorOccurredEvent - 1);
  232. kURLDataAvailableEventMask = 1 shl (kURLDataAvailableEvent - 1);
  233. kURLTransactionCompleteEventMask = 1 shl (kURLTransactionCompleteEvent - 1);
  234. kURLSystemEventMask = 1 shl (kURLSystemEvent - 1);
  235. kURLPercentEventMask = 1 shl (kURLPercentEvent - 1);
  236. kURLPeriodicEventMask = 1 shl (kURLPeriodicEvent - 1);
  237. kURLPropertyChangedEventMask = 1 shl (kURLPropertyChangedEvent - 1);
  238. kURLAllBufferEventsMask = kURLDataAvailableEventMask + kURLTransactionCompleteEventMask;
  239. kURLAllNonBufferEventsMask = kURLInitiatedEventMask + kURLDownloadingMask + kURLUploadingMask + kURLAbortInitiatedMask + kURLCompletedEventMask + kURLErrorOccurredEventMask + kURLPercentEventMask + kURLPeriodicEventMask + kURLPropertyChangedEventMask;
  240. kURLAllEventsMask = -1;
  241. type
  242. URLCallbackInfo = record
  243. version: UInt32;
  244. urlRef: URLReference;
  245. proprty: ConstCStringPtr;
  246. currentSize: UInt32;
  247. systemEvent: EventRecordPtr;
  248. end;
  249. { authentication type flags}
  250. const
  251. kUserNameAndPasswordFlag = $00000001;
  252. const
  253. kURLURL = 'URLString';
  254. const
  255. kURLResourceSize = 'URLResourceSize';
  256. const
  257. kURLLastModifiedTime = 'URLLastModifiedTime';
  258. const
  259. kURLMIMEType = 'URLMIMEType';
  260. const
  261. kURLFileType = 'URLFileType';
  262. const
  263. kURLFileCreator = 'URLFileCreator';
  264. const
  265. kURLCharacterSet = 'URLCharacterSet';
  266. const
  267. kURLResourceName = 'URLResourceName';
  268. const
  269. kURLHost = 'URLHost';
  270. const
  271. kURLAuthType = 'URLAuthType';
  272. const
  273. kURLUserName = 'URLUserName';
  274. const
  275. kURLPassword = 'URLPassword';
  276. const
  277. kURLStatusString = 'URLStatusString';
  278. const
  279. kURLIsSecure = 'URLIsSecure';
  280. const
  281. kURLCertificate = 'URLCertificate';
  282. const
  283. kURLTotalItems = 'URLTotalItems';
  284. const
  285. kURLConnectTimeout = 'URLConnectTimeout';
  286. { http and https properties}
  287. const
  288. kURLHTTPRequestMethod = 'URLHTTPRequestMethod';
  289. const
  290. kURLHTTPRequestHeader = 'URLHTTPRequestHeader';
  291. const
  292. kURLHTTPRequestBody = 'URLHTTPRequestBody';
  293. const
  294. kURLHTTPRespHeader = 'URLHTTPRespHeader';
  295. const
  296. kURLHTTPUserAgent = 'URLHTTPUserAgent';
  297. const
  298. kURLHTTPRedirectedURL = 'URLHTTPRedirectedURL';
  299. const
  300. kURLSSLCipherSuite = 'URLSSLCipherSuite';
  301. {$ifc not TARGET_CPU_64}
  302. {
  303. * URLGetURLAccessVersion() *** DEPRECATED ***
  304. *
  305. * Deprecated:
  306. * Return the version number ( in the same format as a
  307. * NumVersionVariant.whole ) of the URLAccess libraries
  308. * available.
  309. * URLAccess is deprecated on Mac OS X. See Technical Q&A 1291 for
  310. * more information on the replacements available.
  311. * http://developer.apple.com/qa/qa2001/qa1291.html
  312. *
  313. * Availability:
  314. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  315. * CarbonLib: in CarbonLib 1.0 and later
  316. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  317. }
  318. function URLGetURLAccessVersion( var returnVers: UInt32 ): OSStatus; external name '_URLGetURLAccessVersion';
  319. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  320. {$ifc TARGET_RT_MAC_CFM}
  321. // #define URLAccessAvailable() ((URLGetURLAccessVersion != (void*)kUnresolvedCFragSymbolAddress) )
  322. {$elsec}
  323. {$ifc TARGET_RT_MAC_MACHO}
  324. { URL Access is always available on OS X }
  325. // #define URLAccessAvailable() (true)
  326. {$endc}
  327. {$endc} { }
  328. {$endc} {not TARGET_CPU_64}
  329. type
  330. URLNotifyProcPtr = function( userContext: UnivPtr; event: URLEvent; var callbackInfo: URLCallbackInfo ): OSStatus;
  331. URLSystemEventProcPtr = function( userContext: UnivPtr; var event: EventRecord ): OSStatus;
  332. URLNotifyUPP = URLNotifyProcPtr;
  333. URLSystemEventUPP = URLSystemEventProcPtr;
  334. {
  335. * NewURLNotifyUPP()
  336. *
  337. * Availability:
  338. * Mac OS X: in version 10.0 and later in Carbon.framework
  339. * CarbonLib: in CarbonLib 1.0 and later
  340. * Non-Carbon CFM: available as macro/inline
  341. }
  342. function NewURLNotifyUPP( userRoutine: URLNotifyProcPtr ): URLNotifyUPP; external name '_NewURLNotifyUPP';
  343. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  344. {
  345. * NewURLSystemEventUPP()
  346. *
  347. * Availability:
  348. * Mac OS X: in version 10.0 and later in Carbon.framework
  349. * CarbonLib: in CarbonLib 1.0 and later
  350. * Non-Carbon CFM: available as macro/inline
  351. }
  352. function NewURLSystemEventUPP( userRoutine: URLSystemEventProcPtr ): URLSystemEventUPP; external name '_NewURLSystemEventUPP';
  353. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  354. {
  355. * DisposeURLNotifyUPP()
  356. *
  357. * Availability:
  358. * Mac OS X: in version 10.0 and later in Carbon.framework
  359. * CarbonLib: in CarbonLib 1.0 and later
  360. * Non-Carbon CFM: available as macro/inline
  361. }
  362. procedure DisposeURLNotifyUPP( userUPP: URLNotifyUPP ); external name '_DisposeURLNotifyUPP';
  363. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  364. {
  365. * DisposeURLSystemEventUPP()
  366. *
  367. * Availability:
  368. * Mac OS X: in version 10.0 and later in Carbon.framework
  369. * CarbonLib: in CarbonLib 1.0 and later
  370. * Non-Carbon CFM: available as macro/inline
  371. }
  372. procedure DisposeURLSystemEventUPP( userUPP: URLSystemEventUPP ); external name '_DisposeURLSystemEventUPP';
  373. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  374. {
  375. * InvokeURLNotifyUPP()
  376. *
  377. * Availability:
  378. * Mac OS X: in version 10.0 and later in Carbon.framework
  379. * CarbonLib: in CarbonLib 1.0 and later
  380. * Non-Carbon CFM: available as macro/inline
  381. }
  382. function InvokeURLNotifyUPP( userContext: UnivPtr; event: URLEvent; var callbackInfo: URLCallbackInfo; userUPP: URLNotifyUPP ): OSStatus; external name '_InvokeURLNotifyUPP';
  383. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  384. {
  385. * InvokeURLSystemEventUPP()
  386. *
  387. * Availability:
  388. * Mac OS X: in version 10.0 and later in Carbon.framework
  389. * CarbonLib: in CarbonLib 1.0 and later
  390. * Non-Carbon CFM: available as macro/inline
  391. }
  392. function InvokeURLSystemEventUPP( userContext: UnivPtr; var event: EventRecord; userUPP: URLSystemEventUPP ): OSStatus; external name '_InvokeURLSystemEventUPP';
  393. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  394. {$ifc not TARGET_CPU_64}
  395. {
  396. * URLSimpleDownload() *** DEPRECATED ***
  397. *
  398. * Availability:
  399. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  400. * CarbonLib: in CarbonLib 1.0 and later
  401. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  402. }
  403. function URLSimpleDownload( url: ConstCStringPtr; destination: FSSpecPtr { can be NULL }; destinationHandle: Handle { can be NULL }; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP { can be NULL }; userContext: UnivPtr { can be NULL } ): OSStatus; external name '_URLSimpleDownload';
  404. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  405. {
  406. * URLDownload() *** DEPRECATED ***
  407. *
  408. * Availability:
  409. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  410. * CarbonLib: in CarbonLib 1.0 and later
  411. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  412. }
  413. function URLDownload( urlRef: URLReference; destination: FSSpecPtr { can be NULL }; destinationHandle: Handle { can be NULL }; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP { can be NULL }; userContext: UnivPtr { can be NULL } ): OSStatus; external name '_URLDownload';
  414. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  415. {
  416. * URLSimpleUpload() *** DEPRECATED ***
  417. *
  418. * Availability:
  419. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  420. * CarbonLib: in CarbonLib 1.0 and later
  421. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  422. }
  423. function URLSimpleUpload( url: ConstCStringPtr; const (*var*) source: FSSpec; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP { can be NULL }; userContext: UnivPtr { can be NULL } ): OSStatus; external name '_URLSimpleUpload';
  424. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  425. {
  426. * URLUpload() *** DEPRECATED ***
  427. *
  428. * Availability:
  429. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  430. * CarbonLib: in CarbonLib 1.0 and later
  431. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  432. }
  433. function URLUpload( urlRef: URLReference; const (*var*) source: FSSpec; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP { can be NULL }; userContext: UnivPtr { can be NULL } ): OSStatus; external name '_URLUpload';
  434. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  435. {
  436. * URLNewReference() *** DEPRECATED ***
  437. *
  438. * Availability:
  439. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  440. * CarbonLib: in CarbonLib 1.0 and later
  441. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  442. }
  443. function URLNewReference( url: ConstCStringPtr; var urlRef: URLReference ): OSStatus; external name '_URLNewReference';
  444. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  445. {
  446. * URLDisposeReference() *** DEPRECATED ***
  447. *
  448. * Availability:
  449. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  450. * CarbonLib: in CarbonLib 1.0 and later
  451. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  452. }
  453. function URLDisposeReference( urlRef: URLReference ): OSStatus; external name '_URLDisposeReference';
  454. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  455. {
  456. * URLOpen() *** DEPRECATED ***
  457. *
  458. * Availability:
  459. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  460. * CarbonLib: in CarbonLib 1.0 and later
  461. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  462. }
  463. function URLOpen( urlRef: URLReference; fileSpec: FSSpecPtr { can be NULL }; openFlags: URLOpenFlags; notifyProc: URLNotifyUPP { can be NULL }; eventRegister: URLEventMask; userContext: UnivPtr { can be NULL } ): OSStatus; external name '_URLOpen';
  464. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  465. {
  466. * URLAbort() *** DEPRECATED ***
  467. *
  468. * Availability:
  469. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  470. * CarbonLib: in CarbonLib 1.0 and later
  471. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  472. }
  473. function URLAbort( urlRef: URLReference ): OSStatus; external name '_URLAbort';
  474. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  475. {
  476. * URLGetDataAvailable() *** DEPRECATED ***
  477. *
  478. * Availability:
  479. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  480. * CarbonLib: in CarbonLib 1.0 and later
  481. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  482. }
  483. function URLGetDataAvailable( urlRef: URLReference; var dataSize: Size ): OSStatus; external name '_URLGetDataAvailable';
  484. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  485. {
  486. * URLGetBuffer() *** DEPRECATED ***
  487. *
  488. * Availability:
  489. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  490. * CarbonLib: in CarbonLib 1.0 and later
  491. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  492. }
  493. function URLGetBuffer( urlRef: URLReference; var buffer: UnivPtr; var bufferSize: Size ): OSStatus; external name '_URLGetBuffer';
  494. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  495. {
  496. * URLReleaseBuffer() *** DEPRECATED ***
  497. *
  498. * Availability:
  499. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  500. * CarbonLib: in CarbonLib 1.0 and later
  501. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  502. }
  503. function URLReleaseBuffer( urlRef: URLReference; buffer: UnivPtr ): OSStatus; external name '_URLReleaseBuffer';
  504. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  505. {
  506. * URLGetProperty() *** DEPRECATED ***
  507. *
  508. * Availability:
  509. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  510. * CarbonLib: in CarbonLib 1.0 and later
  511. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  512. }
  513. function URLGetProperty( urlRef: URLReference; proprty: ConstCStringPtr; propertyBuffer: UnivPtr; bufferSize: Size ): OSStatus; external name '_URLGetProperty';
  514. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  515. {
  516. * URLGetPropertySize() *** DEPRECATED ***
  517. *
  518. * Availability:
  519. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  520. * CarbonLib: in CarbonLib 1.0 and later
  521. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  522. }
  523. function URLGetPropertySize( urlRef: URLReference; proprty: ConstCStringPtr; var propertySize: Size ): OSStatus; external name '_URLGetPropertySize';
  524. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  525. {
  526. * URLSetProperty() *** DEPRECATED ***
  527. *
  528. * Availability:
  529. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  530. * CarbonLib: in CarbonLib 1.0 and later
  531. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  532. }
  533. function URLSetProperty( urlRef: URLReference; proprty: ConstCStringPtr; propertyBuffer: UnivPtr; bufferSize: Size ): OSStatus; external name '_URLSetProperty';
  534. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  535. {
  536. * URLGetCurrentState() *** DEPRECATED ***
  537. *
  538. * Availability:
  539. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  540. * CarbonLib: in CarbonLib 1.0 and later
  541. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  542. }
  543. function URLGetCurrentState( urlRef: URLReference; var state: URLState ): OSStatus; external name '_URLGetCurrentState';
  544. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  545. {
  546. * URLGetError() *** DEPRECATED ***
  547. *
  548. * Availability:
  549. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  550. * CarbonLib: in CarbonLib 1.0 and later
  551. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  552. }
  553. function URLGetError( urlRef: URLReference; var urlError: OSStatus ): OSStatus; external name '_URLGetError';
  554. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  555. {
  556. * URLIdle() *** DEPRECATED ***
  557. *
  558. * Availability:
  559. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  560. * CarbonLib: in CarbonLib 1.0 and later
  561. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  562. }
  563. function URLIdle: OSStatus; external name '_URLIdle';
  564. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  565. {
  566. * URLGetFileInfo() *** DEPRECATED ***
  567. *
  568. * Availability:
  569. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  570. * CarbonLib: in CarbonLib 1.0 and later
  571. * Non-Carbon CFM: in URLAccessLib 1.0 and later
  572. }
  573. function URLGetFileInfo( fName: StringPtr; var fType: OSType; var fCreator: OSType ): OSStatus; external name '_URLGetFileInfo';
  574. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  575. {$endc} {not TARGET_CPU_64}
  576. {$endc} {TARGET_OS_MAC}
  577. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  578. end.
  579. {$endc} {not MACOSALLINCLUDE}