CFSocketStream.pas 35 KB

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