2 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
10 * Protocol interface for any device that supports removable media (i.e. optical drives).
13 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
14 Computer, Inc. ("Apple") in consideration of your agreement to the
15 following terms, and your use, installation, modification or
16 redistribution of this Apple software constitutes acceptance of these
17 terms. If you do not agree with these terms, please do not use,
18 install, modify or redistribute this Apple software.
20 In consideration of your agreement to abide by the following terms, and
21 subject to these terms, Apple grants you a personal, non-exclusive
22 license, under Apple's copyrights in this original Apple software (the
23 "Apple Software"), to use, reproduce, modify and redistribute the Apple
24 Software, with or without modifications, in source and/or binary forms;
25 provided that if you redistribute the Apple Software in its entirety and
26 without modifications, you must retain this notice and the following
27 text and disclaimers in all such redistributions of the Apple Software.
28 Neither the name, trademarks, service marks or logos of Apple Computer,
29 Inc. may be used to endorse or promote products derived from the Apple
30 Software without specific prior written permission from Apple. Except
31 as expressly stated in this notice, no other rights or licenses, express
32 or implied, are granted by Apple herein, including but not limited to
33 any patent rights that may be infringed by your derivative works or by
34 other works in which the Apple Software may be incorporated.
36 The Apple Software is provided by Apple on an "AS IS" basis. APPLE
37 MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
38 THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
39 FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
40 OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
42 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
43 OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
44 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
45 INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
46 MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
47 AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
48 STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
49 POSSIBILITY OF SUCH DAMAGE.
51 Copyright © 2006 Apple Computer, Inc., All Rights Reserved
55 #ifndef _APPLE_REMOVABLE_MEDIA_H
56 #define _APPLE_REMOVABLE_MEDIA_H
59 // Global Id for Removable_Media Interface
61 // {2EA9743A-23D9-425e-872C-F615AA195788}
62 #define APPLE_REMOVABLE_MEDIA_PROTOCOL_GUID \
64 0x2ea9743a, 0x23d9, 0x425e, { 0x87, 0x2c, 0xf6, 0x15, 0xaa, 0x19, 0x57, 0x88 } \
67 #define APPLE_REMOVABLE_MEDIA_PROTOCOL_REVISION 0x00000001
69 // EFI_FORWARD_DECLARATION (APPLE_REMOVABLE_MEDIA_PROTOCOL);
70 typedef struct _APPLE_REMOVABLE_MEDIA_PROTOCOL APPLE_REMOVABLE_MEDIA_PROTOCOL
;
77 (EFIAPI
*APPLE_REMOVABLE_MEDIA_EJECT
) (
78 IN APPLE_REMOVABLE_MEDIA_PROTOCOL
* This
83 Eject removable media from drive (such as a CD/DVD).
86 This - Protocol instance pointer.
89 EFI_SUCCESS - The media was ejected.
99 (EFIAPI
*APPLE_REMOVABLE_MEDIA_INJECT
) (
100 IN APPLE_REMOVABLE_MEDIA_PROTOCOL
* This
105 Inject removable media into drive (such as a CD/DVD).
108 This - Protocol instance pointer.
111 EFI_SUCCESS - The media was injected.
117 // Allow media to be ejected
121 (EFIAPI
*APPLE_REMOVABLE_MEDIA_ALLOW_REMOVAL
) (
122 IN APPLE_REMOVABLE_MEDIA_PROTOCOL
* This
127 Allow the media to be removed from the drive.
130 This - Protocol instance pointer.
133 EFI_SUCCESS - The media can now be removed.
134 EFI_UNSUPPORTED - The media cannot be removed.
140 // Prevent media from being ejected
144 (EFIAPI
*APPLE_REMOVABLE_MEDIA_PREVENT_REMOVAL
) (
145 IN APPLE_REMOVABLE_MEDIA_PROTOCOL
* This
150 Prevent the media from being removed from the drive.
153 This - Protocol instance pointer.
156 EFI_SUCCESS - The drive is locked, and the media cannot be removed.
157 EFI_UNSUPPORTED - The drive cannot be locked.
163 // Detect state of removable media tray
167 (EFIAPI
*APPLE_REMOVABLE_MEDIA_DETECT_TRAY_STATE
) (
168 IN APPLE_REMOVABLE_MEDIA_PROTOCOL
* This
,
169 OUT BOOLEAN
* TrayOpen
174 Get the status of the drive tray.
177 This - Protocol instance pointer.
178 TrayOpen - Status of the drive tray.
181 EFI_SUCCESS - The status has been returned in TrayOpen.
187 // Protocol definition
189 struct _APPLE_REMOVABLE_MEDIA_PROTOCOL
{
191 BOOLEAN RemovalAllowed
;
192 APPLE_REMOVABLE_MEDIA_EJECT Eject
;
193 APPLE_REMOVABLE_MEDIA_INJECT Inject
;
194 APPLE_REMOVABLE_MEDIA_ALLOW_REMOVAL AllowRemoval
;
195 APPLE_REMOVABLE_MEDIA_PREVENT_REMOVAL PreventRemoval
;
196 APPLE_REMOVABLE_MEDIA_DETECT_TRAY_STATE DetectTrayState
;
200 //extern EFI_GUID gAppleRemovableMediaProtocolGuid;