summaryrefslogtreecommitdiff
path: root/common/quicktime_win32/IsochronousDataHandler.h
blob: 2dd2609c1af5a74ead710c453196572cdb9cf7ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
/*
     File:       IsochronousDataHandler.h
 
     Contains:   Component Manager based Isochronous Data Handler
 
     Version:    QuickTime 7.3
 
     Copyright:  (c) 2007 (c) 1997-2001 by Apple Computer, Inc., all rights reserved.
 
     Bugs?:      For bug reports, consult the following page on
                 the World Wide Web:
 
                     http://developer.apple.com/bugreporter/
 
*/
//
// Check for Prior Inclusion of IsochronousDataHandler.r
//  If this header is trying to be included via a Rez path, make it act
//  as a NOP.  This will allow both Rez & C files to get to use the
//  contants for the component type, subtype, and interface version.
#ifndef __ISOCHRONOUSDATAHANDLER_R__


#ifndef __ISOCHRONOUSDATAHANDLER__
#define __ISOCHRONOUSDATAHANDLER__

#ifndef __MACTYPES__
#include <MacTypes.h>
#endif

#ifndef __MOVIESFORMAT__
#include <MoviesFormat.h>
#endif

#ifndef __QUICKTIMECOMPONENTS__
#include <QuickTimeComponents.h>
#endif







#if PRAGMA_ONCE
#pragma once
#endif

#ifdef __cplusplus
extern "C" {
#endif

#if PRAGMA_IMPORT
#pragma import on
#endif

#if PRAGMA_STRUCT_ALIGN
    #pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
    #pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
    #pragma pack(2)
#endif

enum {
  kIDHComponentType             = FOUR_CHAR_CODE('ihlr'), /* Component type*/
  kIDHSubtypeDV                 = FOUR_CHAR_CODE('dv  '), /* Subtype for DV (over FireWire)*/
  kIDHSubtypeFireWireConference = FOUR_CHAR_CODE('fwc ') /* Subtype for FW Conference*/
};


/* Version of Isochronous Data Handler API*/
enum {
  kIDHInterfaceVersion1         = 0x0001 /* Initial relase (Summer '99)*/
};


/* atom types*/

enum {
  kIDHDeviceListAtomType        = FOUR_CHAR_CODE('dlst'),
  kIDHDeviceAtomType            = FOUR_CHAR_CODE('devc'), /* to be defined elsewhere*/
  kIDHIsochServiceAtomType      = FOUR_CHAR_CODE('isoc'),
  kIDHIsochModeAtomType         = FOUR_CHAR_CODE('mode'),
  kIDHDeviceIDType              = FOUR_CHAR_CODE('dvid'),
  kIDHDefaultIOType             = FOUR_CHAR_CODE('dfio'),
  kIDHIsochVersionAtomType      = FOUR_CHAR_CODE('iver'),
  kIDHUniqueIDType              = FOUR_CHAR_CODE('unid'),
  kIDHNameAtomType              = FOUR_CHAR_CODE('name'),
  kIDHUseCMPAtomType            = FOUR_CHAR_CODE('ucmp'),
  kIDHIsochMediaType            = FOUR_CHAR_CODE('av  '),
  kIDHDataTypeAtomType          = FOUR_CHAR_CODE('dtyp'),
  kIDHDataSizeAtomType          = FOUR_CHAR_CODE('dsiz'), /* ??? packet size vs. buffer size*/
  kIDHDataBufferSizeAtomType    = FOUR_CHAR_CODE('dbuf'), /* ??? packet size vs. buffer size*/
  kIDHDataIntervalAtomType      = FOUR_CHAR_CODE('intv'),
  kIDHDataIODirectionAtomType   = FOUR_CHAR_CODE('ddir'),
  kIDHSoundMediaAtomType        = FOUR_CHAR_CODE('soun'),
  kIDHSoundTypeAtomType         = FOUR_CHAR_CODE('type'),
  kIDHSoundChannelCountAtomType = FOUR_CHAR_CODE('ccnt'),
  kIDHSoundSampleSizeAtomType   = FOUR_CHAR_CODE('ssiz'),
  kIDHSoundSampleRateAtomType   = FOUR_CHAR_CODE('srat'), /* same as video out... (what does this comment mean?)*/
  kIDHVideoMediaAtomType        = FOUR_CHAR_CODE('vide'),
  kIDHVideoDimensionsAtomType   = FOUR_CHAR_CODE('dimn'),
  kIDHVideoResolutionAtomType   = FOUR_CHAR_CODE('resl'),
  kIDHVideoRefreshRateAtomType  = FOUR_CHAR_CODE('refr'),
  kIDHVideoPixelTypeAtomType    = FOUR_CHAR_CODE('pixl'),
  kIDHVideoDecompressorAtomType = FOUR_CHAR_CODE('deco'),
  kIDHVideoDecompressorTypeAtomType = FOUR_CHAR_CODE('dety'),
  kIDHVideoDecompressorContinuousAtomType = FOUR_CHAR_CODE('cont'),
  kIDHVideoDecompressorComponentAtomType = FOUR_CHAR_CODE('cmpt')
};

/* I/O Flags */
enum {
  kIDHDataTypeIsInput           = 1L << 0,
  kIDHDataTypeIsOutput          = 1L << 1,
  kIDHDataTypeIsInputAndOutput  = 1L << 2
};


/* Permission Flags */
enum {
  kIDHOpenForReadTransactions   = 1L << 0,
  kIDHOpenForWriteTransactions  = 1L << 1,
  kIDHOpenWithExclusiveAccess   = 1L << 2,
  kIDHOpenWithHeldBuffers       = 1L << 3, /* IDH will hold buffer until ReleaseBuffer()*/
  kIDHCloseForReadTransactions  = 1L << 4,
  kIDHCloseForWriteTransactions = 1L << 5
};


/*
   Errors 
    These REALLY need to be moved into Errors.h
   ooo.needs officially assigned numbers
*/
enum {
  kIDHErrDeviceDisconnected     = -14101,
  kIDHErrInvalidDeviceID        = -14102,
  kIDHErrDeviceInUse            = -14104,
  kIDHErrDeviceNotOpened        = -14105,
  kIDHErrDeviceBusy             = -14106,
  kIDHErrDeviceReadError        = -14107,
  kIDHErrDeviceWriteError       = -14108,
  kIDHErrDeviceNotConfigured    = -14109,
  kIDHErrDeviceList             = -14110,
  kIDHErrCompletionPending      = -14111,
  kIDHErrDeviceTimeout          = -14112,
  kIDHErrInvalidIndex           = -14113,
  kIDHErrDeviceCantRead         = -14114,
  kIDHErrDeviceCantWrite        = -14115,
  kIDHErrCallNotSupported       = -14116
};




/* Holds Device Identification...*/
typedef UInt32                          IDHDeviceID;
enum {
  kIDHInvalidDeviceID           = 0,
  kIDHDeviceIDEveryDevice       = (long)0xFFFFFFFF
};

/* Values for 5 bit STYPE part of CIP header*/
enum {
  kIDHDV_SD                     = 0,
  kIDHDV_SDL                    = 1,
  kIDHDV_HD                     = 2,
  kIDHDVCPro_25                 = 0x1E,
  kIDHDVCPro_50                 = 0x1D,
  kIDHDVCPro_100                = 0x1C
};

/*  Isoch Interval Atom Data*/
struct IDHIsochInterval {
  SInt32              duration;
  TimeScale           scale;
};
typedef struct IDHIsochInterval         IDHIsochInterval;
/* Need to fix this.  For now, cast this as a FWReferenceID*/
typedef struct OpaquePsuedoID*          PsuedoID;
/*
   Isoch Device Status
    This is atom-like, but isn't an atom
*/
struct IDHDeviceStatus {
  UInt32              version;
  Boolean             physicallyConnected;
  Boolean             readEnabled;
  Boolean             writeEnabled;
  Boolean             exclusiveAccess;
  UInt32              currentBandwidth;
  UInt32              currentChannel;
  PsuedoID            localNodeID;            /*ooo.may go in atoms */
  SInt16              inputStandard;          /* One of the QT input standards*/
  Boolean             deviceActive;
  UInt8               inputFormat;            /* Expected STYPE of data from device, if version >= 0x200*/
  UInt32              outputFormats;          /* Bitmask for supported STYPE values, if version >= 0x200*/
};
typedef struct IDHDeviceStatus          IDHDeviceStatus;
/*
   Isochronous Data Handler Events
    
*/
typedef UInt32 IDHEvent;
enum {
  kIDHEventInvalid              = 0,
  kIDHEventDeviceAdded          = 1L << 0, /* A new device has been added to the bus*/
  kIDHEventDeviceRemoved        = 1L << 1, /* A device has been removed from the bus*/
  kIDHEventDeviceChanged        = 1L << 2, /* Some device has changed state on the bus*/
  kIDHEventReadEnabled          = 1L << 3, /* A client has enabled a device for read*/
  kIDHEventReserved1            = 1L << 4, /* Reserved for future use*/
  kIDHEventReadDisabled         = 1L << 5, /* A client has disabled a device from read*/
  kIDHEventWriteEnabled         = 1L << 6, /* A client has enabled a device for write*/
  kIDHEventReserved2            = 1L << 7, /* Reserved for future use*/
  kIDHEventWriteDisabled        = 1L << 8, /* A client has disabled a device for write*/
  kIDHEventEveryEvent           = (unsigned long)0xFFFFFFFF
};


typedef UInt32                          IDHNotificationID;
struct IDHEventHeader {
  IDHDeviceID         deviceID;               /* Device which generated event*/
  IDHNotificationID   notificationID;
  IDHEvent            event;                  /* What the event is*/
};
typedef struct IDHEventHeader           IDHEventHeader;



/*
   IDHGenericEvent
    An IDH will often have to post events from at interrupt time.  Since memory
    allocation cannot occur from the interrupt handler, the IDH can preallocate
    storage needed for handling the event by creating some IDHGenericEvent items.
    Subsequently, when an event is generated, the type of event (specified in the
    IDHEventHeader) will dictate how the IDHGenericEvent should be interpretted.
    
    IMPORTANT NOTE : This means that a specific event structure can NEVER be greater
    than the size of the generic one.
    
*/
struct IDHGenericEvent {
  IDHEventHeader      eventHeader;
  UInt32              pad[4];
};
typedef struct IDHGenericEvent          IDHGenericEvent;
/*
   IDHDeviceConnectionEvent
    For kIDHEventDeviceAdded or kIDHEventDeviceRemoved events.
*/
struct IDHDeviceConnectionEvent {
  IDHEventHeader      eventHeader;
};
typedef struct IDHDeviceConnectionEvent IDHDeviceConnectionEvent;
/*
   IDHDeviceIOEnableEvent
    For kIDHEventReadEnabled, kIDHEventReadDisabled, kIDHEventWriteEnabled, or
    kIDHEventWriteDisabled.
*/
struct IDHDeviceIOEnableEvent {
  IDHEventHeader      eventHeader;
};
typedef struct IDHDeviceIOEnableEvent   IDHDeviceIOEnableEvent;
typedef CALLBACK_API_C( OSStatus , IDHNotificationProcPtr )(IDHGenericEvent *event, void *userData);

typedef IDHNotificationProcPtr          IDHNotificationProc;
typedef TVECTOR_UPP_TYPE(IDHNotificationProcPtr)                IDHNotificationUPP;
struct IDHParameterBlock {
  UInt32              reserved1;
  UInt16              reserved2;
  void *              buffer;
  ByteCount           requestedCount;
  ByteCount           actualCount;
  IDHNotificationUPP  completionProc;
  void *              refCon;
  OSErr               result;
};
typedef struct IDHParameterBlock        IDHParameterBlock;
struct IDHResolution {
  UInt32              x;
  UInt32              y;
};
typedef struct IDHResolution            IDHResolution;
struct IDHDimension {
  Fixed               x;
  Fixed               y;
};
typedef struct IDHDimension             IDHDimension;

/*
 *  IDHGetDeviceList()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHGetDeviceList(
  ComponentInstance   idh,
  QTAtomContainer *   deviceList)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0001, 0x7000, 0xA82A);


/*
 *  IDHGetDeviceConfiguration()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHGetDeviceConfiguration(
  ComponentInstance   idh,
  QTAtomSpec *        configurationID)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0002, 0x7000, 0xA82A);


/*
 *  IDHSetDeviceConfiguration()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHSetDeviceConfiguration(
  ComponentInstance   idh,
  const QTAtomSpec *  configurationID)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);


/*
 *  IDHGetDeviceStatus()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHGetDeviceStatus(
  ComponentInstance   idh,
  const QTAtomSpec *  configurationID,
  IDHDeviceStatus *   status)                                 FIVEWORDINLINE(0x2F3C, 0x0008, 0x0004, 0x7000, 0xA82A);


/*
 *  IDHGetDeviceClock()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHGetDeviceClock(
  ComponentInstance   idh,
  Component *         clock)                                  FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);


/*
 *  IDHOpenDevice()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHOpenDevice(
  ComponentInstance   idh,
  UInt32              permissions)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);


/*
 *  IDHCloseDevice()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHCloseDevice(ComponentInstance idh)                         FIVEWORDINLINE(0x2F3C, 0x0000, 0x0007, 0x7000, 0xA82A);


/*
 *  IDHRead()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHRead(
  ComponentInstance    idh,
  IDHParameterBlock *  pb)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0008, 0x7000, 0xA82A);


/*
 *  IDHWrite()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHWrite(
  ComponentInstance    idh,
  IDHParameterBlock *  pb)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0009, 0x7000, 0xA82A);


/*
 *  IDHNewNotification()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHNewNotification(
  ComponentInstance    idh,
  IDHDeviceID          deviceID,
  IDHNotificationUPP   notificationProc,
  void *               userData,
  IDHNotificationID *  notificationID)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);


/*
 *  IDHNotifyMeWhen()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHNotifyMeWhen(
  ComponentInstance   idh,
  IDHNotificationID   notificationID,
  IDHEvent            events)                                 FIVEWORDINLINE(0x2F3C, 0x0008, 0x000B, 0x7000, 0xA82A);


/*
 *  IDHCancelNotification()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHCancelNotification(
  ComponentInstance   idh,
  IDHNotificationID   notificationID)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);


/*
 *  IDHDisposeNotification()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHDisposeNotification(
  ComponentInstance   idh,
  IDHNotificationID   notificationID)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);


/*
 *  IDHReleaseBuffer()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHReleaseBuffer(
  ComponentInstance    idh,
  IDHParameterBlock *  pb)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);


/*
 *  IDHCancelPendingIO()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHCancelPendingIO(
  ComponentInstance    idh,
  IDHParameterBlock *  pb)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x000F, 0x7000, 0xA82A);


/*
 *  IDHGetDeviceControl()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHGetDeviceControl(
  ComponentInstance    idh,
  ComponentInstance *  deviceControl)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x0010, 0x7000, 0xA82A);


/*
 *  IDHUpdateDeviceList()
 *  
 *  Availability:
 *    Non-Carbon CFM:   in IDHLib 1.0 and later
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHUpdateDeviceList(
  ComponentInstance   idh,
  QTAtomContainer *   deviceList)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0011, 0x7000, 0xA82A);


/*
 *  IDHGetDeviceTime()
 *  
 *  Availability:
 *    Non-Carbon CFM:   not available
 *    CarbonLib:        in CarbonLib 1.4 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHGetDeviceTime(
  ComponentInstance   idh,
  TimeRecord *        deviceTime)                             FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);


/*
 *  IDHSetFormat()
 *  
 *  Availability:
 *    Non-Carbon CFM:   not available
 *    CarbonLib:        in CarbonLib 1.5 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHSetFormat(
  ComponentInstance   idh,
  UInt32              format)                                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);


/*
 *  IDHGetFormat()
 *  
 *  Availability:
 *    Non-Carbon CFM:   not available
 *    CarbonLib:        in CarbonLib 1.5 and later
 *    Mac OS X:         not available
 */
EXTERN_API( ComponentResult )
IDHGetFormat(
  ComponentInstance   idh,
  UInt32 *            format)                                 FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);



/*
 *  NewIDHNotificationUPP()
 *  
 *  Availability:
 *    Non-Carbon CFM:   available as macro/inline
 *    CarbonLib:        in CarbonLib 1.4 and later
 *    Mac OS X:         not available
 */
EXTERN_API_C( IDHNotificationUPP )
NewIDHNotificationUPP(IDHNotificationProcPtr userRoutine);
#if !OPAQUE_UPP_TYPES
  enum { uppIDHNotificationProcInfo = 0x000003F1 };  /* 4_bytes Func(4_bytes, 4_bytes) */
  #ifdef __cplusplus
    inline DEFINE_API_C(IDHNotificationUPP) NewIDHNotificationUPP(IDHNotificationProcPtr userRoutine) { return userRoutine; }
  #else
    #define NewIDHNotificationUPP(userRoutine) (userRoutine)
  #endif
#endif

/*
 *  DisposeIDHNotificationUPP()
 *  
 *  Availability:
 *    Non-Carbon CFM:   available as macro/inline
 *    CarbonLib:        in CarbonLib 1.4 and later
 *    Mac OS X:         not available
 */
EXTERN_API_C( void )
DisposeIDHNotificationUPP(IDHNotificationUPP userUPP);
#if !OPAQUE_UPP_TYPES
  #ifdef __cplusplus
      inline DEFINE_API_C(void) DisposeIDHNotificationUPP(IDHNotificationUPP) {}
  #else
      #define DisposeIDHNotificationUPP(userUPP)
  #endif
#endif

/*
 *  InvokeIDHNotificationUPP()
 *  
 *  Availability:
 *    Non-Carbon CFM:   available as macro/inline
 *    CarbonLib:        in CarbonLib 1.4 and later
 *    Mac OS X:         not available
 */
EXTERN_API_C( OSStatus )
InvokeIDHNotificationUPP(
  IDHGenericEvent *   event,
  void *              userData,
  IDHNotificationUPP  userUPP);
#if !OPAQUE_UPP_TYPES
  #ifdef __cplusplus
      inline DEFINE_API_C(OSStatus) InvokeIDHNotificationUPP(IDHGenericEvent * event, void * userData, IDHNotificationUPP userUPP) { return (*userUPP)(event, userData); }
  #else
      #define InvokeIDHNotificationUPP(event, userData, userUPP) (*userUPP)(event, userData)
  #endif
#endif


/* selectors for component calls */
enum {
    kIDHGetDeviceListSelect                    = 0x0001,
    kIDHGetDeviceConfigurationSelect           = 0x0002,
    kIDHSetDeviceConfigurationSelect           = 0x0003,
    kIDHGetDeviceStatusSelect                  = 0x0004,
    kIDHGetDeviceClockSelect                   = 0x0005,
    kIDHOpenDeviceSelect                       = 0x0006,
    kIDHCloseDeviceSelect                      = 0x0007,
    kIDHReadSelect                             = 0x0008,
    kIDHWriteSelect                            = 0x0009,
    kIDHNewNotificationSelect                  = 0x000A,
    kIDHNotifyMeWhenSelect                     = 0x000B,
    kIDHCancelNotificationSelect               = 0x000C,
    kIDHDisposeNotificationSelect              = 0x000D,
    kIDHReleaseBufferSelect                    = 0x000E,
    kIDHCancelPendingIOSelect                  = 0x000F,
    kIDHGetDeviceControlSelect                 = 0x0010,
    kIDHUpdateDeviceListSelect                 = 0x0011,
    kIDHGetDeviceTimeSelect                    = 0x0012,
    kIDHSetFormatSelect                        = 0x0013,
    kIDHGetFormatSelect                        = 0x0014
};


#endif /* ifndef __ISOCHRONOUSDATAHANDLER_R__ */

#if PRAGMA_STRUCT_ALIGN
    #pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
    #pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
    #pragma pack()
#endif

#ifdef PRAGMA_IMPORT_OFF
#pragma import off
#elif PRAGMA_IMPORT
#pragma import reset
#endif

#ifdef __cplusplus
}
#endif

#endif /* __ISOCHRONOUSDATAHANDLER__ */