|
|
1.1 root 1: /*
2: * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
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.
11: *
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
18: * under the License.
19: *
20: * @APPLE_LICENSE_HEADER_END@
21: */
22: /* IOCDDriveNub.h created by rick on Wed 07-Apr-1999
23:
24: * This class is the protocol for generic CDROM functionality, independent of
25: * the physical connection protocol (e.g. SCSI, ATA, USB).
26: *
27: * The APIs are the union of CDROM (hard disk) data APIs and all
28: * necessary low-level CD APIs.
29: *
30: * A subclass implements relay methods that translate our requests into
31: * calls to a protocol- and device-specific provider.
32: */
33:
34: #ifndef _IOCDDRIVENUB_H
35: #define _IOCDDRIVENUB_H
36:
37: #include <IOKit/IOTypes.h>
38: #include <IOKit/storage/IOHDDriveNub.h>
39: #include "IOCDTypes.h"
40:
41: /* Property used for matching, so the generic driver gets the nub it wants. */
42: #define kDeviceTypeCDROM "CDROM"
43:
44: class IOMemoryDescriptor;
45:
46: class IOCDDriveNub : public IOHDDriveNub {
47:
48: OSDeclareAbstractStructors(IOCDDriveNub)
49:
50: public:
51:
52: /* Overrides from IORegistryEntry */
53:
54: virtual bool init(OSDictionary * properties);
55:
56: /* Overrides from IOHDDriveNub: */
57:
58: virtual IOReturn doFormatMedia(UInt64 byteCapacity);
59: virtual UInt32 doGetFormatCapacities(UInt64 * capacities,
60: UInt32 capacitiesMaxCount) const;
61: virtual IOReturn doSynchronizeCache(void);
62: virtual IOReturn reportMaxWriteTransfer(UInt64 blockSize,UInt64 *max);
63: virtual IOReturn reportWriteProtection(bool *isWriteProtected);
64:
65: /* ------------------------------------------------*/
66: /* APIs that affect the entire media in the drive, */
67: /* exported eventually by IOCDMediaNub: */
68: /* ------------------------------------------------*/
69:
70: virtual IOReturn audioPause(bool pause) = 0;
71: virtual IOReturn audioScan(positioningType addressType,cdAddress address,bool reverse) = 0;
72: virtual IOReturn readAudioData(positioningType addressType,cdAddress address,
73: UInt8 blockCount,UInt8 *buffer) = 0;
74: virtual IOReturn readAudioSubcodes(positioningType addressType,cdAddress address,
75: UInt8 blockCount,UInt8 *buffer) = 0;
76: virtual IOReturn readAudioWithQSubcode(positioningType addressType,cdAddress address,
77: UInt8 blockCount,UInt8 *buffer) = 0;
78: virtual IOReturn readAudioWithAllSubcodes(positioningType addressType,cdAddress address,
79: UInt8 blockCount,UInt8 *buffer) = 0;
80: virtual IOReturn readHeader(UInt32 blockAddress,struct headerInfo *buffer) = 0;
81: virtual IOReturn readISRC(UInt32 track,UInt8 *buffer,bool *found) = 0;
82: virtual IOReturn readMCN(UInt8 *buffer,bool *found) = 0;
83: virtual IOReturn readQSubcodes(struct qSubcodeTocInfo *buffer,UInt32 bufSize) = 0;
84: virtual IOReturn readSubcodeBuffer(UInt8 *buffer,bool purge,UInt32 entryCount) = 0;
85: virtual IOReturn readTheQSubcode(struct qSubcode *buffer) = 0;
86: virtual IOReturn readTOC(struct rawToc *buffer,UInt32 length,tocFormat format) = 0;
87:
88: /* ----------------------------------------*/
89: /* APIs exported by IOCDAudioNub: */
90: /* ----------------------------------------*/
91:
92: virtual IOReturn audioPlay(positioningType addressType,cdAddress address,
93: audioPlayMode mode) = 0;
94: virtual IOReturn audioTrackSearch(positioningType addressType,cdAddress address,
95: bool startPlay,audioPlayMode mode) = 0;
96: virtual IOReturn getAudioStatus(struct audioStatus *status) = 0;
97: virtual IOReturn readAudioVolume(UInt8 *leftVolume,UInt8 *rightVolume) = 0;
98: virtual IOReturn setAudioStopAddress(positioningType addressType,cdAddress address) = 0;
99: virtual IOReturn setVolume(UInt8 leftVolume,UInt8 rightVolume) = 0;
100:
101: };
102: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.