Chameleon

Chameleon Svn Source Tree

Root/branches/mozodojo/i386/include/IOKit/usb/IOUSBRootHubDevice.h

1/*
2 * Copyright (c) 1998-2006 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef _IOKIT_IOUSBROOTHUBDEVICE_H
25#define _IOKIT_IOUSBROOTHUBDEVICE_H
26
27#include <IOKit/usb/IOUSBHubDevice.h>
28
29/*!
30 @class IOUSBRootHubDevice
31 @abstract The object representing the Root Hub simulation.
32 */
33class IOUSBRootHubDevice : public IOUSBHubDevice
34{
35 OSDeclareDefaultStructors(IOUSBRootHubDevice)
36
37private:
38 UInt16configuration;
39IOCommandGate*_commandGate;
40
41// private method which overrides the same method in IOUSBHubDevice
42virtual boolInitializeCharacteristics(void);// used at start
43
44 struct ExpansionData
45{
46IOService *_IOResourcesEntry;
47};
48 ExpansionData *_expansionData;
49
50public:
51// static methods
52 static IOUSBRootHubDevice*NewRootHubDevice(void);
53 static IOReturnGatedDeviceRequest (OSObject *owner,
54void *arg0,
55void *arg1,
56void *arg2,
57void *arg3 );
58
59// IOKit methods
60 virtual bool init();
61virtual bool start( IOService * provider );
62 virtual void stop( IOService *provider );
63 virtual voidfree();
64
65// IOUSBHubDevice methods
66virtual boolIsRootHub(void);
67virtual UInt32RequestExtraPower(UInt32 requestedPower);
68virtual voidReturnExtraPower(UInt32 returnedPower);
69
70//
71virtual UInt32RequestSleepPower(UInt32 requestedPower);
72virtual voidReturnSleepPower(UInt32 returnedPower);
73
74// a non static but non-virtual function
75IOReturn DeviceRequestWorker(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion);
76
77// IOUSBDevice methods overriden here
78 virtual IOReturn DeviceRequest(IOUSBDevRequest *request, IOUSBCompletion *completion = 0);
79 virtual IOReturn DeviceRequest(IOUSBDevRequest *request, UInt32 noDataTimeout, UInt32 completionTimeout, IOUSBCompletion *completion = 0);
80
81 OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 0);
82virtual IOReturnGetDeviceInformation(UInt32 *info);
83
84 OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 1);
85virtual voidInitializeExtraPower(UInt32 maxPortCurrent, UInt32 totalExtraCurrent);
86
87 OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 2);
88virtual voidSetSleepCurrent(UInt32 sleepCurrent);
89
90 OSMetaClassDeclareReservedUsed(IOUSBRootHubDevice, 3);
91virtual UInt32GetSleepCurrent();
92
93 OSMetaClassDeclareReservedUnused(IOUSBRootHubDevice, 4);
94};
95
96#endif /* _IOKIT_IOUSBROOTHUBDEVICE_H */
97
98

Archive Download this file

Revision: 1232