1/* 2 * Copyright (c) 1998-2001 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 _IOKIT_IOFIREWIREIPUNIT_H 24#define _IOKIT_IOFIREWIREIPUNIT_H 25 26#include <IOKit/IOService.h> 27#include <IOKit/firewire/IOFireWireUnit.h> 28#include <IOKit/firewire/IOFWRegs.h> 29#include <IOKit/firewire/IOFWAddressSpace.h> 30#include "IOFireWireIP.h" 31#include "IOFWIPDefinitions.h" 32 33class IOFireWireNub; 34/*! 35 @class IOFireWireIPUnit 36 @abstract nub for IP devices 37*/ 38class IOFireWireIPUnit : public IOService 39{ 40 OSDeclareDefaultStructors(IOFireWireIPUnit) 41 42protected: 43 IOFireWireNub *fDevice; 44 IOFireWireIP *fIPLocalNode; 45 IOFWIPBusInterface *fFWBusInterface; 46 DRB *fDrb; 47 bool fStarted; 48 IONotifier *fTerminateNotifier; 49 50 51/*! @struct ExpansionData 52 @discussion This structure will be used to expand the capablilties of the class in the future. 53 */ 54 struct ExpansionData { }; 55 56/*! @var reserved 57 Reserved for future use. (Internal use only) */ 58 ExpansionData *reserved; 59 60 virtual void free(void); 61 62public: 63 // IOService overrides 64 virtual bool start(IOService *provider); 65 bool finalize(IOOptionBits options); 66 virtual IOReturn message(UInt32 type, IOService *provider, void *argument); 67 68/*! 69 @function updateDrb 70 @abstract Updates the device reference block in the FireWire IP unit 71*/ 72 void updateDrb(); 73 74 IOFireWireIP *getIPNode(IOFireWireController *control); 75 76 bool configureFWBusInterface(IOFireWireController *controller); 77 78 IOFWIPBusInterface *getIPTransmitInterface(IOFireWireIP *fIPLocalNode); 79 80 static bool busInterfaceTerminate(void *target, void *refCon, IOService *newService, IONotifier * notifier); 81 82private: 83 OSMetaClassDeclareReservedUnused(IOFireWireIPUnit, 0); 84 OSMetaClassDeclareReservedUnused(IOFireWireIPUnit, 1); 85 OSMetaClassDeclareReservedUnused(IOFireWireIPUnit, 2); 86 OSMetaClassDeclareReservedUnused(IOFireWireIPUnit, 3); 87 88}; 89 90#endif // _IOKIT_IOFIREWIREIPUNIT_H 91 92