CFSocketStream.pas 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037
  1. {
  2. File: CFNetwork/CFSocketStream.h
  3. Contains: CoreFoundation Network socket streams 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: Gale R Paeper, <[email protected]>, 2008 }
  11. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  12. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  13. { Pascal Translation Updated: Jonas Maebe <[email protected]>, August 2015 }
  14. {
  15. Modified for use with Free Pascal
  16. Version 308
  17. Please report any bugs to <[email protected]>
  18. }
  19. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  20. {$mode macpas}
  21. {$modeswitch cblocks}
  22. {$packenum 1}
  23. {$macro on}
  24. {$inline on}
  25. {$calling mwpascal}
  26. unit CFSocketStream;
  27. interface
  28. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  29. {$setc GAP_INTERFACES_VERSION := $0308}
  30. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  31. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  32. {$endc}
  33. {$ifc defined CPUPOWERPC and defined CPUI386}
  34. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  35. {$endc}
  36. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  37. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  38. {$endc}
  39. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  40. {$setc __ppc__ := 1}
  41. {$elsec}
  42. {$setc __ppc__ := 0}
  43. {$endc}
  44. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  45. {$setc __ppc64__ := 1}
  46. {$elsec}
  47. {$setc __ppc64__ := 0}
  48. {$endc}
  49. {$ifc not defined __i386__ and defined CPUI386}
  50. {$setc __i386__ := 1}
  51. {$elsec}
  52. {$setc __i386__ := 0}
  53. {$endc}
  54. {$ifc not defined __x86_64__ and defined CPUX86_64}
  55. {$setc __x86_64__ := 1}
  56. {$elsec}
  57. {$setc __x86_64__ := 0}
  58. {$endc}
  59. {$ifc not defined __arm__ and defined CPUARM}
  60. {$setc __arm__ := 1}
  61. {$elsec}
  62. {$setc __arm__ := 0}
  63. {$endc}
  64. {$ifc not defined __arm64__ and defined CPUAARCH64}
  65. {$setc __arm64__ := 1}
  66. {$elsec}
  67. {$setc __arm64__ := 0}
  68. {$endc}
  69. {$ifc defined cpu64}
  70. {$setc __LP64__ := 1}
  71. {$elsec}
  72. {$setc __LP64__ := 0}
  73. {$endc}
  74. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  75. {$error Conflicting definitions for __ppc__ and __i386__}
  76. {$endc}
  77. {$ifc defined __ppc__ and __ppc__}
  78. {$setc TARGET_CPU_PPC := TRUE}
  79. {$setc TARGET_CPU_PPC64 := FALSE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_CPU_ARM64 := FALSE}
  84. {$setc TARGET_OS_MAC := TRUE}
  85. {$setc TARGET_OS_IPHONE := FALSE}
  86. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  87. {$setc TARGET_OS_EMBEDDED := FALSE}
  88. {$elifc defined __ppc64__ and __ppc64__}
  89. {$setc TARGET_CPU_PPC := FALSE}
  90. {$setc TARGET_CPU_PPC64 := TRUE}
  91. {$setc TARGET_CPU_X86 := FALSE}
  92. {$setc TARGET_CPU_X86_64 := FALSE}
  93. {$setc TARGET_CPU_ARM := FALSE}
  94. {$setc TARGET_CPU_ARM64 := FALSE}
  95. {$setc TARGET_OS_MAC := TRUE}
  96. {$setc TARGET_OS_IPHONE := FALSE}
  97. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  98. {$setc TARGET_OS_EMBEDDED := FALSE}
  99. {$elifc defined __i386__ and __i386__}
  100. {$setc TARGET_CPU_PPC := FALSE}
  101. {$setc TARGET_CPU_PPC64 := FALSE}
  102. {$setc TARGET_CPU_X86 := TRUE}
  103. {$setc TARGET_CPU_X86_64 := FALSE}
  104. {$setc TARGET_CPU_ARM := FALSE}
  105. {$setc TARGET_CPU_ARM64 := FALSE}
  106. {$ifc defined iphonesim}
  107. {$setc TARGET_OS_MAC := FALSE}
  108. {$setc TARGET_OS_IPHONE := TRUE}
  109. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  110. {$elsec}
  111. {$setc TARGET_OS_MAC := TRUE}
  112. {$setc TARGET_OS_IPHONE := FALSE}
  113. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  114. {$endc}
  115. {$setc TARGET_OS_EMBEDDED := FALSE}
  116. {$elifc defined __x86_64__ and __x86_64__}
  117. {$setc TARGET_CPU_PPC := FALSE}
  118. {$setc TARGET_CPU_PPC64 := FALSE}
  119. {$setc TARGET_CPU_X86 := FALSE}
  120. {$setc TARGET_CPU_X86_64 := TRUE}
  121. {$setc TARGET_CPU_ARM := FALSE}
  122. {$setc TARGET_CPU_ARM64 := FALSE}
  123. {$ifc defined iphonesim}
  124. {$setc TARGET_OS_MAC := FALSE}
  125. {$setc TARGET_OS_IPHONE := TRUE}
  126. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  127. {$elsec}
  128. {$setc TARGET_OS_MAC := TRUE}
  129. {$setc TARGET_OS_IPHONE := FALSE}
  130. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  131. {$endc}
  132. {$setc TARGET_OS_EMBEDDED := FALSE}
  133. {$elifc defined __arm__ and __arm__}
  134. {$setc TARGET_CPU_PPC := FALSE}
  135. {$setc TARGET_CPU_PPC64 := FALSE}
  136. {$setc TARGET_CPU_X86 := FALSE}
  137. {$setc TARGET_CPU_X86_64 := FALSE}
  138. {$setc TARGET_CPU_ARM := TRUE}
  139. {$setc TARGET_CPU_ARM64 := FALSE}
  140. {$setc TARGET_OS_MAC := FALSE}
  141. {$setc TARGET_OS_IPHONE := TRUE}
  142. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  143. {$setc TARGET_OS_EMBEDDED := TRUE}
  144. {$elifc defined __arm64__ and __arm64__}
  145. {$setc TARGET_CPU_PPC := FALSE}
  146. {$setc TARGET_CPU_PPC64 := FALSE}
  147. {$setc TARGET_CPU_X86 := FALSE}
  148. {$setc TARGET_CPU_X86_64 := FALSE}
  149. {$setc TARGET_CPU_ARM := FALSE}
  150. {$setc TARGET_CPU_ARM64 := TRUE}
  151. {$ifc defined ios}
  152. {$setc TARGET_OS_MAC := FALSE}
  153. {$setc TARGET_OS_IPHONE := TRUE}
  154. {$setc TARGET_OS_EMBEDDED := TRUE}
  155. {$elsec}
  156. {$setc TARGET_OS_MAC := TRUE}
  157. {$setc TARGET_OS_IPHONE := FALSE}
  158. {$setc TARGET_OS_EMBEDDED := FALSE}
  159. {$endc}
  160. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  161. {$elsec}
  162. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  163. {$endc}
  164. {$ifc defined __LP64__ and __LP64__ }
  165. {$setc TARGET_CPU_64 := TRUE}
  166. {$elsec}
  167. {$setc TARGET_CPU_64 := FALSE}
  168. {$endc}
  169. {$ifc defined FPC_BIG_ENDIAN}
  170. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  171. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  172. {$elifc defined FPC_LITTLE_ENDIAN}
  173. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  174. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  175. {$elsec}
  176. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  177. {$endc}
  178. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  179. {$setc CALL_NOT_IN_CARBON := FALSE}
  180. {$setc OLDROUTINENAMES := FALSE}
  181. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  182. {$setc OPAQUE_UPP_TYPES := TRUE}
  183. {$setc OTCARBONAPPLICATION := TRUE}
  184. {$setc OTKERNEL := FALSE}
  185. {$setc PM_USE_SESSION_APIS := TRUE}
  186. {$setc TARGET_API_MAC_CARBON := TRUE}
  187. {$setc TARGET_API_MAC_OS8 := FALSE}
  188. {$setc TARGET_API_MAC_OSX := TRUE}
  189. {$setc TARGET_CARBON := TRUE}
  190. {$setc TARGET_CPU_68K := FALSE}
  191. {$setc TARGET_CPU_MIPS := FALSE}
  192. {$setc TARGET_CPU_SPARC := FALSE}
  193. {$setc TARGET_OS_UNIX := FALSE}
  194. {$setc TARGET_OS_WIN32 := FALSE}
  195. {$setc TARGET_RT_MAC_68881 := FALSE}
  196. {$setc TARGET_RT_MAC_CFM := FALSE}
  197. {$setc TARGET_RT_MAC_MACHO := TRUE}
  198. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  199. {$setc TYPE_BOOL := FALSE}
  200. {$setc TYPE_EXTENDED := FALSE}
  201. {$setc TYPE_LONGLONG := TRUE}
  202. uses MacTypes,CFStream,CFBase,CFHost,CFNetServices;
  203. {$endc} {not MACOSALLINCLUDE}
  204. {$ALIGN POWER}
  205. {
  206. * kCFStreamPropertySSLContext
  207. *
  208. * The SSLContextRef used for both read and write operations on a
  209. * CFSocketStream.
  210. *
  211. * CFReadStreamCopyProperty or CFWriteStreamCopyProperty return an
  212. * appropriately reference counted SSLContextRef. If the stream has
  213. * not yet been opened, this SSLContext may be configured directly
  214. * using the appropriate SecureTransport APIs.
  215. *
  216. * CFReadStreamSetProperty or CFWriteStreamSetProperty will allow you
  217. * to specify an SSLContextRef for a stream. If the stream has not
  218. * been opened, the SSLContextRef will replace any existing
  219. * SSLContextRef and be used in the initial stream handshake. If the
  220. * stream has been opened without SSL enabled, setting this property
  221. * will initiate an SSL handshake over the existing socket.
  222. *
  223. * If an SSL settings dictionary was set via
  224. * kCFStreamPropertySSLSettings, a SSLContextRef is created internally
  225. * and configured as per the dictionary. However, if an SSLContextRef
  226. * is set after this, its configuration will take precedence over the
  227. * previously configured context.
  228. *
  229. * Reconfiguring an SSLContext after the stream it is bound to has
  230. * opened is unsupported.
  231. *
  232. * Note that this property is currently only supported on iOS 5.0 and
  233. * later.
  234. }
  235. var kCFStreamPropertySSLContext: CFStringRef; external name '_kCFStreamPropertySSLContext'; (* attribute const *)
  236. (* __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_5_0) *)
  237. {
  238. * kCFStreamPropertySSLPeerTrust
  239. *
  240. * Discussion:
  241. * Stream property value for copy operations. Returns a SecTrustRef
  242. * which was a result of the SSL handshake. This property is not valid before
  243. * a stream is opened. See Security/SecTrust.h for more information.
  244. *
  245. }
  246. var kCFStreamPropertySSLPeerTrust: CFStringRef; external name '_kCFStreamPropertySSLPeerTrust'; (* attribute const *)
  247. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  248. {
  249. * kCFStreamSSLValidatesCertificateChain
  250. *
  251. * Discussion:
  252. * Security property key for kCFStreamPropertySSLSettings.
  253. * CFBooleanRef indicating whether the certificate chain should be
  254. * validated or not. The value is kCFBooleanTrue by default (not
  255. * set).
  256. *
  257. * Availability:
  258. * Mac OS X: in version 10.4 and later in CoreServices.framework
  259. * CarbonLib: not available
  260. * Non-Carbon CFM: not available
  261. }
  262. var kCFStreamSSLValidatesCertificateChain: CFStringRef; external name '_kCFStreamSSLValidatesCertificateChain'; (* attribute const *)
  263. (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
  264. {
  265. * kCFStreamPropertySSLSettings
  266. *
  267. * Discussion:
  268. * Stream property key for set operations. CFDictionaryRef filled
  269. * with different security settings. By default, there are no
  270. * security settings.
  271. *
  272. * Availability:
  273. * Mac OS X: in version 10.4 and later in CoreServices.framework
  274. * CarbonLib: not available
  275. * Non-Carbon CFM: not available
  276. }
  277. var kCFStreamPropertySSLSettings: CFStringRef; external name '_kCFStreamPropertySSLSettings'; (* attribute const *)
  278. (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
  279. {
  280. * kCFStreamSSLLevel
  281. *
  282. * Discussion:
  283. * Security property key for kCFStreamPropertySSLSettings.
  284. * CFStringRef being one of the security levels. The value is
  285. * kCFStreamSocketSecurityLevelNegotiatedSSL by default (not set).
  286. *
  287. * Availability:
  288. * Mac OS X: in version 10.4 and later in CoreServices.framework
  289. * CarbonLib: not available
  290. * Non-Carbon CFM: not available
  291. }
  292. var kCFStreamSSLLevel: CFStringRef; external name '_kCFStreamSSLLevel'; (* attribute const *)
  293. (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
  294. {
  295. * kCFStreamSSLPeerName
  296. *
  297. * Discussion:
  298. * Security property key for kCFStreamPropertySSLSettings.
  299. * CFStringRef overriding the name used for certificate
  300. * verification. Set to kCFNull to prevent name verification.
  301. * Default is the host name with which the streams were created. If
  302. * no host name was used, no peer name will be used.
  303. *
  304. * Availability:
  305. * Mac OS X: in version 10.4 and later in CoreServices.framework
  306. * CarbonLib: not available
  307. * Non-Carbon CFM: not available
  308. }
  309. var kCFStreamSSLPeerName: CFStringRef; external name '_kCFStreamSSLPeerName'; (* attribute const *)
  310. (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
  311. {
  312. * kCFStreamSSLCertificates
  313. *
  314. * Discussion:
  315. * Security property key for kCFStreamPropertySSLSettings.
  316. * CFArrayRef of SecCertificateRefs, except for index [0], which is
  317. * a SecIdentityRef. See SSLSetCertificate in
  318. * Security/SecureTransport.h for more information.
  319. *
  320. * Availability:
  321. * Mac OS X: in version 10.4 and later in CoreServices.framework
  322. * CarbonLib: not available
  323. * Non-Carbon CFM: not available
  324. }
  325. var kCFStreamSSLCertificates: CFStringRef; external name '_kCFStreamSSLCertificates'; (* attribute const *)
  326. (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
  327. {
  328. * kCFStreamSSLIsServer
  329. *
  330. * Discussion:
  331. * Security property key for kCFStreamPropertySSLSettings.
  332. * CFBooleanRef indicating whether the connection is to act as a
  333. * server in the SSL process or not. The value is kCFBooleanFalse
  334. * by default (not set). If set to kCFBooleanTrue, there must be a
  335. * valid value for the kCFStreamSSLCertificates key too.
  336. *
  337. * Availability:
  338. * Mac OS X: in version 10.4 and later in CoreServices.framework
  339. * CarbonLib: not available
  340. * Non-Carbon CFM: not available
  341. }
  342. var kCFStreamSSLIsServer: CFStringRef; external name '_kCFStreamSSLIsServer'; (* attribute const *)
  343. (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
  344. {
  345. * The following properties are considered deprecated in Mac OS 10.6 and later.
  346. *
  347. * kCFStreamPropertySSLPeerCertificates:
  348. * The peer certificates are available as part of the SecTrustRef object. See <Security/SecTrust.h>
  349. *
  350. * kCFStreamSSLAllowsExpiredCertificates:
  351. * kCFStreamSSLAllowsExpiredRoots:
  352. * kCFStreamSSLAllowsAnyRoot:
  353. * The SSL handshake flags which affect untrusted certificate chain evaluation are deprecated.
  354. * Instead, use the single property kCFStreamSSLValidatesCertificateChain to disable certificate
  355. * chain checking if the user has decided that it is appropriate to do so.
  356. }
  357. {$ifc TARGET_OS_MAC}
  358. {
  359. * kCFStreamPropertySSLPeerCertificates
  360. *
  361. * Discussion:
  362. * Stream property key for copy operations. CFArrayRef containing
  363. * SecCertificateRefs. See SSLGetPeerCertificates in
  364. * Security/SecureTransport.h for more information.
  365. *
  366. * Availability:
  367. * Mac OS X: in version 10.4 and later in CoreServices.framework
  368. * CarbonLib: not available
  369. * Non-Carbon CFM: not available
  370. }
  371. var kCFStreamPropertySSLPeerCertificates: CFStringRef; external name '_kCFStreamPropertySSLPeerCertificates'; (* attribute const *)
  372. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_6,__IPHONE_NA,__IPHONE_NA) *)
  373. {
  374. * kCFStreamSSLAllowsExpiredCertificates
  375. *
  376. * Discussion:
  377. * Security property key for kCFStreamPropertySSLSettings.
  378. * CFBooleanRef indicating whether expired certificates should be
  379. * allowed or not. The value is kCFBooleanFalse by default (not
  380. * set).
  381. *
  382. * Availability:
  383. * Mac OS X: in version 10.4 and later in CoreServices.framework
  384. * CarbonLib: not available
  385. * Non-Carbon CFM: not available
  386. }
  387. var kCFStreamSSLAllowsExpiredCertificates: CFStringRef; external name '_kCFStreamSSLAllowsExpiredCertificates'; (* attribute const *)
  388. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_6,__IPHONE_NA,__IPHONE_NA) *)
  389. {
  390. * kCFStreamSSLAllowsExpiredRoots
  391. *
  392. * Discussion:
  393. * Security property key for kCFStreamPropertySSLSettings.
  394. * CFBooleanRef indicating whether expired root certificates should
  395. * be allowed or not. The value is kCFBooleanFalse by default (not
  396. * set).
  397. *
  398. * Availability:
  399. * Mac OS X: in version 10.4 and later in CoreServices.framework
  400. * CarbonLib: not available
  401. * Non-Carbon CFM: not available
  402. }
  403. var kCFStreamSSLAllowsExpiredRoots: CFStringRef; external name '_kCFStreamSSLAllowsExpiredRoots'; (* attribute const *)
  404. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_6,__IPHONE_NA,__IPHONE_NA) *)
  405. {
  406. * kCFStreamSSLAllowsAnyRoot
  407. *
  408. * Discussion:
  409. * Security property key for kCFStreamPropertySSLSettings.
  410. * CFBooleanRef indicating whether any root certificates should be
  411. * allowed or not. The value is kCFBooleanFalse by default (not
  412. * set).
  413. *
  414. * Availability:
  415. * Mac OS X: in version 10.4 and later in CoreServices.framework
  416. * CarbonLib: not available
  417. * Non-Carbon CFM: not available
  418. }
  419. var kCFStreamSSLAllowsAnyRoot: CFStringRef; external name '_kCFStreamSSLAllowsAnyRoot'; (* attribute const *)
  420. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_6,__IPHONE_NA,__IPHONE_NA) *)
  421. {$endc} {TARGET_OS_MAC}
  422. { kCFStreamNetworkServiceType
  423. *
  424. * Discussion:
  425. * Property key to specify the type of service for the stream. This
  426. * allows the system to properly handle the request with respect to
  427. * routing, suspension behavior and other networking related attributes
  428. * appropriate for the given service type. The service types supported
  429. * are documented below. Most streams should not need to set this
  430. * property.
  431. }
  432. var kCFStreamNetworkServiceType: CFStringRef; external name '_kCFStreamNetworkServiceType'; (* attribute const *)
  433. (* __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0) *)
  434. { supported network service types: }
  435. var kCFStreamNetworkServiceTypeVoIP: CFStringRef; external name '_kCFStreamNetworkServiceTypeVoIP'; (* attribute const *)
  436. (* __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_0) *) // voice over IP control
  437. var kCFStreamNetworkServiceTypeVideo: CFStringRef; external name '_kCFStreamNetworkServiceTypeVideo'; (* attribute const *)
  438. (* __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) *) // interactive video
  439. var kCFStreamNetworkServiceTypeBackground: CFStringRef; external name '_kCFStreamNetworkServiceTypeBackground'; (* attribute const *)
  440. (* __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) *) // background
  441. var kCFStreamNetworkServiceTypeVoice: CFStringRef; external name '_kCFStreamNetworkServiceTypeVoice'; (* attribute const *)
  442. (* __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) *) // interactive voice data
  443. {
  444. * kCFStreamPropertyNoCellular
  445. *
  446. * Discussion:
  447. * Stream property value, for both set and copy operations.
  448. * The value is a CFBooleanRef which indicates whether the connection
  449. * is allowed to use the built-in celluar radios. A value of kCFBooleanTrue
  450. * disallows use of cellular interfaces. kCFBooleanFalse (the default)
  451. * allows use of cellular interfaces.
  452. *
  453. }
  454. var kCFStreamPropertyNoCellular: CFStringRef; external name '_kCFStreamPropertyNoCellular'; (* attribute const *)
  455. (* __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0) *)
  456. { kCFStreamPropertyConnectionIsCellular
  457. *
  458. * Discussion:
  459. * Stream property key for copy operations. Returns a CFBooleanRef value
  460. * of kCFBooleanTrue if the stream has connected using the built in cellular radios.
  461. * It returns kCFBooleanFalse if the stream is conneceted over a non-cellular
  462. * interface or has not yet established a connection.
  463. }
  464. var kCFStreamPropertyConnectionIsCellular: CFStringRef; external name '_kCFStreamPropertyConnectionIsCellular'; (* attribute const *)
  465. (* __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0) *)
  466. {
  467. * kCFStreamErrorDomainWinSock
  468. *
  469. * Discussion:
  470. * WinSock error domain. On Win32 platforms, networking errors will
  471. * come in this domain. See <winsock2.h> for values. Note that
  472. * non-networking errors, like ENOMEM, will continue to come in the
  473. * POSIX domain as on OS X.
  474. *
  475. * Availability:
  476. * Mac OS X: in version 10.5 and later in CoreServices.framework
  477. * CarbonLib: not available
  478. * Non-Carbon CFM: not available
  479. }
  480. var kCFStreamErrorDomainWinSock: CFIndex; external name '_kCFStreamErrorDomainWinSock'; (* attribute const *)
  481. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  482. {
  483. * kCFStreamErrorDomainSOCKS
  484. *
  485. * Discussion:
  486. * SOCKS proxy error domain. Errors formulated using inlines below.
  487. *
  488. * Availability:
  489. * Mac OS X: in version 10.2 and later
  490. * CarbonLib: not available
  491. * Non-Carbon CFM: not available
  492. }
  493. var kCFStreamErrorDomainSOCKS: SInt32; external name '_kCFStreamErrorDomainSOCKS'; (* attribute const *)
  494. {
  495. CF_INLINE
  496. SInt32 CFSocketStreamSOCKSGetErrorSubdomain(const CFStreamError* error)
  497. return ((error->error >> 16) & 0x0000FFFF);
  498. CF_INLINE
  499. SInt32 CFSocketStreamSOCKSGetError(CFStreamError* error)
  500. return (error->error & 0x0000FFFF);
  501. }
  502. const
  503. kCFStreamErrorSOCKSSubDomainNone = 0; { Error code is a general SOCKS error}
  504. kCFStreamErrorSOCKSSubDomainVersionCode = 1; { Error code is the version of SOCKS which the server wishes to use}
  505. kCFStreamErrorSOCKS4SubDomainResponse = 2; { Error code is the status code returned by the server}
  506. kCFStreamErrorSOCKS5SubDomainUserPass = 3; { Error code is the status code that the server returned}
  507. kCFStreamErrorSOCKS5SubDomainMethod = 4; { Error code is the server's desired negotiation method}
  508. kCFStreamErrorSOCKS5SubDomainResponse = 5; { Error code is the response code that the server returned in reply to the connection request}
  509. { kCFStreamErrorSOCKSSubDomainNone}
  510. const
  511. kCFStreamErrorSOCKS5BadResponseAddr = 1;
  512. kCFStreamErrorSOCKS5BadState = 2;
  513. kCFStreamErrorSOCKSUnknownClientVersion = 3;
  514. { kCFStreamErrorSOCKS4SubDomainResponse}
  515. const
  516. kCFStreamErrorSOCKS4RequestFailed = 91; { request rejected or failed }
  517. kCFStreamErrorSOCKS4IdentdFailed = 92; { request rejected because SOCKS server cannot connect to identd on the client }
  518. kCFStreamErrorSOCKS4IdConflict = 93; { request rejected because the client program and identd report different user-ids }
  519. { kCFStreamErrorSOCKS5SubDomainMethod}
  520. const
  521. kSOCKS5NoAcceptableMethod = $FF; { other values indicate the server's desired method }
  522. {
  523. * kCFStreamPropertySOCKSProxy
  524. *
  525. * Discussion:
  526. * Stream property key, for both set and copy operations. To set a
  527. * stream to use a SOCKS proxy, call CFReadStreamSetProperty or
  528. * CFWriteStreamSetProperty with the property name set to
  529. * kCFStreamPropertySOCKSProxy and the value being a dictionary with
  530. * at least the following two keys: kCFStreamPropertySOCKSProxyHost
  531. * and kCFStreamPropertySOCKSProxyPort. The dictionary returned by
  532. * SystemConfiguration for SOCKS proxies will work without
  533. * alteration.
  534. *
  535. * Availability:
  536. * Mac OS X: in version 10.2 and later
  537. * CarbonLib: not available
  538. * Non-Carbon CFM: not available
  539. }
  540. var kCFStreamPropertySOCKSProxy: CFStringRef; external name '_kCFStreamPropertySOCKSProxy'; (* attribute const *)
  541. {
  542. * kCFStreamPropertySOCKSProxyHost
  543. *
  544. * Discussion:
  545. * CFDictionary key for SOCKS proxy information. The key
  546. * kCFStreamPropertySOCKSProxyHost should contain a CFStringRef
  547. * value representing the SOCKS proxy host. Defined to match
  548. * kSCPropNetProxiesSOCKSProxy
  549. *
  550. * Availability:
  551. * Mac OS X: in version 10.2 and later
  552. * CarbonLib: not available
  553. * Non-Carbon CFM: not available
  554. }
  555. var kCFStreamPropertySOCKSProxyHost: CFStringRef; external name '_kCFStreamPropertySOCKSProxyHost'; (* attribute const *)
  556. {
  557. * kCFStreamPropertySOCKSProxyPort
  558. *
  559. * Discussion:
  560. * CFDictionary key for SOCKS proxy information. The key
  561. * kCFStreamPropertySOCKSProxyPort should contain a CFNumberRef
  562. * which itself is of type kCFNumberSInt32Type. This value should
  563. * represent the port on which the proxy is listening. Defined to
  564. * match kSCPropNetProxiesSOCKSPort
  565. *
  566. * Availability:
  567. * Mac OS X: in version 10.2 and later
  568. * CarbonLib: not available
  569. * Non-Carbon CFM: not available
  570. }
  571. var kCFStreamPropertySOCKSProxyPort: CFStringRef; external name '_kCFStreamPropertySOCKSProxyPort'; (* attribute const *)
  572. {
  573. * kCFStreamPropertySOCKSVersion
  574. *
  575. * Discussion:
  576. * CFDictionary key for SOCKS proxy information. By default, SOCKS5
  577. * will be used unless there is a kCFStreamPropertySOCKSVersion key
  578. * in the dictionary. Its value must be
  579. * kCFStreamSocketSOCKSVersion4 or kCFStreamSocketSOCKSVersion5 to
  580. * set SOCKS4 or SOCKS5, respectively.
  581. *
  582. * Availability:
  583. * Mac OS X: in version 10.2 and later
  584. * CarbonLib: not available
  585. * Non-Carbon CFM: not available
  586. }
  587. var kCFStreamPropertySOCKSVersion: CFStringRef; external name '_kCFStreamPropertySOCKSVersion'; (* attribute const *)
  588. {
  589. * kCFStreamSocketSOCKSVersion4
  590. *
  591. * Discussion:
  592. * CFDictionary value for SOCKS proxy information. Indcates that
  593. * SOCKS will or is using version 4 of the SOCKS protocol.
  594. *
  595. * Availability:
  596. * Mac OS X: in version 10.2 and later
  597. * CarbonLib: not available
  598. * Non-Carbon CFM: not available
  599. }
  600. var kCFStreamSocketSOCKSVersion4: CFStringRef; external name '_kCFStreamSocketSOCKSVersion4'; (* attribute const *)
  601. {
  602. * kCFStreamSocketSOCKSVersion5
  603. *
  604. * Discussion:
  605. * CFDictionary value for SOCKS proxy information. Indcates that
  606. * SOCKS will or is using version 5 of the SOCKS protocol.
  607. *
  608. * Availability:
  609. * Mac OS X: in version 10.2 and later
  610. * CarbonLib: not available
  611. * Non-Carbon CFM: not available
  612. }
  613. var kCFStreamSocketSOCKSVersion5: CFStringRef; external name '_kCFStreamSocketSOCKSVersion5'; (* attribute const *)
  614. {
  615. * kCFStreamPropertySOCKSUser
  616. *
  617. * Discussion:
  618. * CFDictionary key for SOCKS proxy information. To set a user name
  619. * and/or password, if required, the dictionary must contain the
  620. * key(s) kCFStreamPropertySOCKSUser and/or
  621. * kCFStreamPropertySOCKSPassword with the value being the user's
  622. * name as a CFStringRef and/or the user's password as a
  623. * CFStringRef, respectively.
  624. *
  625. * Availability:
  626. * Mac OS X: in version 10.2 and later
  627. * CarbonLib: not available
  628. * Non-Carbon CFM: not available
  629. }
  630. var kCFStreamPropertySOCKSUser: CFStringRef; external name '_kCFStreamPropertySOCKSUser'; (* attribute const *)
  631. {
  632. * kCFStreamPropertySOCKSPassword
  633. *
  634. * Discussion:
  635. * CFDictionary key for SOCKS proxy information. To set a user name
  636. * and/or password, if required, the dictionary must contain the
  637. * key(s) kCFStreamPropertySOCKSUser and/or
  638. * kCFStreamPropertySOCKSPassword with the value being the user's
  639. * name as a CFStringRef and/or the user's password as a
  640. * CFStringRef, respectively.
  641. *
  642. * Availability:
  643. * Mac OS X: in version 10.2 and later
  644. * CarbonLib: not available
  645. * Non-Carbon CFM: not available
  646. }
  647. var kCFStreamPropertySOCKSPassword: CFStringRef; external name '_kCFStreamPropertySOCKSPassword'; (* attribute const *)
  648. {
  649. * kCFStreamErrorDomainSSL
  650. *
  651. * Discussion:
  652. * Errors located in Security/SecureTransport.h
  653. *
  654. * Availability:
  655. * Mac OS X: in version 10.2 and later
  656. * CarbonLib: not available
  657. * Non-Carbon CFM: not available
  658. }
  659. var kCFStreamErrorDomainSSL: SInt32; external name '_kCFStreamErrorDomainSSL'; (* attribute const *)
  660. {
  661. * kCFStreamPropertySocketSecurityLevel
  662. *
  663. * Discussion:
  664. * Stream property key, for both set and copy operations. To set a
  665. * stream to be secure, call CFReadStreamSetProperty or
  666. * CFWriteStreamSetPropertywith the property name set to
  667. * kCFStreamPropertySocketSecurityLevel and the value being one of
  668. * the following values. Streams may set a security level after
  669. * open in order to allow on-the-fly securing of a stream.
  670. *
  671. * Availability:
  672. * Mac OS X: in version 10.2 and later
  673. * CarbonLib: not available
  674. * Non-Carbon CFM: not available
  675. }
  676. var kCFStreamPropertySocketSecurityLevel: CFStringRef; external name '_kCFStreamPropertySocketSecurityLevel'; (* attribute const *)
  677. {
  678. * kCFStreamSocketSecurityLevelNone
  679. *
  680. * Discussion:
  681. * Stream property value, for both set and copy operations.
  682. * Indicates to use no security (default setting).
  683. *
  684. * Availability:
  685. * Mac OS X: in version 10.2 and later
  686. * CarbonLib: not available
  687. * Non-Carbon CFM: not available
  688. }
  689. var kCFStreamSocketSecurityLevelNone: CFStringRef; external name '_kCFStreamSocketSecurityLevelNone'; (* attribute const *)
  690. {
  691. * kCFStreamSocketSecurityLevelSSLv2
  692. *
  693. * Discussion:
  694. * Stream property value, for both set and copy operations.
  695. * Indicates to use SSLv2 security.
  696. *
  697. * Availability:
  698. * Mac OS X: in version 10.2 and later
  699. * CarbonLib: not available
  700. * Non-Carbon CFM: not available
  701. }
  702. var kCFStreamSocketSecurityLevelSSLv2: CFStringRef; external name '_kCFStreamSocketSecurityLevelSSLv2'; (* attribute const *)
  703. {
  704. * kCFStreamSocketSecurityLevelSSLv3
  705. *
  706. * Discussion:
  707. * Stream property value, for both set and copy operations.
  708. * Indicates to use SSLv3 security.
  709. *
  710. * Availability:
  711. * Mac OS X: in version 10.2 and later
  712. * CarbonLib: not available
  713. * Non-Carbon CFM: not available
  714. }
  715. var kCFStreamSocketSecurityLevelSSLv3: CFStringRef; external name '_kCFStreamSocketSecurityLevelSSLv3'; (* attribute const *)
  716. {
  717. * kCFStreamSocketSecurityLevelTLSv1
  718. *
  719. * Discussion:
  720. * Stream property value, for both set and copy operations.
  721. * Indicates to use TLSv1 security.
  722. *
  723. * Availability:
  724. * Mac OS X: in version 10.2 and later
  725. * CarbonLib: not available
  726. * Non-Carbon CFM: not available
  727. }
  728. var kCFStreamSocketSecurityLevelTLSv1: CFStringRef; external name '_kCFStreamSocketSecurityLevelTLSv1'; (* attribute const *)
  729. {
  730. * kCFStreamSocketSecurityLevelNegotiatedSSL
  731. *
  732. * Discussion:
  733. * Stream property value, for both set and copy operations.
  734. * Indicates to use TLS or SSL with fallback to lower versions. This
  735. * is what HTTPS does, for instance.
  736. *
  737. * Availability:
  738. * Mac OS X: in version 10.2 and later
  739. * CarbonLib: not available
  740. * Non-Carbon CFM: not available
  741. }
  742. var kCFStreamSocketSecurityLevelNegotiatedSSL: CFStringRef; external name '_kCFStreamSocketSecurityLevelNegotiatedSSL'; (* attribute const *)
  743. {
  744. * kCFStreamPropertyShouldCloseNativeSocket
  745. *
  746. * Discussion:
  747. * Set the value to kCFBooleanTrue if the stream should close and
  748. * release the underlying native socket when the stream is released.
  749. * Set the value to kCFBooleanFalse to keep the native socket from
  750. * closing and releasing when the stream is released. If the stream
  751. * was created with a native socket, the default property setting on
  752. * the stream is kCFBooleanFalse. The
  753. * kCFStreamPropertyShouldCloseNativeSocket can be set through
  754. * CFReadStreamSetProperty or CFWriteStreamSetProperty. The
  755. * property can be copied through CFReadStreamCopyProperty or
  756. * CFWriteStreamCopyProperty.
  757. *
  758. * Availability:
  759. * Mac OS X: in version 10.2 and later
  760. * CarbonLib: not available
  761. * Non-Carbon CFM: not available
  762. }
  763. var kCFStreamPropertyShouldCloseNativeSocket: CFStringRef; external name '_kCFStreamPropertyShouldCloseNativeSocket'; (* attribute const *)
  764. {
  765. * kCFStreamPropertySocketRemoteHost
  766. *
  767. * Discussion:
  768. * Stream property key for copy operations. Returns a CFHostRef if
  769. * known, otherwise NULL.
  770. *
  771. * Availability:
  772. * Mac OS X: in version 10.3 and later in CoreServices.framework
  773. * CarbonLib: not available
  774. * Non-Carbon CFM: not available
  775. }
  776. var kCFStreamPropertySocketRemoteHost: CFStringRef; external name '_kCFStreamPropertySocketRemoteHost'; (* attribute const *)
  777. (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0) *)
  778. {
  779. * kCFStreamPropertySocketRemoteNetService
  780. *
  781. * Discussion:
  782. * Stream property key for copy operations. Returns a
  783. * CFNetServiceRef if known, otherwise NULL.
  784. *
  785. * Availability:
  786. * Mac OS X: in version 10.3 and later in CoreServices.framework
  787. * CarbonLib: not available
  788. * Non-Carbon CFM: not available
  789. }
  790. var kCFStreamPropertySocketRemoteNetService: CFStringRef; external name '_kCFStreamPropertySocketRemoteNetService'; (* attribute const *)
  791. (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0) *)
  792. {
  793. * CFStreamCreatePairWithSocketToCFHost()
  794. *
  795. * Discussion:
  796. * Given a CFHostRef, this function will create a pair of streams
  797. * suitable for connecting to the host. If there is a failure
  798. * during creation, the stream references will be set to NULL.
  799. *
  800. * Mac OS X threading:
  801. * Thread safe
  802. *
  803. * Parameters:
  804. *
  805. * alloc:
  806. * The CFAllocator which should be used to allocate memory for the
  807. * streams. If this reference is not a valid CFAllocator, the
  808. * behavior is undefined.
  809. *
  810. * host:
  811. * A reference to a CFHost to which the streams are desired. If
  812. * unresolved, the host will be resolved prior to connecting.
  813. *
  814. * port:
  815. * The port to which the connection should be established.
  816. *
  817. * readStream:
  818. * A pointer to a CFReadStreamRef which will be set to the new
  819. * read stream instance. Can be set to NULL if not desired.
  820. *
  821. * writeStream:
  822. * A pointer to a CFWriteStreamRef which will be set to the new
  823. * write stream instance. Can be set to NULL if not desired.
  824. *
  825. * Availability:
  826. * Mac OS X: in version 10.3 and later in CoreServices.framework
  827. * CarbonLib: not available
  828. * Non-Carbon CFM: not available
  829. }
  830. procedure CFStreamCreatePairWithSocketToCFHost( alloc: CFAllocatorRef; host: CFHostRef; port: SInt32; readStream: CFReadStreamRefPtr { can be NULL }; writeStream: CFWriteStreamRefPtr { can be NULL } ); external name '_CFStreamCreatePairWithSocketToCFHost';
  831. (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0) *)
  832. {
  833. * CFStreamCreatePairWithSocketToNetService()
  834. *
  835. * Discussion:
  836. * Given a CFNetService, this function will create a pair of streams
  837. * suitable for connecting to the service. If there is a failure
  838. * during creation, the stream references will be set to NULL.
  839. *
  840. * Mac OS X threading:
  841. * Thread safe
  842. *
  843. * Parameters:
  844. *
  845. * alloc:
  846. * The CFAllocator which should be used to allocate memory for the
  847. * streams. If this reference is not a valid CFAllocator, the
  848. * behavior is undefined.
  849. *
  850. * service:
  851. * A reference to a CFNetService to which the streams are desired.
  852. * If unresolved, the service will be resolved prior to
  853. * connecting.
  854. *
  855. * readStream:
  856. * A pointer to a CFReadStreamRef which will be set to the new
  857. * read stream instance. Can be set to NULL if not desired.
  858. *
  859. * writeStream:
  860. * A pointer to a CFWriteStreamRef which will be set to the new
  861. * write stream instance. Can be set to NULL if not desired.
  862. *
  863. * Availability:
  864. * Mac OS X: in version 10.3 and later in CoreServices.framework
  865. * CarbonLib: not available
  866. * Non-Carbon CFM: not available
  867. }
  868. procedure CFStreamCreatePairWithSocketToNetService( alloc: CFAllocatorRef; service: CFNetServiceRef; readStream: CFReadStreamRefPtr { can be NULL }; writeStream: CFWriteStreamRefPtr { can be NULL } ); external name '_CFStreamCreatePairWithSocketToNetService';
  869. (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0) *)
  870. {$ifc TARGET_OS_MAC}
  871. {
  872. * CFStreamSocketSecurityProtocol
  873. *
  874. * Discussion:
  875. * These enum values and CFSocketStreamPairSetSecurityProtocol have
  876. * been deprecated in favor of CFReadStreamSetProperty and
  877. * CFWriteStreamSetProperty with the previously mentioned property
  878. * and values.
  879. }
  880. type
  881. CFStreamSocketSecurityProtocol = SInt32;
  882. const
  883. {
  884. * DEPRECATED, use kCFStreamSocketSecurityLevelNone
  885. }
  886. kCFStreamSocketSecurityNone = 0;
  887. {
  888. * DEPRECATED, use kCFStreamSocketSecurityLevelSSLv2
  889. }
  890. kCFStreamSocketSecuritySSLv2 = 1;
  891. {
  892. * DEPRECATED, use kCFStreamSocketSecurityLevelSSLv3
  893. }
  894. kCFStreamSocketSecuritySSLv3 = 2;
  895. {
  896. * DEPRECATED, use kCFStreamSocketSecurityLevelNegotiatedSSL
  897. }
  898. kCFStreamSocketSecuritySSLv23 = 3;
  899. {
  900. * DEPRECATED, use kCFStreamSocketSecurityLevelTLSv1
  901. }
  902. kCFStreamSocketSecurityTLSv1 = 4;
  903. {
  904. * CFSocketStreamPairSetSecurityProtocol() *** DEPRECATED ***
  905. *
  906. * Discussion:
  907. * CFSocketStreamPairSetSecurityProtocol has been deprecated in
  908. * favor of CFReadStreamSetProperty and CFWriteStreamSetProperty
  909. * with the previously mentioned property and values. Sets the
  910. * security level on a pair of streams.
  911. *
  912. * Mac OS X threading:
  913. * Thread safe
  914. *
  915. * Parameters:
  916. *
  917. * socketReadStream:
  918. * Read stream reference which is to have its security level
  919. * changed.
  920. *
  921. * socketWriteStream:
  922. * Write stream reference which is to have its security level
  923. * changed.
  924. *
  925. * securityProtocol:
  926. * CFStreamSocketSecurityProtocol enum indicating the security
  927. * level to be set.
  928. *
  929. * Result:
  930. * Returns TRUE if the settings were placed on the stream, FALSE
  931. * otherwise.
  932. *
  933. * Availability:
  934. * Mac OS X: in version 10.1 and later in CoreServices.framework but deprecated in 10.2
  935. * CarbonLib: not available
  936. * Non-Carbon CFM: not available
  937. }
  938. function CFSocketStreamPairSetSecurityProtocol( socketReadStream: CFReadStreamRef; socketWriteStream: CFWriteStreamRef; securityProtocol: CFStreamSocketSecurityProtocol ): Boolean; external name '_CFSocketStreamPairSetSecurityProtocol';
  939. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_2,__IPHONE_NA,__IPHONE_NA) *)
  940. {$endc} {TARGET_OS_MAC}
  941. {
  942. * kCFStreamPropertyProxyLocalBypass
  943. *
  944. * Discussion:
  945. * CFDictionary key for proxy information. It matches
  946. * kSCPropNetProxiesExcludeSimpleHostnames defined in
  947. * SCSchemaDefinitions.h. CFNumber (0 or 1) indicating to bypass
  948. * the proxies for simple hostnames (names without dots).
  949. *
  950. * Availability:
  951. * Mac OS X: in version 10.4 and later in CoreServices.framework
  952. * CarbonLib: not available
  953. * Non-Carbon CFM: not available
  954. }
  955. var kCFStreamPropertyProxyLocalBypass: CFStringRef; external name '_kCFStreamPropertyProxyLocalBypass'; (* attribute const *)
  956. (* __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0) *)
  957. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  958. end.
  959. {$endc} {not MACOSALLINCLUDE}