logiops/src/logid/Device.h

47 lines
1.4 KiB
C
Raw Normal View History

/*
* 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
2020-06-20 01:58:33 +00:00
#include "backend/hidpp/defs.h"
#include "backend/hidpp20/Device.h"
2019-10-05 01:56:17 +00:00
namespace logid
{
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);
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
};
}
#endif //LOGID_DEVICE_H