aboutsummaryrefslogtreecommitdiff
path: root/src/device/device.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/device.hpp')
-rw-r--r--src/device/device.hpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/device/device.hpp b/src/device/device.hpp
index d14b8848c..cb9117650 100644
--- a/src/device/device.hpp
+++ b/src/device/device.hpp
@@ -48,11 +48,12 @@
#include "crypto/chacha.h"
#include "ringct/rctTypes.h"
+
#ifndef USE_DEVICE_LEDGER
#define USE_DEVICE_LEDGER 1
#endif
-#if !defined(HAVE_PCSC)
+#if !defined(HAVE_HIDAPI)
#undef USE_DEVICE_LEDGER
#define USE_DEVICE_LEDGER 0
#endif
@@ -78,7 +79,6 @@ namespace hw {
return false;
}
-
class device {
protected:
std::string name;
@@ -96,6 +96,12 @@ namespace hw {
TRANSACTION_CREATE_FAKE,
TRANSACTION_PARSE
};
+ enum device_type
+ {
+ SOFTWARE = 0,
+ LEDGER = 1
+ };
+
/* ======================================================================= */
/* SETUP/TEARDOWN */
@@ -109,7 +115,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;
/* ======================================================================= */