Chameleon

Chameleon Svn Source Tree

Root/branches/Chimera/i386/include/IOKit/usb/IOUSBUserClient.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_IOUSBUSERCLIENT_H
25#define _IOKIT_IOUSBUSERCLIENT_H
26
27// these are the new User Client method names
28enum {
29 kUSBDeviceUserClientOpen,
30 kUSBDeviceUserClientClose,
31 kUSBDeviceUserClientSetConfig,
32 kUSBDeviceUserClientGetConfig,
33 kUSBDeviceUserClientGetConfigDescriptor,
34 kUSBDeviceUserClientGetFrameNumber,
35 kUSBDeviceUserClientDeviceRequestOut,
36 kUSBDeviceUserClientDeviceRequestIn,
37 kUSBDeviceUserClientCreateInterfaceIterator,
38 kUSBDeviceUserClientResetDevice,
39 kUSBDeviceUserClientSuspend,
40 kUSBDeviceUserClientAbortPipeZero,
41 kUSBDeviceUserClientReEnumerateDevice,
42 kUSBDeviceUserClientGetMicroFrameNumber,
43 kUSBDeviceUserClientGetFrameNumberWithTime,
44 kUSBDeviceUserClientSetAsyncPort,
45kUSBDeviceUserClientGetDeviceInformation,
46kUSBDeviceUserClientRequestExtraPower,
47kUSBDeviceUserClientReturnExtraPower,
48kUSBDeviceUserClientGetExtraPowerAllocated,
49 kIOUSBLibDeviceUserClientNumCommands
50 };
51
52enum {
53 kUSBInterfaceUserClientOpen,
54 kUSBInterfaceUserClientClose,
55 kUSBInterfaceUserClientGetDevice,
56 kUSBInterfaceUserClientSetAlternateInterface,
57 kUSBInterfaceUserClientGetFrameNumber,
58 kUSBInterfaceUserClientGetPipeProperties,
59 kUSBInterfaceUserClientReadPipe,
60 kUSBInterfaceUserClientWritePipe,
61 kUSBInterfaceUserClientGetPipeStatus,
62 kUSBInterfaceUserClientAbortPipe,
63 kUSBInterfaceUserClientResetPipe,
64 kUSBInterfaceUserClientClearPipeStall,
65 kUSBInterfaceUserClientControlRequestOut,
66 kUSBInterfaceUserClientControlRequestIn,
67 kUSBInterfaceUserClientSetPipePolicy,
68 kUSBInterfaceUserClientGetBandwidthAvailable,
69 kUSBInterfaceUserClientGetEndpointProperties,
70 kUSBInterfaceUserClientLowLatencyPrepareBuffer,
71 kUSBInterfaceUserClientLowLatencyReleaseBuffer,
72 kUSBInterfaceUserClientGetMicroFrameNumber,
73 kUSBInterfaceUserClientGetFrameListTime,
74 kUSBInterfaceUserClientGetFrameNumberWithTime,
75 kUSBInterfaceUserClientSetAsyncPort,
76 kUSBInterfaceUserClientReadIsochPipe,
77 kUSBInterfaceUserClientWriteIsochPipe,
78 kUSBInterfaceUserClientLowLatencyReadIsochPipe,
79 kUSBInterfaceUserClientLowLatencyWriteIsochPipe,
80kUSBInterfaceUserClientGetConfigDescriptor,
81 kIOUSBLibInterfaceUserClientNumCommands
82 };
83
84
85#if KERNEL
86#include <IOKit/IOService.h>
87#include <IOKit/IOUserClient.h>
88#include <IOKit/usb/USB.h>
89
90//================================================================================================
91//
92// Structure declarations
93//
94//================================================================================================
95//
96typedef struct IOUSBUserClientAsyncParamBlock IOUSBUserClientAsyncParamBlock;
97
98struct IOUSBUserClientAsyncParamBlock
99{
100 OSAsyncReference64fAsyncRef;
101 uint32_tfAsyncCount;
102 uint32_tfMax;
103 IOMemoryDescriptor *fMem;
104 IOUSBDevRequestDescreq;
105};
106
107typedef struct IOUSBInterfaceUserClientISOAsyncParamBlock IOUSBInterfaceUserClientISOAsyncParamBlock;
108struct IOUSBInterfaceUserClientISOAsyncParamBlock
109{
110 OSAsyncReference64fAsyncRef;
111uint32_tfAsyncCount;
112 mach_vm_size_tframeLen;// In bytes
113 mach_vm_address_t frameBase;// In user task
114 IOMemoryDescriptor * dataMem;
115 IOMemoryDescriptor * countMem;
116uint64_tnumFrames;
117 IOUSBIsocFrame frames[0]; // Must be the last one
118};
119
120
121//================================================================================================
122//
123// This class is used to add an IOProviderMergeProperties dictionary entry to a provider's
124// property list, thus providing a tie between hardware and a CFBundle at hardware
125// load time. This property usually contains the user client class name and the CFPlugInTypes UUID's
126// but it can contain other properties.
127//
128//================================================================================================
129//
130class IOUSBUserClientInit : public IOService
131{
132 OSDeclareDefaultStructors(IOUSBUserClientInit);
133
134public:
135
136 virtual boolstart(IOService * provider) ;
137 virtual bool MergeDictionaryIntoProvider(IOService * provider, OSDictionary * mergeDict);
138 virtual boolMergeDictionaryIntoDictionary(OSDictionary * sourceDictionary, OSDictionary * targetDictionary);
139};
140
141#endif // KERNEL
142
143#endif /* ! _IOKIT_IOUSBUSERCLIENT_H */
144
145

Archive Download this file

Revision: 2225