#ifndef org_pqrs_Karabiner_DriverKit_VirtualHIDKeyboard_h
#define org_pqrs_Karabiner_DriverKit_VirtualHIDKeyboard_h

#include <Availability.h>
#include <DriverKit/IOService.iig>
#include <HIDDriverKit/IOUserHIDDevice.iig>

class org_pqrs_Karabiner_DriverKit_VirtualHIDKeyboard: public IOUserHIDDevice
{
public:
    virtual bool init() override;
    virtual void free() override;

    // We must not override IOUserHIDDevice::Start directly.
    // (See the reference document of IOUserHIDDevice::Start.)

    virtual bool handleStart(IOService* provider) override;
    virtual kern_return_t Stop(IOService* provider) override;

    virtual OSDictionary* newDeviceDescription(void) override;
    virtual OSData* newReportDescriptor(void) override;
    virtual kern_return_t setReport(IOMemoryDescriptor* report,
                                    IOHIDReportType reportType,
                                    IOOptionBits options,
                                    uint32_t completionTimeout,
                                    OSAction* action);

    virtual kern_return_t postReport(IOMemoryDescriptor* report);
    virtual kern_return_t reset(void);

    virtual bool getReady(void);
};

#endif
