1/*
2 * Copyright (c) 2009 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*
24     File:       IsochronousDataHandler.k.h
25
26     Contains:   Component Manager based Isochronous Data Handler
27
28     Copyright:  � 1997-2001 by Apple Computer, Inc., all rights reserved.
29
30     Warning:    *** APPLE INTERNAL USE ONLY ***
31                 This file may contain unreleased API's
32
33     BuildInfo:  Built by:            wgulland
34                 On:                  Tue Mar 12 16:49:01 2002
35                 With Interfacer:     3.0d35   (Mac OS X for PowerPC)
36                 From:                IsochronousDataHandler.i
37                     Revision:        1.5
38                     Dated:           2001/10/05 16:46:32
39                     Last change by:  wgulland
40                     Last comment:    Add inputFormat to IDHDeviceStatus structure
41
42     Bugs:       Report bugs to Radar component "System Interfaces", "Latest"
43                 List the version information (from above) in the Problem Description.
44
45*/
46#ifndef __ISOCHRONOUSDATAHANDLER_K__
47#define __ISOCHRONOUSDATAHANDLER_K__
48
49#include <DVComponentGlue/IsochronousDataHandler.h>
50/*
51	Example usage:
52
53		#define IDH_BASENAME()	Fred
54		#define IDH_GLOBALS()	FredGlobalsHandle
55		#include <IsochronousDataHandler.k.h>
56
57	To specify that your component implementation does not use globals, do not #define IDH_GLOBALS
58*/
59#ifdef IDH_BASENAME
60	#ifndef IDH_GLOBALS
61		#define IDH_GLOBALS()
62		#define ADD_IDH_COMMA
63	#else
64		#define ADD_IDH_COMMA ,
65	#endif
66	#define IDH_GLUE(a,b) a##b
67	#define IDH_STRCAT(a,b) IDH_GLUE(a,b)
68	#define ADD_IDH_BASENAME(name) IDH_STRCAT(IDH_BASENAME(),name)
69
70	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(GetDeviceList) (IDH_GLOBALS() ADD_IDH_COMMA QTAtomContainer * deviceList);
71
72	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(GetDeviceConfiguration) (IDH_GLOBALS() ADD_IDH_COMMA QTAtomSpec * configurationID);
73
74	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(SetDeviceConfiguration) (IDH_GLOBALS() ADD_IDH_COMMA const QTAtomSpec * configurationID);
75
76	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(GetDeviceStatus) (IDH_GLOBALS() ADD_IDH_COMMA const QTAtomSpec * configurationID, IDHDeviceStatus * status);
77
78	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(GetDeviceClock) (IDH_GLOBALS() ADD_IDH_COMMA Component * clock);
79
80	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(OpenDevice) (IDH_GLOBALS() ADD_IDH_COMMA UInt32  permissions);
81
82	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(CloseDevice) (IDH_GLOBALS());
83
84	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(Read) (IDH_GLOBALS() ADD_IDH_COMMA IDHParameterBlock * pb);
85
86	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(Write) (IDH_GLOBALS() ADD_IDH_COMMA IDHParameterBlock * pb);
87
88	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(NewNotification) (IDH_GLOBALS() ADD_IDH_COMMA IDHDeviceID  deviceID, IDHNotificationUPP  notificationProc, void * userData, IDHNotificationID * notificationID);
89
90	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(NotifyMeWhen) (IDH_GLOBALS() ADD_IDH_COMMA IDHNotificationID  notificationID, IDHEvent  events);
91
92	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(CancelNotification) (IDH_GLOBALS() ADD_IDH_COMMA IDHNotificationID  notificationID);
93
94	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(DisposeNotification) (IDH_GLOBALS() ADD_IDH_COMMA IDHNotificationID  notificationID);
95
96	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(ReleaseBuffer) (IDH_GLOBALS() ADD_IDH_COMMA IDHParameterBlock * pb);
97
98	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(CancelPendingIO) (IDH_GLOBALS() ADD_IDH_COMMA IDHParameterBlock * pb);
99
100	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(GetDeviceControl) (IDH_GLOBALS() ADD_IDH_COMMA ComponentInstance * deviceControl);
101
102	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(UpdateDeviceList) (IDH_GLOBALS() ADD_IDH_COMMA QTAtomContainer * deviceList);
103
104	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(GetDeviceTime) (IDH_GLOBALS() ADD_IDH_COMMA TimeRecord * deviceTime);
105
106	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(SetFormat) (IDH_GLOBALS() ADD_IDH_COMMA UInt32  format);
107
108	EXTERN_API( ComponentResult  ) ADD_IDH_BASENAME(GetFormat) (IDH_GLOBALS() ADD_IDH_COMMA UInt32 * format);
109
110
111	/* MixedMode ProcInfo constants for component calls */
112	enum {
113		uppIDHGetDeviceListProcInfo = 0x000003F0,
114		uppIDHGetDeviceConfigurationProcInfo = 0x000003F0,
115		uppIDHSetDeviceConfigurationProcInfo = 0x000003F0,
116		uppIDHGetDeviceStatusProcInfo = 0x00000FF0,
117		uppIDHGetDeviceClockProcInfo = 0x000003F0,
118		uppIDHOpenDeviceProcInfo = 0x000003F0,
119		uppIDHCloseDeviceProcInfo = 0x000000F0,
120		uppIDHReadProcInfo = 0x000003F0,
121		uppIDHWriteProcInfo = 0x000003F0,
122		uppIDHNewNotificationProcInfo = 0x0000FFF0,
123		uppIDHNotifyMeWhenProcInfo = 0x00000FF0,
124		uppIDHCancelNotificationProcInfo = 0x000003F0,
125		uppIDHDisposeNotificationProcInfo = 0x000003F0,
126		uppIDHReleaseBufferProcInfo = 0x000003F0,
127		uppIDHCancelPendingIOProcInfo = 0x000003F0,
128		uppIDHGetDeviceControlProcInfo = 0x000003F0,
129		uppIDHUpdateDeviceListProcInfo = 0x000003F0,
130		uppIDHGetDeviceTimeProcInfo = 0x000003F0,
131		uppIDHSetFormatProcInfo = 0x000003F0,
132		uppIDHGetFormatProcInfo = 0x000003F0
133	};
134
135#endif	/* IDH_BASENAME */
136
137
138#endif /* __ISOCHRONOUSDATAHANDLER_K__ */
139
140