CFProxySupport.pas 28 KB

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