CFHost.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  1. {
  2. File: CFNetwork/CFHost.h
  3. Contains: CoreFoundation CFHost header
  4. Version: CFNetwork-71.2~1
  5. Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation: Peter N Lewis, <[email protected]>, 2004 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit CFHost;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,CFBase,CFData,CFArray,CFRunLoop,CFStream;
  92. {$ALIGN MAC68K}
  93. {
  94. * CFHostRef
  95. *
  96. * Discussion:
  97. * This is the type of a reference to a host name or address lookup.
  98. }
  99. type
  100. CFHostRef = ^SInt32; { an opaque 32-bit type }
  101. {
  102. * kCFStreamErrorDomainNetDB
  103. *
  104. * Discussion:
  105. * Errors listed in netdb.h
  106. *
  107. * Availability:
  108. * Mac OS X: in version 10.3 and later in CoreServices.framework
  109. * CarbonLib: not available
  110. * Non-Carbon CFM: not available
  111. }
  112. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  113. var kCFStreamErrorDomainNetDB: SInt32; external name '_kCFStreamErrorDomainNetDB'; (* attribute const *)
  114. {
  115. * kCFStreamErrorDomainSystemConfiguration
  116. *
  117. * Discussion:
  118. * Errors listed in SystemConfiguration/SystemConfiguration.h
  119. *
  120. * Availability:
  121. * Mac OS X: in version 10.3 and later in CoreServices.framework
  122. * CarbonLib: not available
  123. * Non-Carbon CFM: not available
  124. }
  125. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  126. var kCFStreamErrorDomainSystemConfiguration: SInt32; external name '_kCFStreamErrorDomainSystemConfiguration'; (* attribute const *)
  127. {
  128. * CFHostInfoType
  129. *
  130. * Discussion:
  131. * Host information types to be resolved.
  132. }
  133. type
  134. CFHostInfoType = SInt32;
  135. const
  136. {
  137. * Results value is a CFArray of CFData's (each being a struct
  138. * sockaddr)
  139. }
  140. kCFHostAddresses = 0;
  141. {
  142. * Results value is a CFArray of CFString's
  143. }
  144. kCFHostNames = 1;
  145. {
  146. * Results value is a CFData wrapping SCNetworkConnectionFlags
  147. * (defined in SystemConfiguration/SCNetwork.h)
  148. }
  149. kCFHostReachability = 2;
  150. {
  151. * CFHostClientContext
  152. *
  153. * Discussion:
  154. * Structure containing the user-defined data and callbacks for
  155. * CFHost objects.
  156. }
  157. type
  158. CFHostClientContext = record
  159. {
  160. * The version number of the structure type being passed in as a
  161. * parameter to the CFHost client function. Valid version number is
  162. * currently 0.
  163. }
  164. version: CFIndex;
  165. {
  166. * An arbitrary pointer to client-defined data, which can be
  167. * associated with the host and is passed to the callbacks.
  168. }
  169. info: Ptr;
  170. {
  171. * The callback used to add a retain for the host on the info pointer
  172. * for the life of the host, and may be used for temporary references
  173. * the host needs to take. This callback returns the actual info
  174. * pointer to store in the host, almost always just the pointer
  175. * passed as the parameter.
  176. }
  177. retain: CFAllocatorRetainCallBack;
  178. {
  179. * The callback used to remove a retain previously added for the host
  180. * on the info pointer.
  181. }
  182. release: CFAllocatorReleaseCallBack;
  183. {
  184. * The callback used to create a descriptive string representation of
  185. * the info pointer (or the data pointed to by the info pointer) for
  186. * debugging purposes. This is used by the CFCopyDescription()
  187. * function.
  188. }
  189. copyDescription: CFAllocatorCopyDescriptionCallBack;
  190. end;
  191. CFHostClientContextPtr = ^CFHostClientContext;
  192. {
  193. * CFHostClientCallBack
  194. *
  195. * Discussion:
  196. * Callback function which is called upon error or completion of an
  197. * asynchronous resolve.
  198. *
  199. * Parameters:
  200. *
  201. * theHost:
  202. * Host whose resolution is complete.
  203. *
  204. * typeInfo:
  205. * Enum representing which info resolution is complete.
  206. *
  207. * error:
  208. * Reference to an error structure if the resolution failed.
  209. *
  210. * info:
  211. * Client's info reference which was passed into the client
  212. * context.
  213. }
  214. type CFHostClientCallBack = procedure( theHost: CFHostRef; typeInfo: CFHostInfoType; const (*var*) error: CFStreamError; info: UnivPtr );
  215. {
  216. * CFHostGetTypeID()
  217. *
  218. * Discussion:
  219. * Returns the type identifier of all CFHost instances.
  220. *
  221. * Mac OS X threading:
  222. * Thread safe
  223. *
  224. * Availability:
  225. * Mac OS X: in version 10.3 and later in CoreServices.framework
  226. * CarbonLib: not available
  227. * Non-Carbon CFM: not available
  228. }
  229. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  230. function CFHostGetTypeID: CFTypeID; external name '_CFHostGetTypeID';
  231. {
  232. * CFHostCreateWithName()
  233. *
  234. * Discussion:
  235. * Creates a new host object with the given name.
  236. *
  237. * Mac OS X threading:
  238. * Thread safe
  239. *
  240. * Parameters:
  241. *
  242. * allocator:
  243. * The CFAllocator which should be used to allocate memory for the
  244. * host. If this reference is not a valid CFAllocator, the
  245. * behavior is undefined.
  246. *
  247. * hostname:
  248. * A CFStringRef representing the name of the host. Must be
  249. * non-NULL. If this If this reference is not a valid
  250. * CFStringRef, the behavior is undefined.
  251. *
  252. * Result:
  253. * A valid CFHostRef which may now be resolved, or NULL if
  254. * unsuccessful.
  255. *
  256. * Availability:
  257. * Mac OS X: in version 10.3 and later in CoreServices.framework
  258. * CarbonLib: not available
  259. * Non-Carbon CFM: not available
  260. }
  261. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  262. function CFHostCreateWithName( allocator: CFAllocatorRef; hostname: CFStringRef ): CFHostRef; external name '_CFHostCreateWithName';
  263. {
  264. * CFHostCreateWithAddress()
  265. *
  266. * Discussion:
  267. * Creates a new host object with the given address.
  268. *
  269. * Mac OS X threading:
  270. * Thread safe
  271. *
  272. * Parameters:
  273. *
  274. * allocator:
  275. * The CFAllocator which should be used to allocate memory for the
  276. * host. If this reference is not a valid CFAllocator, the
  277. * behavior is undefined.
  278. *
  279. * addr:
  280. * A CFDataRef containing a struct sockaddr which is the address
  281. * of the host. Must be non-NULL. If this If this reference is
  282. * not a valid CFDataRef, the behavior is undefined.
  283. *
  284. * Result:
  285. * A valid CFHostRef which may now be resolved, or NULL if
  286. * unsuccessful.
  287. *
  288. * Availability:
  289. * Mac OS X: in version 10.3 and later in CoreServices.framework
  290. * CarbonLib: not available
  291. * Non-Carbon CFM: not available
  292. }
  293. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  294. function CFHostCreateWithAddress( allocator: CFAllocatorRef; addr: CFDataRef ): CFHostRef; external name '_CFHostCreateWithAddress';
  295. {
  296. * CFHostCreateCopy()
  297. *
  298. * Discussion:
  299. * Creates a new host object as a copy of host argument.
  300. *
  301. * Mac OS X threading:
  302. * Thread safe
  303. *
  304. * Parameters:
  305. *
  306. * alloc:
  307. * The CFAllocator which should be used to allocate memory for the
  308. * new host. If this reference is not a valid CFAllocator, the
  309. * behavior is undefined.
  310. *
  311. * host:
  312. * A CFHostRef representing the original host. Must be non-NULL.
  313. * If this If this reference is not a valid CFHostRef, the
  314. * behavior is undefined.
  315. *
  316. * Result:
  317. * A valid CFHostRef which contains a copy of all previously
  318. * resolved data from the original. NULL is returned in the case of
  319. * failure.
  320. *
  321. * Availability:
  322. * Mac OS X: in version 10.3 and later in CoreServices.framework
  323. * CarbonLib: not available
  324. * Non-Carbon CFM: not available
  325. }
  326. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  327. function CFHostCreateCopy( alloc: CFAllocatorRef; host: CFHostRef ): CFHostRef; external name '_CFHostCreateCopy';
  328. {
  329. * CFHostStartInfoResolution()
  330. *
  331. * Discussion:
  332. * Performs a lookup for the given host. It will search for the
  333. * requested information if there is no other active request.
  334. * Previously cached information of the given type will be released.
  335. *
  336. * Mac OS X threading:
  337. * Thread safe
  338. *
  339. * Parameters:
  340. *
  341. * theHost:
  342. * The CFHostRef which should be resolved. Must be non-NULL. If
  343. * this reference is not a valid CFHostRef, the behavior is
  344. * undefined.
  345. *
  346. * info:
  347. * The enum representing the type of information to be retrieved.
  348. * If the value is not a valid type, the behavior is undefined.
  349. *
  350. * error:
  351. * A reference to a CFStreamError structure which will be filled
  352. * with any error information should an error occur. May be set
  353. * to NULL if error information is not wanted.
  354. *
  355. * Result:
  356. * Returns TRUE on success and FALSE on failure. In asynchronous
  357. * mode, this function will return immediately. In synchronous
  358. * mode, it will block until the resolve has completed or until the
  359. * resolve is cancelled.
  360. *
  361. * Availability:
  362. * Mac OS X: in version 10.3 and later in CoreServices.framework
  363. * CarbonLib: not available
  364. * Non-Carbon CFM: not available
  365. }
  366. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  367. function CFHostStartInfoResolution( theHost: CFHostRef; info: CFHostInfoType; error: CFStreamErrorPtr ): Boolean; external name '_CFHostStartInfoResolution';
  368. {
  369. * CFHostGetAddressing()
  370. *
  371. * Discussion:
  372. * Tries to retrieve the known addresses from the given host.
  373. * Returns a CFArrayRef of addresses if known and there were some.
  374. * NULL is returned otherwise. Each address is a CFDataRef wrapping
  375. * a struct sockaddr.
  376. *
  377. * Mac OS X threading:
  378. * Thread safe
  379. * The function gets the data in a thread-safe manner, but the
  380. * resulting data is not safe. Since it is returned as a matter of
  381. * a get opposed to a copy, the data is not safe if the host is
  382. * being altered from another thread.
  383. *
  384. * Parameters:
  385. *
  386. * theHost:
  387. * The CFHostRef which contains the relevant information. Must be
  388. * non-NULL. If this reference is not a valid CFHostRef, the
  389. * behavior is undefined.
  390. *
  391. * hasBeenResolved:
  392. * A reference to a Boolean which returns FALSE if the information
  393. * was not available (e.g. CFHostStartInfoResolution has not been
  394. * called), otherwise TRUE will be returned.
  395. *
  396. * Availability:
  397. * Mac OS X: in version 10.3 and later in CoreServices.framework
  398. * CarbonLib: not available
  399. * Non-Carbon CFM: not available
  400. }
  401. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  402. function CFHostGetAddressing( theHost: CFHostRef; var hasBeenResolved: Boolean ): CFArrayRef; external name '_CFHostGetAddressing';
  403. {
  404. * CFHostGetNames()
  405. *
  406. * Discussion:
  407. * Tries to retrieve the names/aliases from the given host. Returns
  408. * a CFArrayRef of names for the given host. NULL is returned
  409. * otherwise.
  410. *
  411. * Mac OS X threading:
  412. * Thread safe
  413. * The function gets the data in a thread-safe manner, but the
  414. * resulting data is not safe. Since it is returned as a matter of
  415. * a get opposed to a copy, the data is not safe if the host is
  416. * being altered from another thread.
  417. *
  418. * Parameters:
  419. *
  420. * theHost:
  421. * The CFHostRef which contains the relevant information. Must be
  422. * non-NULL. If this reference is not a valid CFHostRef, the
  423. * behavior is undefined.
  424. *
  425. * hasBeenResolved:
  426. * A reference to a Boolean which returns FALSE if the information
  427. * was not available (e.g. CFHostStartInfoResolution has not been
  428. * called), otherwise TRUE will be returned.
  429. *
  430. * Availability:
  431. * Mac OS X: in version 10.3 and later in CoreServices.framework
  432. * CarbonLib: not available
  433. * Non-Carbon CFM: not available
  434. }
  435. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  436. function CFHostGetNames( theHost: CFHostRef; var hasBeenResolved: Boolean ): CFArrayRef; external name '_CFHostGetNames';
  437. {
  438. * CFHostGetReachability()
  439. *
  440. * Discussion:
  441. * Tries to retrieve the reachability of the given host. Returns a
  442. * CFDataRef which wraps the reachability flags. NULL will be
  443. * returned if the value has not been resolved. The possible values
  444. * of these flags is declared in SystemConfiguration/SCNetwork.h.
  445. * Returns FALSE if the information was not available, otherwise
  446. * TRUE will be returned with the results containing the requested
  447. * information.
  448. *
  449. * Mac OS X threading:
  450. * Thread safe
  451. * The function gets the data in a thread-safe manner, but the
  452. * resulting data is not safe. Since it is returned as a matter of
  453. * a get opposed to a copy, the data is not safe if the host is
  454. * being altered from another thread.
  455. *
  456. * Parameters:
  457. *
  458. * theHost:
  459. * The CFHostRef which contains the relevant information. Must be
  460. * non-NULL. If this reference is not a valid CFHostRef, the
  461. * behavior is undefined.
  462. *
  463. * hasBeenResolved:
  464. * A reference to a Boolean which returns FALSE if the information
  465. * was not available (e.g. CFHostStartInfoResolution has not been
  466. * called), otherwise TRUE will be returned. can be NULL
  467. *
  468. * Availability:
  469. * Mac OS X: in version 10.3 and later in CoreServices.framework
  470. * CarbonLib: not available
  471. * Non-Carbon CFM: not available
  472. }
  473. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  474. function CFHostGetReachability( theHost: CFHostRef; hasBeenResolved: BooleanPtr ): CFDataRef; external name '_CFHostGetReachability';
  475. {
  476. * CFHostCancelInfoResolution()
  477. *
  478. * Discussion:
  479. * Cancels an outstanding asynchronous or synchronous resolve.
  480. *
  481. * Mac OS X threading:
  482. * Thread safe
  483. *
  484. * Parameters:
  485. *
  486. * theHost:
  487. * The CFHostRef which is currently resolving. Must be non-NULL.
  488. * If this reference is not a valid CFHostRef, the behavior is
  489. * undefined.
  490. *
  491. * info:
  492. * The enum representing which resolution to be canceled. If the
  493. * value is not a valid type, the behavior is undefined.
  494. *
  495. * Availability:
  496. * Mac OS X: in version 10.3 and later in CoreServices.framework
  497. * CarbonLib: not available
  498. * Non-Carbon CFM: not available
  499. }
  500. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  501. procedure CFHostCancelInfoResolution( theHost: CFHostRef; info: CFHostInfoType ); external name '_CFHostCancelInfoResolution';
  502. {
  503. * CFHostSetClient()
  504. *
  505. * Discussion:
  506. * Associates a client context and callback function with a
  507. * CFHostRef. This is required for asynchronous usage. If not set,
  508. * resolve will take place synchronously.
  509. *
  510. * Mac OS X threading:
  511. * Thread safe
  512. *
  513. * Parameters:
  514. *
  515. * theHost:
  516. * The CFHostRef which is getting a client. Must be non-NULL. If
  517. * this reference is not a valid CFHostRef, the behavior is
  518. * undefined.
  519. *
  520. * clientCB:
  521. * A CFHostClientCallBack which will be called when the resolve
  522. * completes or is cancelled. Use NULL to remove the client
  523. * association with a host object.
  524. *
  525. * clientContext:
  526. * A CFHostClientContext which is used to set the contextual
  527. * information associated with the host object. The info pointer
  528. * from the struct will be passed to the callback function. If
  529. * setting a client, this value must be non-NULL.
  530. *
  531. * Result:
  532. * Returns TRUE if the procedure was a success, otherwise it returns
  533. * FALSE.
  534. *
  535. * Availability:
  536. * Mac OS X: in version 10.3 and later in CoreServices.framework
  537. * CarbonLib: not available
  538. * Non-Carbon CFM: not available
  539. }
  540. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  541. function CFHostSetClient( theHost: CFHostRef; clientCB: CFHostClientCallBack; clientContext: CFHostClientContextPtr ): Boolean; external name '_CFHostSetClient';
  542. {
  543. * CFHostScheduleWithRunLoop()
  544. *
  545. * Discussion:
  546. * Schedules the given host on a run loop and mode so the client
  547. * will receive its callbacks on that loop and mode.
  548. *
  549. * Mac OS X threading:
  550. * Thread safe
  551. *
  552. * Parameters:
  553. *
  554. * theHost:
  555. * The CFHostRef which is being scheduled. Must be non-NULL. If
  556. * this reference is not a valid CFHostRef, the behavior is
  557. * undefined.
  558. *
  559. * runLoop:
  560. * A CFRunLoopRef on which the host should be scheduled. Must be
  561. * non-NULL. If this reference is not a valid CFRunLoopRef, the
  562. * behavior is undefined.
  563. *
  564. * runLoopMode:
  565. * A CFStringRef which is the mode in which the run loop will be
  566. * running when notification occurs. Must be non-NULL. If this
  567. * reference is not a valid CFStringRef, the behavior is undefined.
  568. *
  569. * Availability:
  570. * Mac OS X: in version 10.3 and later in CoreServices.framework
  571. * CarbonLib: not available
  572. * Non-Carbon CFM: not available
  573. }
  574. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  575. procedure CFHostScheduleWithRunLoop( theHost: CFHostRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFHostScheduleWithRunLoop';
  576. {
  577. * CFHostUnscheduleFromRunLoop()
  578. *
  579. * Discussion:
  580. * Unschedules the given host from a run loop and mode so the client
  581. * will not receive its callbacks on that loop and mode.
  582. *
  583. * Mac OS X threading:
  584. * Thread safe
  585. *
  586. * Parameters:
  587. *
  588. * theHost:
  589. * The CFHostRef which is being unscheduled. Must be non-NULL. If
  590. * this reference is not a valid CFHostRef, the behavior is
  591. * undefined.
  592. *
  593. * runLoop:
  594. * A CFRunLoopRef on which the host is scheduled and should now be
  595. * unscheduled. Must be non-NULL. If this reference is not a
  596. * valid CFRunLoopRef, the behavior is undefined.
  597. *
  598. * runLoopMode:
  599. * A CFStringRef which is the mode in which the host is scheduled
  600. * and should be unscheduled. Must be non-NULL. If this reference
  601. * is not a valid CFStringRef, the behavior is undefined.
  602. *
  603. * Availability:
  604. * Mac OS X: in version 10.3 and later in CoreServices.framework
  605. * CarbonLib: not available
  606. * Non-Carbon CFM: not available
  607. }
  608. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  609. procedure CFHostUnscheduleFromRunLoop( theHost: CFHostRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFHostUnscheduleFromRunLoop';
  610. end.