Merge pull request #4839

d71f89e2 device/trezor: device/trezor: correct device initialization, status check (Dusan Klinec)
65b9bca7 device/trezor: python2 compatibility - bundle dependencies (Dusan Klinec)
9cf636af device/trezor: ask for KI sync on first refresh (Dusan Klinec)
d21dad70 device: enable to use multiple independent device wallets (Dusan Klinec)
318cc784 device/trezor: passphrase entry on host (Dusan Klinec)
This commit is contained in:
Riccardo Spagni 2018-12-12 11:53:42 +02:00
commit 0b31baf6e4
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
17 changed files with 653 additions and 73 deletions

View file

@ -80,6 +80,14 @@ namespace hw {
return false;
}
class i_device_callback {
public:
virtual void on_button_request() {}
virtual void on_pin_request(epee::wipeable_string & pin) {}
virtual void on_passphrase_request(bool on_device, epee::wipeable_string & passphrase) {}
virtual ~i_device_callback() = default;
};
class device {
protected:
std::string name;
@ -129,6 +137,8 @@ namespace hw {
virtual device_type get_type() const = 0;
virtual device_protocol_t device_protocol() const { return PROTOCOL_DEFAULT; };
virtual void set_callback(i_device_callback * callback) {};
virtual void set_derivation_path(const std::string &derivation_path) {};
/* ======================================================================= */
/* LOCKER */