Implement open() and close() for Usb class, added a lot of TODO's
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#include "IUsb.hpp"
|
||||
#include "UsbTypes.hpp"
|
||||
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace ptprnt::driver {
|
||||
@@ -13,9 +11,12 @@ class Usb : public IUsb {
|
||||
~Usb() override;
|
||||
|
||||
std::optional<std::vector<UsbDevice>> getDevices() override;
|
||||
std::optional<UsbDevice> open(UsbDevice) override;
|
||||
bool close(UsbDevice) override;
|
||||
|
||||
private:
|
||||
// TODO: This should be a std::map with handles & locking on access
|
||||
std::vector<UsbDevice> mDevices{};
|
||||
};
|
||||
|
||||
} // namespace ptprnt::driver
|
||||
} // namespace ptprnt::driver
|
||||
|
Reference in New Issue
Block a user