]>
git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/storage/IOMediaBSDClient.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@
23 #ifndef _IOMEDIABSDCLIENT_H
24 #define _IOMEDIABSDCLIENT_H
26 #include <IOKit/IOService.h>
40 class IOMediaBSDClient
: public IOService
42 OSDeclareDefaultStructors(IOMediaBSDClient
)
46 struct ExpansionData
{ /* */ };
47 ExpansionData
* _expansionData
;
49 AnchorTable
* _anchors
; /* (table of anchors) */
50 bool _bdevswInstalled
; /* (are bdevsw functions installed?) */
51 bool _cdevswInstalled
; /* (are cdevsw functions installed?) */
52 MinorTable
* _minors
; /* (table of minors) */
53 IONotifier
* _notifier
; /* (media arrival notification) */
56 * Notification handler for media arrivals.
59 static bool mediaHasArrived(void *, void *, IOService
* service
);
62 * Find the whole media that roots this media tree.
65 virtual IOMedia
* getWholeMedia( IOMedia
* media
,
66 UInt32
* slicePathSize
= 0,
67 char * slicePath
= 0 );
70 * Create bdevsw and cdevsw nodes for the given media object.
73 virtual bool createNodes(IOMedia
* media
);
76 * Free all of this object's outstanding resources.
83 * Initialize this object's minimal state.
86 virtual bool init(OSDictionary
* properties
= 0);
89 * This method is called once we have been attached to the provider object.
92 virtual bool start(IOService
* provider
);
95 * This method is called before we are detached from the provider object.
98 virtual void stop(IOService
* provider
);
101 * Obtain the table of anchors.
104 virtual AnchorTable
* getAnchors();
107 * Obtain the table of minors.
110 virtual MinorTable
* getMinors();
113 * Obtain information for the specified minor ID.
116 virtual MinorSlot
* getMinor(UInt32 minorID
);
118 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 0);
119 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 1);
120 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 2);
121 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 3);
122 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 4);
123 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 5);
124 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 6);
125 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 7);
126 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 8);
127 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 9);
128 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 10);
129 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 11);
130 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 12);
131 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 13);
132 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 14);
133 OSMetaClassDeclareReservedUnused(IOMediaBSDClient
, 15);
136 #endif /* !_IOMEDIABSDCLIENT_H */