#ifndef _IOKIT_IOUSBUSERCLIENT_H
#define _IOKIT_IOUSBUSERCLIENT_H
enum {
kUSBDeviceUserClientOpen,
kUSBDeviceUserClientClose,
kUSBDeviceUserClientSetConfig,
kUSBDeviceUserClientGetConfig,
kUSBDeviceUserClientGetConfigDescriptor,
kUSBDeviceUserClientGetFrameNumber,
kUSBDeviceUserClientDeviceRequestOut,
kUSBDeviceUserClientDeviceRequestIn,
kUSBDeviceUserClientCreateInterfaceIterator,
kUSBDeviceUserClientResetDevice,
kUSBDeviceUserClientSuspend,
kUSBDeviceUserClientAbortPipeZero,
kUSBDeviceUserClientReEnumerateDevice,
kUSBDeviceUserClientGetMicroFrameNumber,
kUSBDeviceUserClientGetFrameNumberWithTime,
kUSBDeviceUserClientSetAsyncPort,
kUSBDeviceUserClientGetDeviceInformation,
kUSBDeviceUserClientRequestExtraPower,
kUSBDeviceUserClientReturnExtraPower,
kUSBDeviceUserClientGetExtraPowerAllocated,
kIOUSBLibDeviceUserClientNumCommands
};
enum {
kUSBInterfaceUserClientOpen,
kUSBInterfaceUserClientClose,
kUSBInterfaceUserClientGetDevice,
kUSBInterfaceUserClientSetAlternateInterface,
kUSBInterfaceUserClientGetFrameNumber,
kUSBInterfaceUserClientGetPipeProperties,
kUSBInterfaceUserClientReadPipe,
kUSBInterfaceUserClientWritePipe,
kUSBInterfaceUserClientGetPipeStatus,
kUSBInterfaceUserClientAbortPipe,
kUSBInterfaceUserClientResetPipe,
kUSBInterfaceUserClientClearPipeStall,
kUSBInterfaceUserClientControlRequestOut,
kUSBInterfaceUserClientControlRequestIn,
kUSBInterfaceUserClientSetPipePolicy,
kUSBInterfaceUserClientGetBandwidthAvailable,
kUSBInterfaceUserClientGetEndpointProperties,
kUSBInterfaceUserClientLowLatencyPrepareBuffer,
kUSBInterfaceUserClientLowLatencyReleaseBuffer,
kUSBInterfaceUserClientGetMicroFrameNumber,
kUSBInterfaceUserClientGetFrameListTime,
kUSBInterfaceUserClientGetFrameNumberWithTime,
kUSBInterfaceUserClientSetAsyncPort,
kUSBInterfaceUserClientReadIsochPipe,
kUSBInterfaceUserClientWriteIsochPipe,
kUSBInterfaceUserClientLowLatencyReadIsochPipe,
kUSBInterfaceUserClientLowLatencyWriteIsochPipe,
kUSBInterfaceUserClientGetConfigDescriptor,
kIOUSBLibInterfaceUserClientNumCommands
};
#if KERNEL
#include <IOKit/IOService.h>
#include <IOKit/IOUserClient.h>
#include <IOKit/usb/USB.h>
typedef struct IOUSBUserClientAsyncParamBlock IOUSBUserClientAsyncParamBlock;
struct IOUSBUserClientAsyncParamBlock
{
OSAsyncReference64 fAsyncRef;
uint32_t fAsyncCount;
uint32_t fMax;
IOMemoryDescriptor * fMem;
IOUSBDevRequestDesc req;
};
typedef struct IOUSBInterfaceUserClientISOAsyncParamBlock IOUSBInterfaceUserClientISOAsyncParamBlock;
struct IOUSBInterfaceUserClientISOAsyncParamBlock
{
OSAsyncReference64 fAsyncRef;
uint32_t fAsyncCount;
mach_vm_size_t frameLen; mach_vm_address_t frameBase; IOMemoryDescriptor * dataMem;
IOMemoryDescriptor * countMem;
uint64_t numFrames;
IOUSBIsocFrame frames[0]; };
class IOUSBUserClientInit : public IOService
{
OSDeclareDefaultStructors(IOUSBUserClientInit);
public:
virtual bool start(IOService * provider) ;
virtual bool MergeDictionaryIntoProvider(IOService * provider, OSDictionary * mergeDict);
virtual bool MergeDictionaryIntoDictionary(OSDictionary * sourceDictionary, OSDictionary * targetDictionary);
};
#endif // KERNEL
#endif