CFFTPStream.pas 22 KB

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