2020-06-24 02:49:24 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2019-2020 PixlOne
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
#ifndef LOGID_DEVICE_H
|
|
|
|
#define LOGID_DEVICE_H
|
2019-07-28 06:08:18 +00:00
|
|
|
|
2020-06-20 01:58:33 +00:00
|
|
|
#include "backend/hidpp/defs.h"
|
|
|
|
#include "backend/hidpp20/Device.h"
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2019-10-05 01:56:17 +00:00
|
|
|
namespace logid
|
2019-07-17 05:53:51 +00:00
|
|
|
{
|
2020-06-20 01:58:33 +00:00
|
|
|
/* TODO: Implement HID++ 1.0 support
|
|
|
|
* Currently, the logid::Device class has a hardcoded requirement
|
|
|
|
* for an HID++ 2.0 device.
|
|
|
|
*/
|
2019-10-05 01:56:17 +00:00
|
|
|
class Device
|
|
|
|
{
|
|
|
|
public:
|
2020-06-20 01:58:33 +00:00
|
|
|
Device(std::string path, backend::hidpp::DeviceIndex index);
|
2020-06-21 09:33:33 +00:00
|
|
|
Device(const std::shared_ptr<backend::raw::RawDevice>& raw_device,
|
|
|
|
backend::hidpp::DeviceIndex index);
|
2020-06-20 01:58:33 +00:00
|
|
|
void wakeup();
|
|
|
|
void sleep();
|
|
|
|
private:
|
|
|
|
backend::hidpp20::Device _hidpp20;
|
|
|
|
std::string _path;
|
|
|
|
backend::hidpp::DeviceIndex _index;
|
2019-10-05 01:56:17 +00:00
|
|
|
};
|
|
|
|
}
|
2019-07-17 05:53:51 +00:00
|
|
|
|
2020-06-11 16:26:42 +00:00
|
|
|
#endif //LOGID_DEVICE_H
|