CFFTPStream.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. {
  2. File: CFNetwork/CFFTPStream.h
  3. Contains: CoreFoundation FTP stream header
  4. Version: CFNetwork-71.2~1
  5. Copyright: © 2001-2003 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: Peter N Lewis, <[email protected]>, 2004 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit CFFTPStream;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,CFBase,CFStream,CFURL,CFDictionary;
  92. {$ALIGN MAC68K}
  93. {
  94. * kCFStreamErrorDomainFTP
  95. *
  96. * Discussion:
  97. * Result code returned by FTP server
  98. *
  99. * Availability:
  100. * Mac OS X: in version 10.3 and later in CoreServices.framework
  101. * CarbonLib: not available
  102. * Non-Carbon CFM: not available
  103. }
  104. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  105. var kCFStreamErrorDomainFTP: SInt32; external name '_kCFStreamErrorDomainFTP'; (* attribute const *)
  106. {
  107. FTP Stream Property keys. These keys can be passed to the stream
  108. property "set/get" functions, such as CFReadStreamSetProperty/
  109. CFReadStreamCopyProperty, or to a CFDictionary creator or an item
  110. accessor/mutator. The comment before each key declaration (treated
  111. as definition) indicates the value type of the property.
  112. }
  113. {
  114. * kCFStreamPropertyFTPUserName
  115. *
  116. * Discussion:
  117. * Stream property key, for both set and copy operations. CFString
  118. * type to hold login user name. Don't set this property if you
  119. * want anonymous FTP.
  120. *
  121. * Availability:
  122. * Mac OS X: in version 10.3 and later in CoreServices.framework
  123. * CarbonLib: not available
  124. * Non-Carbon CFM: not available
  125. }
  126. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  127. var kCFStreamPropertyFTPUserName: CFStringRef; external name '_kCFStreamPropertyFTPUserName'; (* attribute const *)
  128. {
  129. * kCFStreamPropertyFTPPassword
  130. *
  131. * Discussion:
  132. * Stream property key, for both set and copy operations. CFString
  133. * type to hold login password. Don't set this property if you want
  134. * anonymous FTP.
  135. *
  136. * Availability:
  137. * Mac OS X: in version 10.3 and later in CoreServices.framework
  138. * CarbonLib: not available
  139. * Non-Carbon CFM: not available
  140. }
  141. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  142. var kCFStreamPropertyFTPPassword: CFStringRef; external name '_kCFStreamPropertyFTPPassword'; (* attribute const *)
  143. {
  144. * kCFStreamPropertyFTPUsePassiveMode
  145. *
  146. * Discussion:
  147. * Stream property key, for both set and copy operations. CFBoolean
  148. * type. kCFBooleanTrue means use passive mode, kCFBooleanFalse
  149. * otherwise
  150. *
  151. * Availability:
  152. * Mac OS X: in version 10.3 and later in CoreServices.framework
  153. * CarbonLib: not available
  154. * Non-Carbon CFM: not available
  155. }
  156. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  157. var kCFStreamPropertyFTPUsePassiveMode: CFStringRef; external name '_kCFStreamPropertyFTPUsePassiveMode'; (* attribute const *)
  158. {
  159. * kCFStreamPropertyFTPResourceSize
  160. *
  161. * Discussion:
  162. * Stream property key, for read stream copy operations. CFNumber
  163. * of kCFNumberLongLongType to hold resource size in bytes.
  164. *
  165. * Availability:
  166. * Mac OS X: in version 10.3 and later in CoreServices.framework
  167. * CarbonLib: not available
  168. * Non-Carbon CFM: not available
  169. }
  170. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  171. var kCFStreamPropertyFTPResourceSize: CFStringRef; external name '_kCFStreamPropertyFTPResourceSize'; (* attribute const *)
  172. {
  173. * kCFStreamPropertyFTPFetchResourceInfo
  174. *
  175. * Discussion:
  176. * Stream property key, for both set and copy operations. CFBoolean
  177. * type. TRUE means that resource info, such as size, must be
  178. * provided before download starts at higher cost. Don't set if
  179. * resource size/other info is unnecessary. Initially, only
  180. * resource size is implemented.
  181. *
  182. * Availability:
  183. * Mac OS X: in version 10.3 and later in CoreServices.framework
  184. * CarbonLib: not available
  185. * Non-Carbon CFM: not available
  186. }
  187. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  188. var kCFStreamPropertyFTPFetchResourceInfo: CFStringRef; external name '_kCFStreamPropertyFTPFetchResourceInfo'; (* attribute const *)
  189. {
  190. * kCFStreamPropertyFTPFileTransferOffset
  191. *
  192. * Discussion:
  193. * Stream property key, for both set and copy operations. CFNumber
  194. * of kCFNumberLongLongType for the file offset to start transfer at.
  195. *
  196. * Availability:
  197. * Mac OS X: in version 10.3 and later in CoreServices.framework
  198. * CarbonLib: not available
  199. * Non-Carbon CFM: not available
  200. }
  201. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  202. var kCFStreamPropertyFTPFileTransferOffset: CFStringRef; external name '_kCFStreamPropertyFTPFileTransferOffset'; (* attribute const *)
  203. {
  204. * kCFStreamPropertyFTPAttemptPersistentConnection
  205. *
  206. * Discussion:
  207. * Stream property key, for both set and copy operations. CFBoolean
  208. * type. TRUE by default, set to FALSE to avoid reusing existing
  209. * server connections.
  210. *
  211. * Availability:
  212. * Mac OS X: in version 10.3 and later in CoreServices.framework
  213. * CarbonLib: not available
  214. * Non-Carbon CFM: not available
  215. }
  216. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  217. var kCFStreamPropertyFTPAttemptPersistentConnection: CFStringRef; external name '_kCFStreamPropertyFTPAttemptPersistentConnection'; (* attribute const *)
  218. {
  219. * kCFStreamPropertyFTPProxy
  220. *
  221. * Discussion:
  222. * Stream property key, for both set and copy operations.
  223. * CFDictionary type that holds key-value pairs of proxy dictionary.
  224. * The dictionary returned by SystemConfiguration can also be
  225. * passed directly as the value.
  226. *
  227. * Availability:
  228. * Mac OS X: in version 10.3 and later in CoreServices.framework
  229. * CarbonLib: not available
  230. * Non-Carbon CFM: not available
  231. }
  232. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  233. var kCFStreamPropertyFTPProxy: CFStringRef; external name '_kCFStreamPropertyFTPProxy'; (* attribute const *)
  234. {
  235. * kCFStreamPropertyFTPProxyHost
  236. *
  237. * Discussion:
  238. * Stream property key or FTP Proxy dictionary key, for both set and
  239. * copy operations. It matches kSCPropNetProxiesFTPProxy defined in
  240. * SCSchemaDefinitions.h. CFString for proxy server host name.
  241. * This property can be set and copied individually or via a
  242. * CFDictionary.
  243. *
  244. * Availability:
  245. * Mac OS X: in version 10.3 and later in CoreServices.framework
  246. * CarbonLib: not available
  247. * Non-Carbon CFM: not available
  248. }
  249. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  250. var kCFStreamPropertyFTPProxyHost: CFStringRef; external name '_kCFStreamPropertyFTPProxyHost'; (* attribute const *)
  251. {
  252. * kCFStreamPropertyFTPProxyPort
  253. *
  254. * Discussion:
  255. * Stream property key or FTP Proxy dictionary key, for both set and
  256. * copy operations. It matches kSCPropNetProxiesFTPPort defined in
  257. * SCSchemaDefinitions.h. CFNumber of kCFNumberIntType for proxy
  258. * server port number. This property can be set and copied
  259. * individually or via a CFDictionary.
  260. *
  261. * Availability:
  262. * Mac OS X: in version 10.3 and later in CoreServices.framework
  263. * CarbonLib: not available
  264. * Non-Carbon CFM: not available
  265. }
  266. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  267. var kCFStreamPropertyFTPProxyPort: CFStringRef; external name '_kCFStreamPropertyFTPProxyPort'; (* attribute const *)
  268. {
  269. * kCFStreamPropertyFTPProxyUser
  270. *
  271. * Availability:
  272. * Mac OS X: in version 10.3 and later in CoreServices.framework
  273. * CarbonLib: not available
  274. * Non-Carbon CFM: not available
  275. }
  276. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  277. var kCFStreamPropertyFTPProxyUser: CFStringRef; external name '_kCFStreamPropertyFTPProxyUser'; (* attribute const *)
  278. {
  279. * kCFStreamPropertyFTPProxyPassword
  280. *
  281. * Availability:
  282. * Mac OS X: in version 10.3 and later in CoreServices.framework
  283. * CarbonLib: not available
  284. * Non-Carbon CFM: not available
  285. }
  286. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  287. var kCFStreamPropertyFTPProxyPassword: CFStringRef; external name '_kCFStreamPropertyFTPProxyPassword'; (* attribute const *)
  288. {
  289. CFDictionary keys for resource information. The information is
  290. extracted from a line of the directory list by function
  291. CFFTPCreateParsedResourceListing.
  292. }
  293. {
  294. * kCFFTPResourceMode
  295. *
  296. * Discussion:
  297. * CFDictinary key, for get value operation. CFNumber to hold the
  298. * resource access permission defined in sys/types.h.
  299. *
  300. * Availability:
  301. * Mac OS X: in version 10.3 and later in CoreServices.framework
  302. * CarbonLib: not available
  303. * Non-Carbon CFM: not available
  304. }
  305. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  306. var kCFFTPResourceMode: CFStringRef; external name '_kCFFTPResourceMode'; (* attribute const *)
  307. {
  308. * kCFFTPResourceName
  309. *
  310. * Discussion:
  311. * CFDictinary key, for get value operation. CFString that holds
  312. * the resource name.
  313. *
  314. * Availability:
  315. * Mac OS X: in version 10.3 and later in CoreServices.framework
  316. * CarbonLib: not available
  317. * Non-Carbon CFM: not available
  318. }
  319. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  320. var kCFFTPResourceName: CFStringRef; external name '_kCFFTPResourceName'; (* attribute const *)
  321. {
  322. * kCFFTPResourceOwner
  323. *
  324. * Discussion:
  325. * CFDictinary key, for get value operation. CFString that holds
  326. * the resource owner's name.
  327. *
  328. * Availability:
  329. * Mac OS X: in version 10.3 and later in CoreServices.framework
  330. * CarbonLib: not available
  331. * Non-Carbon CFM: not available
  332. }
  333. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  334. var kCFFTPResourceOwner: CFStringRef; external name '_kCFFTPResourceOwner'; (* attribute const *)
  335. {
  336. * kCFFTPResourceGroup
  337. *
  338. * Discussion:
  339. * CFDictinary key, for get value operation. CFString to hold the
  340. * name of the group that shares the resource.
  341. *
  342. * Availability:
  343. * Mac OS X: in version 10.3 and later in CoreServices.framework
  344. * CarbonLib: not available
  345. * Non-Carbon CFM: not available
  346. }
  347. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  348. var kCFFTPResourceGroup: CFStringRef; external name '_kCFFTPResourceGroup'; (* attribute const *)
  349. {
  350. * kCFFTPResourceLink
  351. *
  352. * Discussion:
  353. * CFDictinary key, for get value operation. CFString to hold
  354. * symbolic link information. If the item is a symbolic link the
  355. * string will contain the path to the item the link references.
  356. *
  357. * Availability:
  358. * Mac OS X: in version 10.3 and later in CoreServices.framework
  359. * CarbonLib: not available
  360. * Non-Carbon CFM: not available
  361. }
  362. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  363. var kCFFTPResourceLink: CFStringRef; external name '_kCFFTPResourceLink'; (* attribute const *)
  364. {
  365. * kCFFTPResourceSize
  366. *
  367. * Discussion:
  368. * CFDictinary key, for get value operation. CFNumber of
  369. * kCFNumberLongLongType to hold the resource length in bytes.
  370. *
  371. * Availability:
  372. * Mac OS X: in version 10.3 and later in CoreServices.framework
  373. * CarbonLib: not available
  374. * Non-Carbon CFM: not available
  375. }
  376. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  377. var kCFFTPResourceSize: CFStringRef; external name '_kCFFTPResourceSize'; (* attribute const *)
  378. {
  379. * kCFFTPResourceType
  380. *
  381. * Discussion:
  382. * CFDictinary key, for get value operation. CFNumber to hold the
  383. * resource type as defined in sys/dirent.h.
  384. *
  385. * Availability:
  386. * Mac OS X: in version 10.3 and later in CoreServices.framework
  387. * CarbonLib: not available
  388. * Non-Carbon CFM: not available
  389. }
  390. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  391. var kCFFTPResourceType: CFStringRef; external name '_kCFFTPResourceType'; (* attribute const *)
  392. {
  393. * kCFFTPResourceModDate
  394. *
  395. * Discussion:
  396. * CFDictinary key, for get value operation. CFDate to hold the
  397. * last modification date and time information.
  398. *
  399. * Availability:
  400. * Mac OS X: in version 10.3 and later in CoreServices.framework
  401. * CarbonLib: not available
  402. * Non-Carbon CFM: not available
  403. }
  404. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  405. var kCFFTPResourceModDate: CFStringRef; external name '_kCFFTPResourceModDate'; (* attribute const *)
  406. {
  407. * CFReadStreamCreateWithFTPURL()
  408. *
  409. * Discussion:
  410. * Create an FTP read stream for downloading operation from an FTP
  411. * URL. If the URL refers to a directory, the stream is a filtered
  412. * line-at-a-time read stream corresponding to the listing results
  413. * provided by the server. If it's a file, then the stream is a
  414. * regular read stream providing the data for that file.
  415. *
  416. * Mac OS X threading:
  417. * Thread safe
  418. *
  419. * Parameters:
  420. *
  421. * alloc:
  422. * A pointer to the CFAllocator which should be used to allocate
  423. * memory for the CF read stream and its storage for values. If
  424. * this reference is not a valid CFAllocator, the behavior is
  425. * undefined.
  426. *
  427. * ftpURL:
  428. * A pointer to a CFURL structure created by CFURLCreateWithString
  429. * function. If this parameter is not a pointer to a valid CFURL
  430. * structure, the behavior is undefined.
  431. *
  432. * Result:
  433. * A pointer to the CF read stream created, or NULL if failed. It is
  434. * caller's responsibilty to release the memory allocated for the
  435. * read stream.
  436. *
  437. * Availability:
  438. * Mac OS X: in version 10.3 and later in CoreServices.framework
  439. * CarbonLib: not available
  440. * Non-Carbon CFM: not available
  441. }
  442. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  443. function CFReadStreamCreateWithFTPURL( alloc: CFAllocatorRef; ftpURL: CFURLRef ): CFReadStreamRef; external name '_CFReadStreamCreateWithFTPURL';
  444. {
  445. * CFFTPCreateParsedResourceListing()
  446. *
  447. * Discussion:
  448. * Parse a line of file or folder listing of Unix format, and store
  449. * the extracted result in a CFDictionary.
  450. *
  451. * Mac OS X threading:
  452. * Thread safe
  453. *
  454. * Parameters:
  455. *
  456. * alloc:
  457. * A pointer to the CFAllocator which should be used to allocate
  458. * memory for the CFDictionary to hold resource info. If this
  459. * reference is not a valid CFAllocator, the behavior is undefined.
  460. *
  461. * buffer:
  462. * A pointer to a buffer that may hold lines of resource listing,
  463. * but only the first line starting from buffer[0] will be parsed
  464. * each call.
  465. *
  466. * bufferLength:
  467. * The maximum buffer size in bytes started from the location
  468. * pointed by "buffer."
  469. *
  470. * parsed:
  471. * A pointer to a CFDictionary pointer. The dictionary holds the
  472. * extracted resource information. When parsing fails, a NULL
  473. * pointer will be returned. It is caller's responsibilty to
  474. * release the memory allocated for the dictionary.
  475. *
  476. * Result:
  477. * The number of bytes consumed from buffer, 0 if there are not
  478. * enough bytes, or -1 if a parse failure occurs.
  479. *
  480. * Availability:
  481. * Mac OS X: in version 10.3 and later in CoreServices.framework
  482. * CarbonLib: not available
  483. * Non-Carbon CFM: not available
  484. }
  485. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  486. function CFFTPCreateParsedResourceListing( alloc: CFAllocatorRef; buffer: UnivPtr; bufferLength: CFIndex; var parsed: CFDictionaryRef ): CFIndex; external name '_CFFTPCreateParsedResourceListing';
  487. {
  488. * CFWriteStreamCreateWithFTPURL()
  489. *
  490. * Discussion:
  491. * Create an FTP write stream for uploading operation to a FTP URL.
  492. * If the URL specifies a directory, the open will be followed by a
  493. * close event/state and the directory will have been created.
  494. * Intermediary directory structure is not created.
  495. *
  496. * Mac OS X threading:
  497. * Thread safe
  498. *
  499. * Parameters:
  500. *
  501. * alloc:
  502. * A pointer to the CFAllocator which should be used to allocate
  503. * memory for the CF read stream and its storage for values. If
  504. * this reference is not a valid CFAllocator, the behavior is
  505. * undefined.
  506. *
  507. * ftpURL:
  508. * A pointer to a CFURL structure created by CFURLCreateWithString
  509. * function. If this parameter is not a pointer to a valid CFURL
  510. * structure, the behavior is undefined.
  511. *
  512. * Result:
  513. * A pointer to the CF write stream created, or NULL if failed. It
  514. * is caller's responsibilty to release the memory allocated for the
  515. * write stream.
  516. *
  517. * Availability:
  518. * Mac OS X: in version 10.3 and later in CoreServices.framework
  519. * CarbonLib: not available
  520. * Non-Carbon CFM: not available
  521. }
  522. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  523. function CFWriteStreamCreateWithFTPURL( alloc: CFAllocatorRef; ftpURL: CFURLRef ): CFWriteStreamRef; external name '_CFWriteStreamCreateWithFTPURL';
  524. end.