IOUSBRootHubDevice.h [plain text]
#ifndef _IOKIT_IOUSBROOTHUBDEVICE_H
#define _IOKIT_IOUSBROOTHUBDEVICE_H
#include <IOKit/usb/IOUSBHubDevice.h>
typedef struct
{
UInt32 request;
void *data;
}RHCommandHeader;
typedef RHCommandHeader* RHCommandHeaderPtr;
class IOUSBRootHubDevice : public IOUSBHubDevice
{
OSDeclareDefaultStructors(IOUSBRootHubDevice)
private:
UInt16 configuration;
IOCommandGate *_commandGate;
virtual bool InitializeCharacteristics(void);
struct ExpansionData
{
IOService * X_IOResourcesEntry; UInt8 _myControllerSpeed;
bool _builtInController; bool _hasBuiltInProperty;
bool _hasTunnelledProperty;
};
ExpansionData *_expansionData;
public:
static IOUSBRootHubDevice *NewRootHubDevice(void);
static IOReturn GatedDeviceRequest (OSObject * owner,
void * arg0,
void * arg1,
void * arg2,
void * arg3 );
virtual bool init();
virtual bool start( IOService * provider );
virtual void stop( IOService *provider );
virtual void free();
virtual bool IsRootHub(void);
virtual UInt32 RequestSleepPower(UInt32 requestedPower);
virtual void ReturnSleepPower(UInt32 returnedPower);
IOReturn DeviceRequestWorker(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion);
UInt32 RequestExtraWakePower(UInt32 wakeType, UInt32 requestedPower, bool *retry);
void ReturnExtraWakePower(UInt32 wakeType, UInt32 requestedPower);
virtual UInt32 RequestExtraPower(UInt32 type, UInt32 requestedPower);
virtual IOReturn ReturnExtraPower(UInt32 type, UInt32 returnedPower);
virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0);
virtual IOReturn DeviceRequest(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion = 0);
OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 0);
virtual IOReturn GetDeviceInformation(UInt32 *info);
OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 1);
virtual void InitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent);
OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 2);
virtual void SetSleepCurrent(UInt32 sleepCurrent);
OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 3);
virtual UInt32 GetSleepCurrent();
OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 4);
virtual void SendExtraPowerMessage(UInt32 type, UInt32 returnedPower);
};
#endif