Split Configuration into several classes

Each feature should handle its own configuration.
This commit is contained in:
pixl
2020-07-02 00:38:40 -04:00
parent 181be50f88
commit f6b93b94af
9 changed files with 154 additions and 519 deletions

View File

@@ -180,6 +180,16 @@ Report Device::sendReport(Report& report)
return response;
}
std::string Device::name() const
{
return _name;
}
uint16_t Device::pid() const
{
return _pid;
}
void Device::listen()
{
if(!_raw_device->isListening())

View File

@@ -72,6 +72,9 @@ namespace hidpp
DeviceIndex deviceIndex() const;
std::tuple<uint8_t, uint8_t> version() const;
std::string name() const;
uint16_t pid() const;
void listen(); // Runs asynchronously
void stopListening();