Add interface for device features in logid::Device

This commit is contained in:
pixl 2020-06-24 02:05:05 -04:00
parent 1d001237ba
commit 152b9e6cfd
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E
2 changed files with 17 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "backend/hidpp/defs.h" #include "backend/hidpp/defs.h"
#include "backend/hidpp20/Device.h" #include "backend/hidpp20/Device.h"
#include "features/DeviceFeature.h"
namespace logid namespace logid
{ {
@ -40,6 +41,7 @@ namespace logid
backend::hidpp20::Device _hidpp20; backend::hidpp20::Device _hidpp20;
std::string _path; std::string _path;
backend::hidpp::DeviceIndex _index; backend::hidpp::DeviceIndex _index;
std::vector<std::shared_ptr<features::DeviceFeature>> _features;
}; };
} }

View File

@ -0,0 +1,15 @@
#ifndef LOGID_FEATURES_DEVICEFEATURE_H
#define LOGID_FEATURES_DEVICEFEATURE_H
namespace logid {
namespace features
{
class DeviceFeature
{
public:
virtual void configure() = 0;
virtual void listen() = 0;
};
}}
#endif //LOGID_FEATURES_DEVICEFEATURE_H