summaryrefslogtreecommitdiff
path: root/include/command.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 17:18:59 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-03-11 17:18:59 +0100
commit22d05ce647281056d71fbd3c31df3bcd6396188d (patch)
tree90208930f54c47987bfd5ffcf0a0acaaad2510da /include/command.h
parented5044da43172d86a1aa475473561a4818b7c69c (diff)
parentac6b9c18ef55f4cd36e85069cf0cf82c14e04404 (diff)
downloadlibnitrokey-22d05ce647281056d71fbd3c31df3bcd6396188d.tar.gz
libnitrokey-22d05ce647281056d71fbd3c31df3bcd6396188d.tar.bz2
Merge branch 'libnitrokey_3'
Diffstat (limited to 'include/command.h')
-rw-r--r--include/command.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/command.h b/include/command.h
index 0a875e4..fc374f7 100644
--- a/include/command.h
+++ b/include/command.h
@@ -28,6 +28,7 @@ namespace stick20{
template<CommandID cmd_id, PasswordKind Tpassword_kind = PasswordKind::User, int password_length = 20>
class PasswordCommand : public Command<cmd_id> {
+ constexpr static CommandID _command_id() { return cmd_id; }
public:
struct CommandPayload {
uint8_t kind;
@@ -69,8 +70,10 @@ namespace stick20{
} __packed;
- typedef Transaction<Command<cmd_id>::command_id(), struct CommandPayload, struct EmptyPayload>
- CommandTransaction;
+ //typedef Transaction<Command<cmd_id>::command_id(), struct CommandPayload, struct EmptyPayload>
+ // CommandTransaction;
+ using CommandTransaction = Transaction<cmd_id, CommandPayload, EmptyPayload>;
+ //using CommandTransaction = Transaction<_command_id(), CommandPayload, EmptyPayload>;
};
}