Root/
Source at commit 1460 created 12 years 10 months ago. By azimutz, rsync contents of the theme's folder, not the folder it self. | |
---|---|
1 | /*␊ |
2 | *␊ |
3 | * @APPLE_LICENSE_HEADER_START@␊ |
4 | * ␊ |
5 | * Copyright (c) 1998-2006 Apple Computer, Inc. All Rights Reserved.␊ |
6 | * ␊ |
7 | * This file contains Original Code and/or Modifications of Original Code␊ |
8 | * as defined in and that are subject to the Apple Public Source License␊ |
9 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
10 | * compliance with the License. Please obtain a copy of the License at␊ |
11 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
12 | * file.␊ |
13 | * ␊ |
14 | * The Original Code and all software distributed under the License are␊ |
15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
19 | * Please see the License for the specific language governing rights and␊ |
20 | * limitations under the License.␊ |
21 | * ␊ |
22 | * @APPLE_LICENSE_HEADER_END@␊ |
23 | */␊ |
24 | ␊ |
25 | #ifndef _IOKIT_IOUSBCompositeDriver_H␊ |
26 | #define _IOKIT_IOUSBCompositeDriver_H␊ |
27 | ␊ |
28 | //================================================================================================␊ |
29 | //␊ |
30 | // Headers␊ |
31 | //␊ |
32 | //================================================================================================␊ |
33 | //␊ |
34 | #include <libkern/OSByteOrder.h>␊ |
35 | #include <IOKit/IOLib.h>␊ |
36 | #include <IOKit/IONotifier.h>␊ |
37 | #include <IOKit/IOService.h>␊ |
38 | #include <IOKit/IOMessage.h>␊ |
39 | #include <IOKit/usb/IOUSBBus.h>␊ |
40 | #include <IOKit/usb/IOUSBDevice.h>␊ |
41 | #include <IOKit/usb/IOUSBInterface.h>␊ |
42 | #include <IOKit/usb/IOUSBLog.h>␊ |
43 | #include <IOKit/usb/USB.h>␊ |
44 | ␊ |
45 | ␊ |
46 | //================================================================================================␊ |
47 | //␊ |
48 | // Class Declaration for IOUSBCompositeDriver␊ |
49 | //␊ |
50 | //================================================================================================␊ |
51 | //␊ |
52 | /*!␊ |
53 | @class IOUSBCompositeDriver␊ |
54 | @abstract Driver that matches to USB composite devices.␊ |
55 | @discussion This class can be overriden to provide for specific behaviors. The driver itself essentially␊ |
56 | just calls SetConfiguration().␊ |
57 | */␊ |
58 | class IOUSBCompositeDriver : public IOService␊ |
59 | {␊ |
60 | OSDeclareDefaultStructors(IOUSBCompositeDriver)␊ |
61 | ␊ |
62 | IOUSBDevice␉* ␉fDevice;␊ |
63 | IONotifier * ␉fNotifier;␊ |
64 | bool␉␉fExpectingClose;␊ |
65 | UInt8 fConfigValue;␊ |
66 | UInt8 fConfigbmAttributes;␊ |
67 | ␊ |
68 | struct IOUSBCompositeDriverExpansionData ␊ |
69 | {␊ |
70 | };␊ |
71 | ␊ |
72 | IOUSBCompositeDriverExpansionData * fIOUSBCompositeExpansionData;␊ |
73 | ␊ |
74 | static IOReturn CompositeDriverInterestHandler( void * target, void * refCon, UInt32 messageType, IOService * provider, void * messageArgument, vm_size_t argSize );␊ |
75 | ␊ |
76 | public:␊ |
77 | ␊ |
78 | ␉␉// IOService Methods␊ |
79 | ␉␉//␊ |
80 | ␉␉virtual bool start(IOService * provider);␊ |
81 | virtual IOReturn message( UInt32 type, IOService * provider, void * argument = 0 );␊ |
82 | virtual bool willTerminate( IOService * provider, IOOptionBits options );␊ |
83 | virtual bool didTerminate( IOService * provider, IOOptionBits options, bool * defer );␊ |
84 | ␊ |
85 | // IOUSBCompositeDriver Methods␊ |
86 | //␊ |
87 | virtual bool ConfigureDevice();␊ |
88 | virtual IOReturn ReConfigureDevice();␊ |
89 | /*!␊ |
90 | ␉␉@function SetConfiguration␊ |
91 | @abstract Call IOUSBDevice to do a SetConfiguration call to the device.␊ |
92 | @param configValue The desired configuration value.␊ |
93 | @param startInterfaceMatching A boolean specifying whether IOKit should begin the process of finding␊ |
94 | matching drivers for the new IOUSBInterface objects.␊ |
95 | */␊ |
96 | virtual IOReturn SetConfiguration(UInt8 configValue, bool startInterfaceMatching=true);␊ |
97 | ␊ |
98 | // Getters␊ |
99 | //␊ |
100 | bool GetExpectingClose() { return fExpectingClose; }␊ |
101 | UInt8 GetConfigValue() { return fConfigValue; }␊ |
102 | UInt8 GetConfigbmAttributes() { return fConfigbmAttributes; }␊ |
103 | IONotifier * GetNotifier() { return fNotifier; }␊ |
104 | ␉␊ |
105 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 0);␊ |
106 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 1);␊ |
107 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 2);␊ |
108 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 3);␊ |
109 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 4);␊ |
110 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 5);␊ |
111 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 6);␊ |
112 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 7);␊ |
113 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 8);␊ |
114 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 9);␊ |
115 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 10);␊ |
116 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 11);␊ |
117 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 12);␊ |
118 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 13);␊ |
119 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 14);␊ |
120 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 15);␊ |
121 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 16);␊ |
122 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 17);␊ |
123 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 18);␊ |
124 | OSMetaClassDeclareReservedUnused(IOUSBCompositeDriver, 19);␊ |
125 | };␊ |
126 | ␊ |
127 | #endif _IOKIT_IOUSBCompositeDriver_H␊ |
128 |