#ifndef _IOKIT_HID_IOHIDINTERFACE_H
#define _IOKIT_HID_IOHIDINTERFACE_H
#include <IOKit/IOService.h>
#include <IOKit/hid/IOHIDKeys.h>
class IOHIDDevice;
class IOHIDInterface: public IOService
{
OSDeclareDefaultStructors( IOHIDInterface )
public:
typedef void (*InterruptReportAction)(
OSObject * target,
AbsoluteTime timestamp,
IOMemoryDescriptor * report,
IOHIDReportType type,
UInt32 reportID,
void * refcon);
typedef void (*CompletionAction)(
OSObject * target,
void * refcon,
IOReturn status,
UInt32 bufferSizeRemaining);
private:
IOHIDDevice * _owner;
OSArray * _elementArray;
InterruptReportAction _interruptAction;
void * _interruptRefCon;
OSObject * _interruptTarget;
OSString * _transportString;
OSString * _manufacturerString;
OSString * _productString;
OSString * _serialNumberString;
UInt32 _locationID;
UInt32 _vendorID;
UInt32 _vendorIDSource;
UInt32 _productID;
UInt32 _version;
UInt32 _countryCode;
IOByteCount _maxReportSize[kIOHIDReportTypeCount];
struct ExpansionData {
UInt32 reportInterval;
};
ExpansionData * _reserved;
protected:
virtual void free();
public:
static IOHIDInterface * withElements ( OSArray * elements );
virtual bool init( OSDictionary * dictionary = 0 );
virtual bool start( IOService * provider );
virtual bool matchPropertyTable(
OSDictionary * table,
SInt32 * score);
virtual bool open (
IOService * client,
IOOptionBits options,
InterruptReportAction action,
void * refCon);
virtual void close(
IOService * client,
IOOptionBits options = 0 );
virtual OSString * getTransport ();
virtual UInt32 getLocationID ();
virtual UInt32 getVendorID ();
virtual UInt32 getVendorIDSource ();
virtual UInt32 getProductID ();
virtual UInt32 getVersion ();
virtual UInt32 getCountryCode ();
virtual OSString * getManufacturer ();
virtual OSString * getProduct ();
virtual OSString * getSerialNumber ();
virtual IOByteCount getMaxReportSize (IOHIDReportType type);
virtual OSArray * createMatchingElements (
OSDictionary * matching = 0,
IOOptionBits options = 0);
virtual void handleReport (
AbsoluteTime timeStamp,
IOMemoryDescriptor * report,
IOHIDReportType reportType,
UInt32 reportID,
IOOptionBits options = 0);
virtual IOReturn setReport (
IOMemoryDescriptor * report,
IOHIDReportType reportType,
UInt32 reportID = 0,
IOOptionBits options = 0);
virtual IOReturn getReport (
IOMemoryDescriptor * report,
IOHIDReportType reportType,
UInt32 reportID = 0,
IOOptionBits options = 0);
virtual IOReturn setReport (
IOMemoryDescriptor * report,
IOHIDReportType reportType,
UInt32 reportID = 0,
IOOptionBits options = 0,
UInt32 completionTimeout = 0,
CompletionAction * completion = 0);
virtual IOReturn getReport (
IOMemoryDescriptor * report,
IOHIDReportType reportType,
UInt32 reportID = 0,
IOOptionBits options = 0,
UInt32 completionTimeout = 0,
CompletionAction * completion = 0);
OSMetaClassDeclareReservedUsed(IOHIDInterface, 0);
virtual UInt32 getReportInterval ();
OSMetaClassDeclareReservedUnused(IOHIDInterface, 1);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 2);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 3);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 4);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 5);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 6);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 7);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 8);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 9);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 10);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 11);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 12);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 13);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 14);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 15);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 16);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 17);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 18);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 19);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 20);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 21);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 22);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 23);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 24);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 25);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 26);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 27);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 28);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 29);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 30);
OSMetaClassDeclareReservedUnused(IOHIDInterface, 31);
};
#endif