mirror of
https://github.com/monero-project/monero.git
synced 2025-11-30 05:06:41 -05:00
query backing device
This commit is contained in:
parent
bad2c7cf31
commit
bce474be7d
10 changed files with 123 additions and 17 deletions
|
|
@ -78,7 +78,6 @@ namespace hw {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
class device {
|
||||
protected:
|
||||
std::string name;
|
||||
|
|
@ -96,6 +95,12 @@ namespace hw {
|
|||
TRANSACTION_CREATE_FAKE,
|
||||
TRANSACTION_PARSE
|
||||
};
|
||||
enum device_type
|
||||
{
|
||||
SOFTWARE = 0,
|
||||
LEDGER = 1
|
||||
};
|
||||
|
||||
|
||||
/* ======================================================================= */
|
||||
/* SETUP/TEARDOWN */
|
||||
|
|
@ -109,7 +114,9 @@ namespace hw {
|
|||
virtual bool connect(void) = 0;
|
||||
virtual bool disconnect(void) = 0;
|
||||
|
||||
virtual bool set_mode(device_mode mode) = 0;
|
||||
virtual bool set_mode(device_mode mode) = 0;
|
||||
|
||||
virtual device_type get_type() const = 0;
|
||||
|
||||
|
||||
/* ======================================================================= */
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ namespace hw {
|
|||
|
||||
bool set_mode(device_mode mode) override;
|
||||
|
||||
device_type get_type() const {return device_type::SOFTWARE;};
|
||||
|
||||
/* ======================================================================= */
|
||||
/* LOCKER */
|
||||
/* ======================================================================= */
|
||||
|
|
|
|||
|
|
@ -142,7 +142,9 @@ namespace hw {
|
|||
bool connect(void) override;
|
||||
bool disconnect() override;
|
||||
|
||||
bool set_mode(device_mode mode) override;
|
||||
bool set_mode(device_mode mode) override;
|
||||
|
||||
device_type get_type() const {return device_type::LEDGER;};
|
||||
|
||||
/* ======================================================================= */
|
||||
/* LOCKER */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue