Annotation of XNU/iokit/IOKit/storage/IOMediaBSDClient.h, revision 1.1.1.1

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: 
                     23: #ifndef _IOMEDIABSDCLIENT_H
                     24: #define _IOMEDIABSDCLIENT_H
                     25: 
                     26: #include <IOKit/IOService.h>
                     27: 
                     28: /*
                     29:  * Definitions
                     30:  */
                     31: 
                     32: class  AnchorTable;
                     33: class  MinorTable;
                     34: struct MinorSlot;
                     35: 
                     36: /*
                     37:  * Class
                     38:  */
                     39: 
                     40: class IOMediaBSDClient : public IOService
                     41: {
                     42:     OSDeclareDefaultStructors(IOMediaBSDClient)
                     43: 
                     44: protected:
                     45:     AnchorTable * _anchors;              /* (table of anchors)                */
                     46:     bool          _bdevswInstalled;      /* (are bdevsw functions installed?) */
                     47:     bool          _cdevswInstalled;      /* (are cdevsw functions installed?) */
                     48:     MinorTable *  _minors;               /* (table of minors)                 */
                     49:     IONotifier *  _notifier;             /* (media arrival notification)      */
                     50: 
                     51:     /*
                     52:      * Notification handler for media arrivals.
                     53:      */
                     54: 
                     55:     static bool mediaHasArrived(void *, void *, IOService * service);
                     56: 
                     57:     /*
                     58:      * Find the whole media that roots this media tree.
                     59:      */
                     60: 
                     61:     virtual IOMedia * getWholeMedia( IOMedia * media,
                     62:                                      UInt32 *  slicePathSize = 0,
                     63:                                      char *    slicePath     = 0 );
                     64: 
                     65:     /*
                     66:      * Create bdevsw and cdevsw nodes for the given media object.
                     67:      */
                     68: 
                     69:     virtual bool createNodes(IOMedia * media);
                     70: 
                     71:     /*
                     72:      * Free all of this object's outstanding resources.
                     73:      */
                     74: 
                     75:     virtual void free();
                     76: 
                     77: public:
                     78:     /*
                     79:      * Initialize this object's minimal state.
                     80:      */
                     81: 
                     82:     virtual bool init(OSDictionary * properties  = 0);
                     83: 
                     84:     /*
                     85:      * This method is called once we have been attached to the provider object.
                     86:      */
                     87: 
                     88:     virtual bool start(IOService * provider);
                     89: 
                     90:     /*
                     91:      * This method is called before we are detached from the provider object.
                     92:      */
                     93: 
                     94:     virtual void stop(IOService * provider);
                     95: 
                     96:     /*
                     97:      * Obtain the table of anchors.
                     98:      */
                     99: 
                    100:     virtual AnchorTable * getAnchors();
                    101: 
                    102:     /*
                    103:      * Obtain the table of minors.
                    104:      */
                    105: 
                    106:     virtual MinorTable * getMinors();
                    107: 
                    108:     /*
                    109:      * Obtain information for the specified minor ID.
                    110:      */
                    111: 
                    112:     virtual MinorSlot * getMinor(UInt32 minorID);
                    113: };
                    114: 
                    115: #endif /* !_IOMEDIABSDCLIENT_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.