| 24 | #include <IOKit/hid/IOHIDDevice.h> |
| 25 | |
| 26 | class Xbox360ControllerClass : public IOHIDDevice |
| 27 | { |
| 28 | OSDeclareDefaultStructors(Xbox360ControllerClass) |
| 29 | |
| 30 | private: |
| 31 | bool pretend360; |
| 32 | |
| 33 | private: |
| 34 | OSString* getDeviceString(UInt8 index,const char *def=NULL) const; |
| 35 | |
| 36 | public: |
| 37 | virtual bool start(IOService *provider); |
| 38 | |
| 39 | virtual IOReturn setProperties(OSObject *properties); |
| 40 | |
| 41 | virtual IOReturn newReportDescriptor(IOMemoryDescriptor **descriptor) const; |
| 42 | |
| 43 | virtual IOReturn setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options=0); |
| 44 | virtual IOReturn getReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options); |
| 45 | virtual IOReturn handleReport( |
| 46 | IOMemoryDescriptor * report, |
| 47 | IOHIDReportType reportType = kIOHIDReportTypeInput, |
| 48 | IOOptionBits options = 0 ); |
| 49 | |
| 50 | virtual OSString* newManufacturerString() const; |
| 51 | virtual OSNumber* newPrimaryUsageNumber() const; |
| 52 | virtual OSNumber* newPrimaryUsagePageNumber() const; |
| 53 | virtual OSNumber* newProductIDNumber() const; |
| 54 | virtual OSString* newProductString() const; |
| 55 | virtual OSString* newSerialNumberString() const; |
| 56 | virtual OSString* newTransportString() const; |
| 57 | virtual OSNumber* newVendorIDNumber() const; |
| 58 | |
| 59 | virtual OSNumber* newLocationIDNumber() const; |
| 60 | |
| 61 | virtual void remapButtons(void *buffer); |
| 62 | virtual void remapAxes(void *buffer); |
| 63 | }; |
| 64 | |
| 65 | |
| 66 | class Xbox360Pretend360Class : public Xbox360ControllerClass |
nothing calls this directly
no outgoing calls
no test coverage detected