CFFTPStream.pas 21 KB

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