Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

681 lines
20 KiB

  1. /*
  2. File: IsochronousDataHandler.h
  3. Contains: Component Manager based Isochronous Data Handler
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. //
  11. // Check for Prior Inclusion of IsochronousDataHandler.r
  12. // If this header is trying to be included via a Rez path, make it act
  13. // as a NOP. This will allow both Rez & C files to get to use the
  14. // contants for the component type, subtype, and interface version.
  15. #ifndef __ISOCHRONOUSDATAHANDLER_R__
  16. #ifndef __ISOCHRONOUSDATAHANDLER__
  17. #define __ISOCHRONOUSDATAHANDLER__
  18. #ifndef __MACTYPES__
  19. #include <MacTypes.h>
  20. #endif
  21. #ifndef __MOVIESFORMAT__
  22. #include <MoviesFormat.h>
  23. #endif
  24. #ifndef __QUICKTIMECOMPONENTS__
  25. #include <QuickTimeComponents.h>
  26. #endif
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. #if PRAGMA_IMPORT
  34. #pragma import on
  35. #endif
  36. #if PRAGMA_STRUCT_ALIGN
  37. #pragma options align=mac68k
  38. #elif PRAGMA_STRUCT_PACKPUSH
  39. #pragma pack(push, 2)
  40. #elif PRAGMA_STRUCT_PACK
  41. #pragma pack(2)
  42. #endif
  43. enum {
  44. kIDHComponentType = FOUR_CHAR_CODE('ihlr'), /* Component type*/
  45. kIDHSubtypeDV = FOUR_CHAR_CODE('dv '), /* Subtype for DV (over FireWire)*/
  46. kIDHSubtypeFireWireConference = FOUR_CHAR_CODE('fwc ') /* Subtype for FW Conference*/
  47. };
  48. /* Version of Isochronous Data Handler API*/
  49. enum {
  50. kIDHInterfaceVersion1 = 0x0001 /* Initial relase (Summer '99)*/
  51. };
  52. /* atom types*/
  53. enum {
  54. kIDHDeviceListAtomType = FOUR_CHAR_CODE('dlst'),
  55. kIDHDeviceAtomType = FOUR_CHAR_CODE('devc'), /* to be defined elsewhere*/
  56. kIDHIsochServiceAtomType = FOUR_CHAR_CODE('isoc'),
  57. kIDHIsochModeAtomType = FOUR_CHAR_CODE('mode'),
  58. kIDHDeviceIDType = FOUR_CHAR_CODE('dvid'),
  59. kIDHDefaultIOType = FOUR_CHAR_CODE('dfio'),
  60. kIDHIsochVersionAtomType = FOUR_CHAR_CODE('iver'),
  61. kIDHUniqueIDType = FOUR_CHAR_CODE('unid'),
  62. kIDHNameAtomType = FOUR_CHAR_CODE('name'),
  63. kIDHUseCMPAtomType = FOUR_CHAR_CODE('ucmp'),
  64. kIDHIsochMediaType = FOUR_CHAR_CODE('av '),
  65. kIDHDataTypeAtomType = FOUR_CHAR_CODE('dtyp'),
  66. kIDHDataSizeAtomType = FOUR_CHAR_CODE('dsiz'), /* ??? packet size vs. buffer size*/
  67. kIDHDataBufferSizeAtomType = FOUR_CHAR_CODE('dbuf'), /* ??? packet size vs. buffer size*/
  68. kIDHDataIntervalAtomType = FOUR_CHAR_CODE('intv'),
  69. kIDHDataIODirectionAtomType = FOUR_CHAR_CODE('ddir'),
  70. kIDHSoundMediaAtomType = FOUR_CHAR_CODE('soun'),
  71. kIDHSoundTypeAtomType = FOUR_CHAR_CODE('type'),
  72. kIDHSoundChannelCountAtomType = FOUR_CHAR_CODE('ccnt'),
  73. kIDHSoundSampleSizeAtomType = FOUR_CHAR_CODE('ssiz'),
  74. kIDHSoundSampleRateAtomType = FOUR_CHAR_CODE('srat'), /* same as video out... (what does this comment mean?)*/
  75. kIDHVideoMediaAtomType = FOUR_CHAR_CODE('vide'),
  76. kIDHVideoDimensionsAtomType = FOUR_CHAR_CODE('dimn'),
  77. kIDHVideoResolutionAtomType = FOUR_CHAR_CODE('resl'),
  78. kIDHVideoRefreshRateAtomType = FOUR_CHAR_CODE('refr'),
  79. kIDHVideoPixelTypeAtomType = FOUR_CHAR_CODE('pixl'),
  80. kIDHVideoDecompressorAtomType = FOUR_CHAR_CODE('deco'),
  81. kIDHVideoDecompressorTypeAtomType = FOUR_CHAR_CODE('dety'),
  82. kIDHVideoDecompressorContinuousAtomType = FOUR_CHAR_CODE('cont'),
  83. kIDHVideoDecompressorComponentAtomType = FOUR_CHAR_CODE('cmpt')
  84. };
  85. /* I/O Flags */
  86. enum {
  87. kIDHDataTypeIsInput = 1L << 0,
  88. kIDHDataTypeIsOutput = 1L << 1,
  89. kIDHDataTypeIsInputAndOutput = 1L << 2
  90. };
  91. /* Permission Flags */
  92. enum {
  93. kIDHOpenForReadTransactions = 1L << 0,
  94. kIDHOpenForWriteTransactions = 1L << 1,
  95. kIDHOpenWithExclusiveAccess = 1L << 2,
  96. kIDHOpenWithHeldBuffers = 1L << 3, /* IDH will hold buffer until ReleaseBuffer()*/
  97. kIDHCloseForReadTransactions = 1L << 4,
  98. kIDHCloseForWriteTransactions = 1L << 5
  99. };
  100. /*
  101. Errors
  102. These REALLY need to be moved into Errors.h
  103. ooo.needs officially assigned numbers
  104. */
  105. enum {
  106. kIDHErrDeviceDisconnected = -14101,
  107. kIDHErrInvalidDeviceID = -14102,
  108. kIDHErrDeviceInUse = -14104,
  109. kIDHErrDeviceNotOpened = -14105,
  110. kIDHErrDeviceBusy = -14106,
  111. kIDHErrDeviceReadError = -14107,
  112. kIDHErrDeviceWriteError = -14108,
  113. kIDHErrDeviceNotConfigured = -14109,
  114. kIDHErrDeviceList = -14110,
  115. kIDHErrCompletionPending = -14111,
  116. kIDHErrDeviceTimeout = -14112,
  117. kIDHErrInvalidIndex = -14113,
  118. kIDHErrDeviceCantRead = -14114,
  119. kIDHErrDeviceCantWrite = -14115,
  120. kIDHErrCallNotSupported = -14116
  121. };
  122. /* Holds Device Identification...*/
  123. typedef UInt32 IDHDeviceID;
  124. enum {
  125. kIDHInvalidDeviceID = 0,
  126. kIDHDeviceIDEveryDevice = (long)0xFFFFFFFF
  127. };
  128. /* Values for 5 bit STYPE part of CIP header*/
  129. enum {
  130. kIDHDV_SD = 0,
  131. kIDHDV_SDL = 1,
  132. kIDHDV_HD = 2,
  133. kIDHDVCPro_25 = 0x1E,
  134. kIDHDVCPro_50 = 0x1D,
  135. kIDHDVCPro_100 = 0x1C
  136. };
  137. /* Isoch Interval Atom Data*/
  138. struct IDHIsochInterval {
  139. SInt32 duration;
  140. TimeScale scale;
  141. };
  142. typedef struct IDHIsochInterval IDHIsochInterval;
  143. /* Need to fix this. For now, cast this as a FWReferenceID*/
  144. typedef struct OpaquePsuedoID* PsuedoID;
  145. /*
  146. Isoch Device Status
  147. This is atom-like, but isn't an atom
  148. */
  149. struct IDHDeviceStatus {
  150. UInt32 version;
  151. Boolean physicallyConnected;
  152. Boolean readEnabled;
  153. Boolean writeEnabled;
  154. Boolean exclusiveAccess;
  155. UInt32 currentBandwidth;
  156. UInt32 currentChannel;
  157. PsuedoID localNodeID; /*ooo.may go in atoms */
  158. SInt16 inputStandard; /* One of the QT input standards*/
  159. Boolean deviceActive;
  160. UInt8 inputFormat; /* Expected STYPE of data from device, if version >= 0x200*/
  161. UInt32 outputFormats; /* Bitmask for supported STYPE values, if version >= 0x200*/
  162. };
  163. typedef struct IDHDeviceStatus IDHDeviceStatus;
  164. /*
  165. Isochronous Data Handler Events
  166. */
  167. typedef UInt32 IDHEvent;
  168. enum {
  169. kIDHEventInvalid = 0,
  170. kIDHEventDeviceAdded = 1L << 0, /* A new device has been added to the bus*/
  171. kIDHEventDeviceRemoved = 1L << 1, /* A device has been removed from the bus*/
  172. kIDHEventDeviceChanged = 1L << 2, /* Some device has changed state on the bus*/
  173. kIDHEventReadEnabled = 1L << 3, /* A client has enabled a device for read*/
  174. kIDHEventReserved1 = 1L << 4, /* Reserved for future use*/
  175. kIDHEventReadDisabled = 1L << 5, /* A client has disabled a device from read*/
  176. kIDHEventWriteEnabled = 1L << 6, /* A client has enabled a device for write*/
  177. kIDHEventReserved2 = 1L << 7, /* Reserved for future use*/
  178. kIDHEventWriteDisabled = 1L << 8, /* A client has disabled a device for write*/
  179. kIDHEventEveryEvent = (unsigned long)0xFFFFFFFF
  180. };
  181. typedef UInt32 IDHNotificationID;
  182. struct IDHEventHeader {
  183. IDHDeviceID deviceID; /* Device which generated event*/
  184. IDHNotificationID notificationID;
  185. IDHEvent event; /* What the event is*/
  186. };
  187. typedef struct IDHEventHeader IDHEventHeader;
  188. /*
  189. IDHGenericEvent
  190. An IDH will often have to post events from at interrupt time. Since memory
  191. allocation cannot occur from the interrupt handler, the IDH can preallocate
  192. storage needed for handling the event by creating some IDHGenericEvent items.
  193. Subsequently, when an event is generated, the type of event (specified in the
  194. IDHEventHeader) will dictate how the IDHGenericEvent should be interpretted.
  195. IMPORTANT NOTE : This means that a specific event structure can NEVER be greater
  196. than the size of the generic one.
  197. */
  198. struct IDHGenericEvent {
  199. IDHEventHeader eventHeader;
  200. UInt32 pad[4];
  201. };
  202. typedef struct IDHGenericEvent IDHGenericEvent;
  203. /*
  204. IDHDeviceConnectionEvent
  205. For kIDHEventDeviceAdded or kIDHEventDeviceRemoved events.
  206. */
  207. struct IDHDeviceConnectionEvent {
  208. IDHEventHeader eventHeader;
  209. };
  210. typedef struct IDHDeviceConnectionEvent IDHDeviceConnectionEvent;
  211. /*
  212. IDHDeviceIOEnableEvent
  213. For kIDHEventReadEnabled, kIDHEventReadDisabled, kIDHEventWriteEnabled, or
  214. kIDHEventWriteDisabled.
  215. */
  216. struct IDHDeviceIOEnableEvent {
  217. IDHEventHeader eventHeader;
  218. };
  219. typedef struct IDHDeviceIOEnableEvent IDHDeviceIOEnableEvent;
  220. typedef CALLBACK_API_C( OSStatus , IDHNotificationProcPtr )(IDHGenericEvent *event, void *userData);
  221. typedef IDHNotificationProcPtr IDHNotificationProc;
  222. typedef TVECTOR_UPP_TYPE(IDHNotificationProcPtr) IDHNotificationUPP;
  223. struct IDHParameterBlock {
  224. UInt32 reserved1;
  225. UInt16 reserved2;
  226. void * buffer;
  227. ByteCount requestedCount;
  228. ByteCount actualCount;
  229. IDHNotificationUPP completionProc;
  230. void * refCon;
  231. OSErr result;
  232. };
  233. typedef struct IDHParameterBlock IDHParameterBlock;
  234. struct IDHResolution {
  235. UInt32 x;
  236. UInt32 y;
  237. };
  238. typedef struct IDHResolution IDHResolution;
  239. struct IDHDimension {
  240. Fixed x;
  241. Fixed y;
  242. };
  243. typedef struct IDHDimension IDHDimension;
  244. /*
  245. * IDHGetDeviceList()
  246. *
  247. * Availability:
  248. * Non-Carbon CFM: in IDHLib 1.0 and later
  249. * CarbonLib: in CarbonLib 1.3 and later
  250. * Mac OS X: not available
  251. */
  252. EXTERN_API( ComponentResult )
  253. IDHGetDeviceList(
  254. ComponentInstance idh,
  255. QTAtomContainer * deviceList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);
  256. /*
  257. * IDHGetDeviceConfiguration()
  258. *
  259. * Availability:
  260. * Non-Carbon CFM: in IDHLib 1.0 and later
  261. * CarbonLib: in CarbonLib 1.3 and later
  262. * Mac OS X: not available
  263. */
  264. EXTERN_API( ComponentResult )
  265. IDHGetDeviceConfiguration(
  266. ComponentInstance idh,
  267. QTAtomSpec * configurationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);
  268. /*
  269. * IDHSetDeviceConfiguration()
  270. *
  271. * Availability:
  272. * Non-Carbon CFM: in IDHLib 1.0 and later
  273. * CarbonLib: in CarbonLib 1.3 and later
  274. * Mac OS X: not available
  275. */
  276. EXTERN_API( ComponentResult )
  277. IDHSetDeviceConfiguration(
  278. ComponentInstance idh,
  279. const QTAtomSpec * configurationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  280. /*
  281. * IDHGetDeviceStatus()
  282. *
  283. * Availability:
  284. * Non-Carbon CFM: in IDHLib 1.0 and later
  285. * CarbonLib: in CarbonLib 1.3 and later
  286. * Mac OS X: not available
  287. */
  288. EXTERN_API( ComponentResult )
  289. IDHGetDeviceStatus(
  290. ComponentInstance idh,
  291. const QTAtomSpec * configurationID,
  292. IDHDeviceStatus * status) FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);
  293. /*
  294. * IDHGetDeviceClock()
  295. *
  296. * Availability:
  297. * Non-Carbon CFM: in IDHLib 1.0 and later
  298. * CarbonLib: in CarbonLib 1.3 and later
  299. * Mac OS X: not available
  300. */
  301. EXTERN_API( ComponentResult )
  302. IDHGetDeviceClock(
  303. ComponentInstance idh,
  304. Component * clock) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  305. /*
  306. * IDHOpenDevice()
  307. *
  308. * Availability:
  309. * Non-Carbon CFM: in IDHLib 1.0 and later
  310. * CarbonLib: in CarbonLib 1.3 and later
  311. * Mac OS X: not available
  312. */
  313. EXTERN_API( ComponentResult )
  314. IDHOpenDevice(
  315. ComponentInstance idh,
  316. UInt32 permissions) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  317. /*
  318. * IDHCloseDevice()
  319. *
  320. * Availability:
  321. * Non-Carbon CFM: in IDHLib 1.0 and later
  322. * CarbonLib: in CarbonLib 1.3 and later
  323. * Mac OS X: not available
  324. */
  325. EXTERN_API( ComponentResult )
  326. IDHCloseDevice(ComponentInstance idh) FIVEWORDINLINE(0x2F3C, 0x0000, 0x0007, 0x7000, 0xA82A);
  327. /*
  328. * IDHRead()
  329. *
  330. * Availability:
  331. * Non-Carbon CFM: in IDHLib 1.0 and later
  332. * CarbonLib: in CarbonLib 1.3 and later
  333. * Mac OS X: not available
  334. */
  335. EXTERN_API( ComponentResult )
  336. IDHRead(
  337. ComponentInstance idh,
  338. IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);
  339. /*
  340. * IDHWrite()
  341. *
  342. * Availability:
  343. * Non-Carbon CFM: in IDHLib 1.0 and later
  344. * CarbonLib: in CarbonLib 1.3 and later
  345. * Mac OS X: not available
  346. */
  347. EXTERN_API( ComponentResult )
  348. IDHWrite(
  349. ComponentInstance idh,
  350. IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);
  351. /*
  352. * IDHNewNotification()
  353. *
  354. * Availability:
  355. * Non-Carbon CFM: in IDHLib 1.0 and later
  356. * CarbonLib: in CarbonLib 1.3 and later
  357. * Mac OS X: not available
  358. */
  359. EXTERN_API( ComponentResult )
  360. IDHNewNotification(
  361. ComponentInstance idh,
  362. IDHDeviceID deviceID,
  363. IDHNotificationUPP notificationProc,
  364. void * userData,
  365. IDHNotificationID * notificationID) FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  366. /*
  367. * IDHNotifyMeWhen()
  368. *
  369. * Availability:
  370. * Non-Carbon CFM: in IDHLib 1.0 and later
  371. * CarbonLib: in CarbonLib 1.3 and later
  372. * Mac OS X: not available
  373. */
  374. EXTERN_API( ComponentResult )
  375. IDHNotifyMeWhen(
  376. ComponentInstance idh,
  377. IDHNotificationID notificationID,
  378. IDHEvent events) FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);
  379. /*
  380. * IDHCancelNotification()
  381. *
  382. * Availability:
  383. * Non-Carbon CFM: in IDHLib 1.0 and later
  384. * CarbonLib: in CarbonLib 1.3 and later
  385. * Mac OS X: not available
  386. */
  387. EXTERN_API( ComponentResult )
  388. IDHCancelNotification(
  389. ComponentInstance idh,
  390. IDHNotificationID notificationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  391. /*
  392. * IDHDisposeNotification()
  393. *
  394. * Availability:
  395. * Non-Carbon CFM: in IDHLib 1.0 and later
  396. * CarbonLib: in CarbonLib 1.3 and later
  397. * Mac OS X: not available
  398. */
  399. EXTERN_API( ComponentResult )
  400. IDHDisposeNotification(
  401. ComponentInstance idh,
  402. IDHNotificationID notificationID) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  403. /*
  404. * IDHReleaseBuffer()
  405. *
  406. * Availability:
  407. * Non-Carbon CFM: in IDHLib 1.0 and later
  408. * CarbonLib: in CarbonLib 1.3 and later
  409. * Mac OS X: not available
  410. */
  411. EXTERN_API( ComponentResult )
  412. IDHReleaseBuffer(
  413. ComponentInstance idh,
  414. IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  415. /*
  416. * IDHCancelPendingIO()
  417. *
  418. * Availability:
  419. * Non-Carbon CFM: in IDHLib 1.0 and later
  420. * CarbonLib: in CarbonLib 1.3 and later
  421. * Mac OS X: not available
  422. */
  423. EXTERN_API( ComponentResult )
  424. IDHCancelPendingIO(
  425. ComponentInstance idh,
  426. IDHParameterBlock * pb) FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);
  427. /*
  428. * IDHGetDeviceControl()
  429. *
  430. * Availability:
  431. * Non-Carbon CFM: in IDHLib 1.0 and later
  432. * CarbonLib: in CarbonLib 1.3 and later
  433. * Mac OS X: not available
  434. */
  435. EXTERN_API( ComponentResult )
  436. IDHGetDeviceControl(
  437. ComponentInstance idh,
  438. ComponentInstance * deviceControl) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);
  439. /*
  440. * IDHUpdateDeviceList()
  441. *
  442. * Availability:
  443. * Non-Carbon CFM: in IDHLib 1.0 and later
  444. * CarbonLib: in CarbonLib 1.3 and later
  445. * Mac OS X: not available
  446. */
  447. EXTERN_API( ComponentResult )
  448. IDHUpdateDeviceList(
  449. ComponentInstance idh,
  450. QTAtomContainer * deviceList) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);
  451. /*
  452. * IDHGetDeviceTime()
  453. *
  454. * Availability:
  455. * Non-Carbon CFM: not available
  456. * CarbonLib: in CarbonLib 1.4 and later
  457. * Mac OS X: not available
  458. */
  459. EXTERN_API( ComponentResult )
  460. IDHGetDeviceTime(
  461. ComponentInstance idh,
  462. TimeRecord * deviceTime) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  463. /*
  464. * IDHSetFormat()
  465. *
  466. * Availability:
  467. * Non-Carbon CFM: not available
  468. * CarbonLib: in CarbonLib 1.5 and later
  469. * Mac OS X: not available
  470. */
  471. EXTERN_API( ComponentResult )
  472. IDHSetFormat(
  473. ComponentInstance idh,
  474. UInt32 format) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
  475. /*
  476. * IDHGetFormat()
  477. *
  478. * Availability:
  479. * Non-Carbon CFM: not available
  480. * CarbonLib: in CarbonLib 1.5 and later
  481. * Mac OS X: not available
  482. */
  483. EXTERN_API( ComponentResult )
  484. IDHGetFormat(
  485. ComponentInstance idh,
  486. UInt32 * format) FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
  487. /*
  488. * NewIDHNotificationUPP()
  489. *
  490. * Availability:
  491. * Non-Carbon CFM: available as macro/inline
  492. * CarbonLib: in CarbonLib 1.4 and later
  493. * Mac OS X: not available
  494. */
  495. EXTERN_API_C( IDHNotificationUPP )
  496. NewIDHNotificationUPP(IDHNotificationProcPtr userRoutine);
  497. #if !OPAQUE_UPP_TYPES
  498. enum { uppIDHNotificationProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
  499. #ifdef __cplusplus
  500. inline DEFINE_API_C(IDHNotificationUPP) NewIDHNotificationUPP(IDHNotificationProcPtr userRoutine) { return userRoutine; }
  501. #else
  502. #define NewIDHNotificationUPP(userRoutine) (userRoutine)
  503. #endif
  504. #endif
  505. /*
  506. * DisposeIDHNotificationUPP()
  507. *
  508. * Availability:
  509. * Non-Carbon CFM: available as macro/inline
  510. * CarbonLib: in CarbonLib 1.4 and later
  511. * Mac OS X: not available
  512. */
  513. EXTERN_API_C( void )
  514. DisposeIDHNotificationUPP(IDHNotificationUPP userUPP);
  515. #if !OPAQUE_UPP_TYPES
  516. #ifdef __cplusplus
  517. inline DEFINE_API_C(void) DisposeIDHNotificationUPP(IDHNotificationUPP) {}
  518. #else
  519. #define DisposeIDHNotificationUPP(userUPP)
  520. #endif
  521. #endif
  522. /*
  523. * InvokeIDHNotificationUPP()
  524. *
  525. * Availability:
  526. * Non-Carbon CFM: available as macro/inline
  527. * CarbonLib: in CarbonLib 1.4 and later
  528. * Mac OS X: not available
  529. */
  530. EXTERN_API_C( OSStatus )
  531. InvokeIDHNotificationUPP(
  532. IDHGenericEvent * event,
  533. void * userData,
  534. IDHNotificationUPP userUPP);
  535. #if !OPAQUE_UPP_TYPES
  536. #ifdef __cplusplus
  537. inline DEFINE_API_C(OSStatus) InvokeIDHNotificationUPP(IDHGenericEvent * event, void * userData, IDHNotificationUPP userUPP) { return (*userUPP)(event, userData); }
  538. #else
  539. #define InvokeIDHNotificationUPP(event, userData, userUPP) (*userUPP)(event, userData)
  540. #endif
  541. #endif
  542. /* selectors for component calls */
  543. enum {
  544. kIDHGetDeviceListSelect = 0x0001,
  545. kIDHGetDeviceConfigurationSelect = 0x0002,
  546. kIDHSetDeviceConfigurationSelect = 0x0003,
  547. kIDHGetDeviceStatusSelect = 0x0004,
  548. kIDHGetDeviceClockSelect = 0x0005,
  549. kIDHOpenDeviceSelect = 0x0006,
  550. kIDHCloseDeviceSelect = 0x0007,
  551. kIDHReadSelect = 0x0008,
  552. kIDHWriteSelect = 0x0009,
  553. kIDHNewNotificationSelect = 0x000A,
  554. kIDHNotifyMeWhenSelect = 0x000B,
  555. kIDHCancelNotificationSelect = 0x000C,
  556. kIDHDisposeNotificationSelect = 0x000D,
  557. kIDHReleaseBufferSelect = 0x000E,
  558. kIDHCancelPendingIOSelect = 0x000F,
  559. kIDHGetDeviceControlSelect = 0x0010,
  560. kIDHUpdateDeviceListSelect = 0x0011,
  561. kIDHGetDeviceTimeSelect = 0x0012,
  562. kIDHSetFormatSelect = 0x0013,
  563. kIDHGetFormatSelect = 0x0014
  564. };
  565. #endif /* ifndef __ISOCHRONOUSDATAHANDLER_R__ */
  566. #if PRAGMA_STRUCT_ALIGN
  567. #pragma options align=reset
  568. #elif PRAGMA_STRUCT_PACKPUSH
  569. #pragma pack(pop)
  570. #elif PRAGMA_STRUCT_PACK
  571. #pragma pack()
  572. #endif
  573. #ifdef PRAGMA_IMPORT_OFF
  574. #pragma import off
  575. #elif PRAGMA_IMPORT
  576. #pragma import reset
  577. #endif
  578. #ifdef __cplusplus
  579. }
  580. #endif
  581. #endif /* __ISOCHRONOUSDATAHANDLER__ */