CFProxySupport.pas 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. {
  2. File: CFNetwork/CFProxySupport.h
  3. Contains: Support for computing which proxy applies when
  4. Copyright: Copyright (c) 2006-2008, Apple Inc. All rights reserved.
  5. Bugs?: For bug reports, consult the following page on
  6. the World Wide Web:
  7. http://www.freepascal.org/bugs.html
  8. }
  9. { Pascal Translation: Gale R Paeper, <[email protected]>, 2008 }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$calling mwpascal}
  22. unit CFProxySupport;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  25. {$setc GAP_INTERFACES_VERSION := $0308}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  41. {$setc __ppc64__ := 1}
  42. {$elsec}
  43. {$setc __ppc64__ := 0}
  44. {$endc}
  45. {$ifc not defined __i386__ and defined CPUI386}
  46. {$setc __i386__ := 1}
  47. {$elsec}
  48. {$setc __i386__ := 0}
  49. {$endc}
  50. {$ifc not defined __x86_64__ and defined CPUX86_64}
  51. {$setc __x86_64__ := 1}
  52. {$elsec}
  53. {$setc __x86_64__ := 0}
  54. {$endc}
  55. {$ifc not defined __arm__ and defined CPUARM}
  56. {$setc __arm__ := 1}
  57. {$elsec}
  58. {$setc __arm__ := 0}
  59. {$endc}
  60. {$ifc defined cpu64}
  61. {$setc __LP64__ := 1}
  62. {$elsec}
  63. {$setc __LP64__ := 0}
  64. {$endc}
  65. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  66. {$error Conflicting definitions for __ppc__ and __i386__}
  67. {$endc}
  68. {$ifc defined __ppc__ and __ppc__}
  69. {$setc TARGET_CPU_PPC := TRUE}
  70. {$setc TARGET_CPU_PPC64 := FALSE}
  71. {$setc TARGET_CPU_X86 := FALSE}
  72. {$setc TARGET_CPU_X86_64 := FALSE}
  73. {$setc TARGET_CPU_ARM := FALSE}
  74. {$setc TARGET_OS_MAC := TRUE}
  75. {$setc TARGET_OS_IPHONE := FALSE}
  76. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  77. {$elifc defined __ppc64__ and __ppc64__}
  78. {$setc TARGET_CPU_PPC := TFALSE}
  79. {$setc TARGET_CPU_PPC64 := TRUE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$elifc defined __i386__ and __i386__}
  87. {$setc TARGET_CPU_PPC := FALSE}
  88. {$setc TARGET_CPU_PPC64 := FALSE}
  89. {$setc TARGET_CPU_X86 := TRUE}
  90. {$setc TARGET_CPU_X86_64 := FALSE}
  91. {$setc TARGET_CPU_ARM := FALSE}
  92. {$ifc defined(iphonesim)}
  93. {$setc TARGET_OS_MAC := FALSE}
  94. {$setc TARGET_OS_IPHONE := TRUE}
  95. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  96. {$elsec}
  97. {$setc TARGET_OS_MAC := TRUE}
  98. {$setc TARGET_OS_IPHONE := FALSE}
  99. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  100. {$endc}
  101. {$elifc defined __x86_64__ and __x86_64__}
  102. {$setc TARGET_CPU_PPC := FALSE}
  103. {$setc TARGET_CPU_PPC64 := FALSE}
  104. {$setc TARGET_CPU_X86 := FALSE}
  105. {$setc TARGET_CPU_X86_64 := TRUE}
  106. {$setc TARGET_CPU_ARM := FALSE}
  107. {$setc TARGET_OS_MAC := TRUE}
  108. {$setc TARGET_OS_IPHONE := FALSE}
  109. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  110. {$elifc defined __arm__ and __arm__}
  111. {$setc TARGET_CPU_PPC := FALSE}
  112. {$setc TARGET_CPU_PPC64 := FALSE}
  113. {$setc TARGET_CPU_X86 := FALSE}
  114. {$setc TARGET_CPU_X86_64 := FALSE}
  115. {$setc TARGET_CPU_ARM := TRUE}
  116. { will require compiler define when/if other Apple devices with ARM cpus ship }
  117. {$setc TARGET_OS_MAC := FALSE}
  118. {$setc TARGET_OS_IPHONE := TRUE}
  119. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  120. {$elsec}
  121. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  122. {$endc}
  123. {$ifc defined __LP64__ and __LP64__ }
  124. {$setc TARGET_CPU_64 := TRUE}
  125. {$elsec}
  126. {$setc TARGET_CPU_64 := FALSE}
  127. {$endc}
  128. {$ifc defined FPC_BIG_ENDIAN}
  129. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  130. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  131. {$elifc defined FPC_LITTLE_ENDIAN}
  132. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  133. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  134. {$elsec}
  135. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  136. {$endc}
  137. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  138. {$setc CALL_NOT_IN_CARBON := FALSE}
  139. {$setc OLDROUTINENAMES := FALSE}
  140. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  141. {$setc OPAQUE_UPP_TYPES := TRUE}
  142. {$setc OTCARBONAPPLICATION := TRUE}
  143. {$setc OTKERNEL := FALSE}
  144. {$setc PM_USE_SESSION_APIS := TRUE}
  145. {$setc TARGET_API_MAC_CARBON := TRUE}
  146. {$setc TARGET_API_MAC_OS8 := FALSE}
  147. {$setc TARGET_API_MAC_OSX := TRUE}
  148. {$setc TARGET_CARBON := TRUE}
  149. {$setc TARGET_CPU_68K := FALSE}
  150. {$setc TARGET_CPU_MIPS := FALSE}
  151. {$setc TARGET_CPU_SPARC := FALSE}
  152. {$setc TARGET_OS_UNIX := FALSE}
  153. {$setc TARGET_OS_WIN32 := FALSE}
  154. {$setc TARGET_RT_MAC_68881 := FALSE}
  155. {$setc TARGET_RT_MAC_CFM := FALSE}
  156. {$setc TARGET_RT_MAC_MACHO := TRUE}
  157. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  158. {$setc TYPE_BOOL := FALSE}
  159. {$setc TYPE_EXTENDED := FALSE}
  160. {$setc TYPE_LONGLONG := TRUE}
  161. uses MacTypes, CFArray, CFBase, CFDictionary, CFURL, CFError, CFRunLoop, CFStream;
  162. {$endc} {not MACOSALLINCLUDE}
  163. {$ALIGN POWER}
  164. {
  165. These APIs return arrays of dictionaries, where each dictionary describes a single proxy.
  166. The arrays represent the order in which the proxies should be tried - try to download the URL
  167. using the first entry in the array, and if that fails, try using the second entry, and so on.
  168. The keys to the proxy dictionaries follow the function declarations; every proxy dictionary
  169. will have an entry for kCFProxyTypeKey. If the type is anything except
  170. kCFProxyTypeAutoConfigurationURL, the dictionary will also have entries for the proxy's host
  171. and port (under kCFProxyHostNameKey and kCFProxyPortNumberKey respectively). If the type is
  172. kCFProxyTypeAutoConfigurationURL, it will have an entry for kCFProxyAutoConfigurationURLKey.
  173. The keys for username and password are optional and will only be present if the username
  174. or password could be extracted from the information passed in (i.e. either the URL itself
  175. or the proxy dictionary supplied). These APIs do not consult any external credential stores
  176. (such as the Keychain).
  177. }
  178. {!
  179. @function CFNetworkCopySystemProxySettings
  180. @discussion Returns a CFDictionary containing the current system internet proxy settings.
  181. @result Returns a dictionary containing key-value pairs that represent
  182. the current internet proxy settings. See below for definitions of the keys and
  183. values.
  184. NULL if no proxy settings have been defined or if an error
  185. was encountered.
  186. The caller is responsible for releasing the returned dictionary.
  187. }
  188. function CFNetworkCopySystemProxySettings: CFDictionaryRef; external name '_CFNetworkCopySystemProxySettings';
  189. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
  190. {
  191. * CFNetworkCopyProxiesForURL()
  192. *
  193. * Discussion:
  194. * Given a URL and a proxy dictionary, determines the ordered list
  195. * of proxies that should be used to download the given URL.
  196. *
  197. * Parameters:
  198. *
  199. * url:
  200. * The URL to be accessed
  201. *
  202. * proxySettings:
  203. * A dictionary describing the available proxy settings; the
  204. * dictionary's format should match the dictionary returned
  205. * by CFNetworkCopySystemProxySettings described below.
  206. *
  207. * Result:
  208. * An array of dictionaries; each dictionary describes a single
  209. * proxy. See the comment at the top of this file for how to
  210. * interpret the returned dictionaries.
  211. *
  212. * Availability:
  213. * Mac OS X: in version 10.5 and later in CoreServices.framework
  214. * CarbonLib: not available
  215. * Non-Carbon CFM: not available
  216. }
  217. function CFNetworkCopyProxiesForURL( url: CFURLRef; proxySettings: CFDictionaryRef ): CFArrayRef; external name '_CFNetworkCopyProxiesForURL';
  218. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  219. {
  220. * CFProxyAutoConfigurationResultCallback
  221. *
  222. * Discussion:
  223. * Callback function to be called when a PAC file computation
  224. * (initiated by either CFNetworkExecuteProxyAutoConfigurationScript
  225. * or CFNetworkExecuteProxyAutoConfigurationURL) has completed.
  226. *
  227. * Parameters:
  228. *
  229. * client:
  230. * The client reference passed in to
  231. * CFNetworkExecuteProxyAutoConfigurationScript or
  232. * CFNetworkExecuteProxyAutoConfigurationURL
  233. *
  234. * proxyList:
  235. * Upon success, the list of proxies returned by the
  236. * autoconfiguration script. The list has the same format as
  237. * returned by CFProxyCopyProxiesForURL, above, except that no
  238. * entry may be of type kCFProxyTypeAutoConfigurationURL. Note
  239. * that if the client wishes to keep this list, they must retain
  240. * it when they receive this callback.
  241. *
  242. * error:
  243. * Upon failure, an error object explaining the failure.
  244. }
  245. type
  246. CFProxyAutoConfigurationResultCallback = procedure( client: UnivPtr; proxyList: CFArrayRef; error: CFErrorRef );
  247. {
  248. * CFNetworkCopyProxiesForAutoConfigurationScript()
  249. *
  250. * Discussion:
  251. * Synchronously executes the given proxy autoconfiguration script
  252. * and returns a valid proxyList and NULL error upon success or a
  253. * NULL proxyList and valid error on failure.
  254. *
  255. * Parameters:
  256. *
  257. * proxyAutoConfigurationScript:
  258. * A CFString containing the code of the script to be executed.
  259. *
  260. * targetURL:
  261. * The URL that should be input in to the autoconfiguration script.
  262. *
  263. * error:
  264. * A return argument that will contain a valid error in case of
  265. * failure.
  266. *
  267. * Result:
  268. * An array of dictionaries describing the proxies returned by the
  269. * script or NULL on failure.
  270. *
  271. * Availability:
  272. * Mac OS X: in version 10.5 and later in CoreServices.framework
  273. * CarbonLib: not available
  274. * Non-Carbon CFM: not available
  275. }
  276. function CFNetworkCopyProxiesForAutoConfigurationScript( proxyAutoConfigurationScript: CFStringRef; targetURL: CFURLRef; var error: CFErrorRef ): CFArrayRef; external name '_CFNetworkCopyProxiesForAutoConfigurationScript';
  277. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  278. {
  279. * CFNetworkExecuteProxyAutoConfigurationScript()
  280. *
  281. * Discussion:
  282. * Begins the process of executing proxyAutoConfigurationScript to
  283. * determine the correct proxy to use to retrieve targetURL. The
  284. * caller should schedule the returned run loop source; when the
  285. * results are found, the caller's callback will be called via the
  286. * run loop, passing a valid proxyList and NULL error upon success,
  287. * or a NULL proxyList and valid error on failure. The caller
  288. * should invalidate the returned run loop source if it wishes to
  289. * terminate the request before completion. The returned
  290. * RunLoopSource will be removed from all run loops and modes on
  291. * which it was scheduled after the callback returns.
  292. *
  293. * Parameters:
  294. *
  295. * proxyAutoConfigurationScript:
  296. * A CFString containing the code of the script to be executed.
  297. *
  298. * targetURL:
  299. * The URL that should be passed to the autoconfiguration script.
  300. *
  301. * cb:
  302. * A client callback to notify the caller of completion.
  303. *
  304. * clientContext:
  305. * a stream context containing a client info object and optionally
  306. * retain / release callbacks for said info object.
  307. *
  308. * Result:
  309. * A CFRunLoopSource which the client can use to schedule execution
  310. * of the AutoConfiguration Script.
  311. *
  312. * Availability:
  313. * Mac OS X: in version 10.5 and later in CoreServices.framework
  314. * CarbonLib: not available
  315. * Non-Carbon CFM: not available
  316. }
  317. function CFNetworkExecuteProxyAutoConfigurationScript( proxyAutoConfigurationScript: CFStringRef; targetURL: CFURLRef; cb: CFProxyAutoConfigurationResultCallback; var clientContext: CFStreamClientContext ): CFRunLoopSourceRef; external name '_CFNetworkExecuteProxyAutoConfigurationScript';
  318. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  319. {
  320. * CFNetworkExecuteProxyAutoConfigurationURL()
  321. *
  322. * Discussion:
  323. * As CFNetworkExecuteProxyAutoConfigurationScript(), above, except
  324. * that CFNetworkExecuteProxyAutoConfigurationURL will additionally
  325. * download the contents of proxyAutoConfigURL, convert it to a
  326. * JavaScript string, and then execute that script.
  327. * Ownership for the returned CFRunLoopSourceRef follows the copy rule,
  328. * the client is responsible for releasing the object.
  329. *
  330. * Availability:
  331. * Mac OS X: in version 10.5 and later in CoreServices.framework
  332. * CarbonLib: not available
  333. * Non-Carbon CFM: not available
  334. }
  335. function CFNetworkExecuteProxyAutoConfigurationURL( proxyAutoConfigURL: CFURLRef; targetURL: CFURLRef; cb: CFProxyAutoConfigurationResultCallback; var clientContext: CFStreamClientContext ): CFRunLoopSourceRef; external name '_CFNetworkExecuteProxyAutoConfigurationURL';
  336. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  337. {
  338. * kCFProxyTypeKey
  339. *
  340. * Discussion:
  341. * Key for the type of proxy being represented; value will be one of
  342. * the kCFProxyType constants listed below.
  343. *
  344. * Availability:
  345. * Mac OS X: in version 10.5 and later in CoreServices.framework
  346. * CarbonLib: not available
  347. * Non-Carbon CFM: not available
  348. }
  349. var kCFProxyTypeKey: CFStringRef; external name '_kCFProxyTypeKey'; (* attribute const *)
  350. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  351. {
  352. * kCFProxyHostNameKey
  353. *
  354. * Discussion:
  355. * Key for the proxy's hostname; value is a CFString. Note that
  356. * this may be an IPv4 or IPv6 dotted-IP string.
  357. *
  358. * Availability:
  359. * Mac OS X: in version 10.5 and later in CoreServices.framework
  360. * CarbonLib: not available
  361. * Non-Carbon CFM: not available
  362. }
  363. var kCFProxyHostNameKey: CFStringRef; external name '_kCFProxyHostNameKey'; (* attribute const *)
  364. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  365. {
  366. * kCFProxyPortNumberKey
  367. *
  368. * Discussion:
  369. * Key for the proxy's port number; value is a CFNumber specifying
  370. * the port on which to contact the proxy
  371. *
  372. * Availability:
  373. * Mac OS X: in version 10.5 and later in CoreServices.framework
  374. * CarbonLib: not available
  375. * Non-Carbon CFM: not available
  376. }
  377. var kCFProxyPortNumberKey: CFStringRef; external name '_kCFProxyPortNumberKey'; (* attribute const *)
  378. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  379. {
  380. * kCFProxyAutoConfigurationURLKey
  381. *
  382. * Discussion:
  383. * Key for the proxy's PAC file location; this key is only present
  384. * if the proxy's type is kCFProxyTypeAutoConfigurationURL. Value
  385. * is a CFURL specifying the location of a proxy auto-configuration
  386. * file
  387. *
  388. * Availability:
  389. * Mac OS X: in version 10.5 and later in CoreServices.framework
  390. * CarbonLib: not available
  391. * Non-Carbon CFM: not available
  392. }
  393. var kCFProxyAutoConfigurationURLKey: CFStringRef; external name '_kCFProxyAutoConfigurationURLKey'; (* attribute const *)
  394. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  395. {
  396. * kCFProxyUsernameKey
  397. *
  398. * Discussion:
  399. * Key for the username to be used with the proxy; value is a
  400. * CFString. Note that this key will only be present if the username
  401. * could be extracted from the information passed in. No external
  402. * credential stores (like the Keychain) are consulted.
  403. *
  404. * Availability:
  405. * Mac OS X: in version 10.5 and later in CoreServices.framework
  406. * CarbonLib: not available
  407. * Non-Carbon CFM: not available
  408. }
  409. var kCFProxyUsernameKey: CFStringRef; external name '_kCFProxyUsernameKey'; (* attribute const *)
  410. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  411. {
  412. * kCFProxyPasswordKey
  413. *
  414. * Discussion:
  415. * Key for the password to be used with the proxy; value is a
  416. * CFString. Note that this key will only be present if the username
  417. * could be extracted from the information passed in. No external
  418. * credential stores (like the Keychain) are consulted.
  419. *
  420. * Availability:
  421. * Mac OS X: in version 10.5 and later in CoreServices.framework
  422. * CarbonLib: not available
  423. * Non-Carbon CFM: not available
  424. }
  425. var kCFProxyPasswordKey: CFStringRef; external name '_kCFProxyPasswordKey'; (* attribute const *)
  426. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  427. {
  428. Possible values for kCFProxyTypeKey:
  429. kCFProxyTypeNone - no proxy should be used; contact the origin server directly
  430. kCFProxyTypeHTTP - the proxy is an HTTP proxy
  431. kCFProxyTypeHTTPS - the proxy is a tunneling proxy as used for HTTPS
  432. kCFProxyTypeSOCKS - the proxy is a SOCKS proxy
  433. kCFProxyTypeFTP - the proxy is an FTP proxy
  434. kCFProxyTypeAutoConfigurationURL - the proxy is specified by a proxy autoconfiguration (PAC) file
  435. }
  436. {
  437. * kCFProxyTypeNone
  438. *
  439. * Availability:
  440. * Mac OS X: in version 10.5 and later in CoreServices.framework
  441. * CarbonLib: not available
  442. * Non-Carbon CFM: not available
  443. }
  444. var kCFProxyTypeNone: CFStringRef; external name '_kCFProxyTypeNone'; (* attribute const *)
  445. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  446. {
  447. * kCFProxyTypeHTTP
  448. *
  449. * Availability:
  450. * Mac OS X: in version 10.5 and later in CoreServices.framework
  451. * CarbonLib: not available
  452. * Non-Carbon CFM: not available
  453. }
  454. var kCFProxyTypeHTTP: CFStringRef; external name '_kCFProxyTypeHTTP'; (* attribute const *)
  455. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  456. {
  457. * kCFProxyTypeHTTPS
  458. *
  459. * Availability:
  460. * Mac OS X: in version 10.5 and later in CoreServices.framework
  461. * CarbonLib: not available
  462. * Non-Carbon CFM: not available
  463. }
  464. var kCFProxyTypeHTTPS: CFStringRef; external name '_kCFProxyTypeHTTPS'; (* attribute const *)
  465. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  466. {
  467. * kCFProxyTypeSOCKS
  468. *
  469. * Availability:
  470. * Mac OS X: in version 10.5 and later in CoreServices.framework
  471. * CarbonLib: not available
  472. * Non-Carbon CFM: not available
  473. }
  474. var kCFProxyTypeSOCKS: CFStringRef; external name '_kCFProxyTypeSOCKS'; (* attribute const *)
  475. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  476. {
  477. * kCFProxyTypeFTP
  478. *
  479. * Availability:
  480. * Mac OS X: in version 10.5 and later in CoreServices.framework
  481. * CarbonLib: not available
  482. * Non-Carbon CFM: not available
  483. }
  484. var kCFProxyTypeFTP: CFStringRef; external name '_kCFProxyTypeFTP'; (* attribute const *)
  485. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  486. {
  487. * kCFProxyTypeAutoConfigurationURL
  488. *
  489. * Availability:
  490. * Mac OS X: in version 10.5 and later in CoreServices.framework
  491. * CarbonLib: not available
  492. * Non-Carbon CFM: not available
  493. }
  494. var kCFProxyTypeAutoConfigurationURL: CFStringRef; external name '_kCFProxyTypeAutoConfigurationURL'; (* attribute const *)
  495. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  496. {
  497. * kCFProxyAutoConfigHTTPResponse
  498. *
  499. * Availability:
  500. * Mac OS X: in version 10.5 and later in CoreServices.framework
  501. * CarbonLib: not available
  502. * Non-Carbon CFM: not available
  503. }
  504. var kCFProxyAutoConfigurationHTTPResponseKey: CFStringRef; external name '_kCFProxyAutoConfigurationHTTPResponseKey'; (* attribute const *)
  505. (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0) *)
  506. {$ifc TARGET_OS_MAC}
  507. {
  508. * kCFNetworkProxiesExceptionsList
  509. *
  510. * Discussion:
  511. * Key for the list of host name patterns that should bypass the proxy; value is a
  512. * CFArray of CFStrings.
  513. }
  514. var kCFNetworkProxiesExceptionsList: CFStringRef; external name '_kCFNetworkProxiesExceptionsList'; (* attribute const *)
  515. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  516. {
  517. * kCFNetworkProxiesExcludeSimpleHostnames
  518. *
  519. * Discussion:
  520. * Key whose value indicates if simple hostnames will be excluded; value is a
  521. * CFNumber. Simple hostnames will be excluded if the key is present and has a
  522. * non-zero value.
  523. }
  524. var kCFNetworkProxiesExcludeSimpleHostnames: CFStringRef; external name '_kCFNetworkProxiesExcludeSimpleHostnames'; (* attribute const *)
  525. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  526. {
  527. * kCFNetworkProxiesFTPEnable
  528. *
  529. * Discussion:
  530. * Key for the enabled status of the ftp proxy; value is a
  531. * CFNumber. The proxy is enabled if the key is present and has a non-zero value.
  532. }
  533. var kCFNetworkProxiesFTPEnable: CFStringRef; external name '_kCFNetworkProxiesFTPEnable'; (* attribute const *)
  534. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  535. {
  536. * kCFNetworkProxiesFTPPassive
  537. *
  538. * Discussion:
  539. * Key for the state of passive mode for the ftp proxy; value is a
  540. * CFNumber. A value of one indicates that passive mode is enabled, a value
  541. * of zero indicates that passive mode is not enabled.
  542. }
  543. var kCFNetworkProxiesFTPPassive: CFStringRef; external name '_kCFNetworkProxiesFTPPassive'; (* attribute const *)
  544. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  545. {
  546. * kCFNetworkProxiesFTPPort
  547. *
  548. * Discussion:
  549. * Key for the port number associated with the ftp proxy; value is a
  550. * CFNumber which is the port number.
  551. }
  552. var kCFNetworkProxiesFTPPort: CFStringRef; external name '_kCFNetworkProxiesFTPPort'; (* attribute const *)
  553. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  554. {
  555. * kCFNetworkProxiesFTPProxy
  556. *
  557. * Discussion:
  558. * Key for the host name associated with the ftp proxy; value is a
  559. * CFString which is the proxy host name.
  560. }
  561. var kCFNetworkProxiesFTPProxy: CFStringRef; external name '_kCFNetworkProxiesFTPProxy'; (* attribute const *)
  562. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  563. {
  564. * kCFNetworkProxiesGopherEnable
  565. *
  566. * Discussion:
  567. * Key for the enabled status of the gopher proxy; value is a
  568. * CFNumber. The proxy is enabled if the key is present and has a non-zero value.
  569. }
  570. var kCFNetworkProxiesGopherEnable: CFStringRef; external name '_kCFNetworkProxiesGopherEnable'; (* attribute const *)
  571. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  572. {
  573. * kCFNetworkProxiesGopherPort
  574. *
  575. * Discussion:
  576. * Key for the port number associated with the gopher proxy; value is a
  577. * CFNumber which is the port number.
  578. }
  579. var kCFNetworkProxiesGopherPort: CFStringRef; external name '_kCFNetworkProxiesGopherPort'; (* attribute const *)
  580. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  581. {
  582. * kCFNetworkProxiesGopherProxy
  583. *
  584. * Discussion:
  585. * Key for the host name associated with the gopher proxy; value is a
  586. * CFString which is the proxy host name.
  587. }
  588. var kCFNetworkProxiesGopherProxy: CFStringRef; external name '_kCFNetworkProxiesGopherProxy'; (* attribute const *)
  589. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  590. {
  591. * kCFNetworkProxiesHTTPEnable
  592. *
  593. * Discussion:
  594. * Key for the enabled status of the HTTP proxy; value is a
  595. * CFNumber. The proxy is enabled if the key is present and has a non-zero value.
  596. }
  597. var kCFNetworkProxiesHTTPEnable: CFStringRef; external name '_kCFNetworkProxiesHTTPEnable'; (* attribute const *)
  598. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
  599. {
  600. * kCFNetworkProxiesHTTPPort
  601. *
  602. * Discussion:
  603. * Key for the port number associated with the HTTP proxy; value is a
  604. * CFNumber which is the port number.
  605. }
  606. var kCFNetworkProxiesHTTPPort: CFStringRef; external name '_kCFNetworkProxiesHTTPPort'; (* attribute const *)
  607. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
  608. {
  609. * kCFNetworkProxiesHTTPProxy
  610. *
  611. * Discussion:
  612. * Key for the host name associated with the HTTP proxy; value is a
  613. * CFString which is the proxy host name.
  614. }
  615. var kCFNetworkProxiesHTTPProxy: CFStringRef; external name '_kCFNetworkProxiesHTTPProxy'; (* attribute const *)
  616. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
  617. {
  618. * kCFNetworkProxiesHTTPSEnable
  619. *
  620. * Discussion:
  621. * Key for the enabled status of the HTTPS proxy; value is a
  622. * CFNumber. The proxy is enabled if the key is present and has a non-zero value.
  623. }
  624. var kCFNetworkProxiesHTTPSEnable: CFStringRef; external name '_kCFNetworkProxiesHTTPSEnable'; (* attribute const *)
  625. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  626. {
  627. * kCFNetworkProxiesHTTPSPort
  628. *
  629. * Discussion:
  630. * Key for the port number associated with the HTTPS proxy; value is a
  631. * CFNumber which is the port number.
  632. }
  633. var kCFNetworkProxiesHTTPSPort: CFStringRef; external name '_kCFNetworkProxiesHTTPSPort'; (* attribute const *)
  634. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  635. {
  636. * kCFNetworkProxiesHTTPSProxy
  637. *
  638. * Discussion:
  639. * Key for the host name associated with the HTTPS proxy; value is a
  640. * CFString which is the proxy host name.
  641. }
  642. var kCFNetworkProxiesHTTPSProxy: CFStringRef; external name '_kCFNetworkProxiesHTTPSProxy'; (* attribute const *)
  643. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  644. {
  645. * kCFNetworkProxiesRTSPEnable
  646. *
  647. * Discussion:
  648. * Key for the enabled status of the RTSP proxy; value is a
  649. * CFNumber. The proxy is enabled if the key is present and has a non-zero value.
  650. }
  651. var kCFNetworkProxiesRTSPEnable: CFStringRef; external name '_kCFNetworkProxiesRTSPEnable'; (* attribute const *)
  652. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  653. {
  654. * kCFNetworkProxiesRTSPPort
  655. *
  656. * Discussion:
  657. * Key for the port number associated with the RTSP proxy; value is a
  658. * CFNumber which is the port number.
  659. }
  660. var kCFNetworkProxiesRTSPPort: CFStringRef; external name '_kCFNetworkProxiesRTSPPort'; (* attribute const *)
  661. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  662. {
  663. * kCFNetworkProxiesRTSPProxy
  664. *
  665. * Discussion:
  666. * Key for the host name associated with the RTSP proxy; value is a
  667. * CFString which is the proxy host name.
  668. }
  669. var kCFNetworkProxiesRTSPProxy: CFStringRef; external name '_kCFNetworkProxiesRTSPProxy'; (* attribute const *)
  670. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  671. {
  672. * kCFNetworkProxiesSOCKSEnable
  673. *
  674. * Discussion:
  675. * Key for the enabled status of the SOCKS proxy; value is a
  676. * CFNumber. The proxy is enabled if the key is present and has a non-zero value.
  677. }
  678. var kCFNetworkProxiesSOCKSEnable: CFStringRef; external name '_kCFNetworkProxiesSOCKSEnable'; (* attribute const *)
  679. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  680. {
  681. * kCFNetworkProxiesSOCKSPort
  682. *
  683. * Discussion:
  684. * Key for the port number associated with the SOCKS proxy; value is a
  685. * CFNumber which is the port number.
  686. }
  687. var kCFNetworkProxiesSOCKSPort: CFStringRef; external name '_kCFNetworkProxiesSOCKSPort'; (* attribute const *)
  688. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  689. {
  690. * kCFNetworkProxiesSOCKSProxy
  691. *
  692. * Discussion:
  693. * Key for the host name associated with the SOCKS proxy; value is a
  694. * CFString which is the proxy host name.
  695. }
  696. var kCFNetworkProxiesSOCKSProxy: CFStringRef; external name '_kCFNetworkProxiesSOCKSProxy'; (* attribute const *)
  697. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  698. {
  699. * kCFNetworkProxiesProxyAutoConfigEnable
  700. *
  701. * Discussion:
  702. * Key for the enabled status ProxyAutoConfig (PAC); value is a
  703. * CFNumber. ProxyAutoConfig is enabled if the key is present and has a non-zero value.
  704. }
  705. var kCFNetworkProxiesProxyAutoConfigEnable: CFStringRef; external name '_kCFNetworkProxiesProxyAutoConfigEnable'; (* attribute const *)
  706. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
  707. {
  708. * kCFNetworkProxiesSOCKSProxy
  709. *
  710. * Discussion:
  711. * Key for the url which indicates the location of the ProxyAutoConfig (PAC) file; value is a
  712. * CFString which is url for the PAC file.
  713. }
  714. var kCFNetworkProxiesProxyAutoConfigURLString: CFStringRef; external name '_kCFNetworkProxiesProxyAutoConfigURLString'; (* attribute const *)
  715. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) *)
  716. {
  717. * kCFNetworkProxiesProxyAutoDiscoveryEnable
  718. *
  719. * Discussion:
  720. * Key for the enabled status of proxy auto discovery; value is a
  721. * CFNumber. Proxy auto discovery is enabled if the key is present and has a non-zero value.
  722. }
  723. var kCFNetworkProxiesProxyAutoDiscoveryEnable: CFStringRef; external name '_kCFNetworkProxiesProxyAutoDiscoveryEnable'; (* attribute const *)
  724. (* __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA) *)
  725. {$endc} {TARGET_OS_MAC}
  726. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  727. end.
  728. {$endc} {not MACOSALLINCLUDE}