]>
git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/storage/IOCDAudioControl.h
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
24 * @header IOCDAudioControl
26 * This header contains the IOCDAudioControl class definition.
29 #ifndef _IOCDAUDIOCONTROL_H
30 #define _IOCDAUDIOCONTROL_H
33 * @defined kIOCDAudioControlClass
35 * kIOCDAudioControlClass is the name of the IOCDAudioControl class.
37 * kIOCDAudioControlClass is the name of the IOCDAudioControl class.
40 #define kIOCDAudioControlClass "IOCDAudioControl"
46 #if defined(KERNEL) && defined(__cplusplus)
48 #include <IOKit/storage/IOCDBlockStorageDriver.h>
51 * @class IOCDAudioControl
53 * This class is the protocol for CD audio control functionality, independent of
54 * the physical connection protocol (eg. SCSI, ATA, USB). Any methods that deal
55 * with audio play and/or volume are here.
58 class IOCDAudioControl
: public IOService
60 OSDeclareDefaultStructors(IOCDAudioControl
)
64 struct ExpansionData
{ /* */ };
65 ExpansionData
* _expansionData
;
68 * Create a new IOCDAudioControlUserClient.
71 virtual IOReturn
newUserClient( task_t task
,
74 IOUserClient
** object
);
81 * Get the current audio play status information.
83 * The buffer for the returned information.
86 virtual IOReturn
getStatus(CDAudioStatus
* status
);
91 * Get the full Table Of Contents.
93 * Returns a pointer to the TOC buffer (do not deallocate).
96 virtual CDTOC
* getTOC(void);
101 * Get the current audio volume.
103 * A pointer to the returned left-channel volume.
105 * A pointer to the returned right-channel volume.
108 virtual IOReturn
getVolume(UInt8
* left
, UInt8
* right
);
111 * @function setVolume
113 * Set the current audio volume.
115 * The desired left-channel volume.
117 * The desired right-channel volume.
120 virtual IOReturn
setVolume(UInt8 left
, UInt8 right
);
125 * Pause or resume the audio playback.
127 * True to pause playback; False to resume.
130 virtual IOReturn
pause(bool pause
);
137 * The M:S:F address from which to begin.
139 * The M:S:F address at which to stop.
142 virtual IOReturn
play(CDMSF timeStart
, CDMSF timeStop
);
147 * Perform a fast-forward or fast-backward operation.
149 * The M:S:F address from which to begin.
151 * True to go backward; False to go forward.
154 virtual IOReturn
scan(CDMSF timeStart
, bool reverse
);
159 * Stop the audio playback (or audio scan).
162 virtual IOReturn
stop();
165 * Obtain this object's provider. We override the superclass's method to
166 * return a more specific subclass of IOService -- IOCDBlockStorageDriver.
167 * This method serves simply as a convenience to subclass developers.
170 virtual IOCDBlockStorageDriver
* getProvider() const;
172 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 0);
173 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 1);
174 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 2);
175 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 3);
176 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 4);
177 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 5);
178 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 6);
179 OSMetaClassDeclareReservedUnused(IOCDAudioControl
, 7);
182 #endif /* defined(KERNEL) && defined(__cplusplus) */
184 #endif /* !_IOCDAUDIOCONTROL_H */