mirror of
https://github.com/monero-project/monero.git
synced 2025-05-17 11:20:25 -04:00
hw_device: support for multiple devices added [for review]
- device name is a new wallet property - full device name is now a bit more structured so we can address particular device vendor + device path. Example: 'Ledger', 'Trezor:udp', 'Trezor:udp:127.0.0.1:21324', 'Trezor:bridge:usb01'. The part before ':' identifies HW device implementation, the optional part after ':' is device path to look for. - new --hw-device parameter added to the wallet, can name the hardware device - device reconnect added
This commit is contained in:
parent
d743994086
commit
f9b22a7b01
8 changed files with 160 additions and 32 deletions
|
@ -202,6 +202,17 @@ namespace hw {
|
|||
~reset_mode() { hwref.set_mode(hw::device::NONE);}
|
||||
};
|
||||
|
||||
device& get_device(const std::string device_descriptor) ;
|
||||
class device_registry {
|
||||
private:
|
||||
std::map<std::string, std::unique_ptr<device>> registry;
|
||||
|
||||
public:
|
||||
device_registry();
|
||||
bool register_device(const std::string & device_name, device * hw_device);
|
||||
device& get_device(const std::string & device_descriptor);
|
||||
};
|
||||
|
||||
device& get_device(const std::string & device_descriptor);
|
||||
bool register_device(const std::string & device_name, device * hw_device);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue