2017-12-06 03:20:59 +00:00
|
|
|
#define _CRT_SECURE_NO_WARNINGS 1 /* STFU MSVC */
|
2019-08-19 23:08:54 +00:00
|
|
|
|
|
|
|
#include "lib/inputdev/IHIDDevice.hpp"
|
|
|
|
|
2017-12-06 03:20:59 +00:00
|
|
|
#include "boo/inputdev/DeviceToken.hpp"
|
|
|
|
#include "boo/inputdev/DeviceBase.hpp"
|
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
namespace boo {
|
2017-12-06 03:20:59 +00:00
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
class HIDDeviceUWP : public IHIDDevice {
|
2017-12-06 03:20:59 +00:00
|
|
|
public:
|
2018-12-08 05:17:51 +00:00
|
|
|
HIDDeviceUWP(DeviceToken& token, const std::shared_ptr<DeviceBase>& devImp) {}
|
2017-12-06 03:20:59 +00:00
|
|
|
|
2019-08-16 07:05:00 +00:00
|
|
|
void _deviceDisconnected() override {}
|
|
|
|
bool _sendUSBInterruptTransfer(const uint8_t* data, size_t length) override { return false; }
|
|
|
|
size_t _receiveUSBInterruptTransfer(uint8_t* data, size_t length) override { return 0; }
|
|
|
|
bool _sendHIDReport(const uint8_t* data, size_t length, HIDReportType tp, uint32_t message) override { return false; }
|
|
|
|
size_t _receiveHIDReport(uint8_t* data, size_t length, HIDReportType tp, uint32_t message) override { return false; }
|
|
|
|
void _startThread() override {}
|
2017-12-06 03:20:59 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
std::shared_ptr<IHIDDevice> IHIDDeviceNew(DeviceToken& token, const std::shared_ptr<DeviceBase>& devImp) {
|
|
|
|
return std::make_shared<HIDDeviceUWP>(token, devImp);
|
2017-12-06 03:20:59 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 05:17:51 +00:00
|
|
|
} // namespace boo
|