Added resumable loading, along with signal handling.
This version can store state after receiving SIGINT. This is achieved by polling FIFO read state;
This commit is contained in:
19
U2F_CMD.cpp
Normal file
19
U2F_CMD.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "U2F_CMD.hpp"
|
||||
#include "u2f.hpp"
|
||||
#include "U2F_Msg_CMD.hpp"
|
||||
#include "U2F_Init_CMD.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
shared_ptr<U2F_CMD> U2F_CMD::get(const shared_ptr<U2FMessage> uMsg)
|
||||
{
|
||||
switch (uMsg->cmd)
|
||||
{
|
||||
case U2FHID_MSG:
|
||||
return U2F_Msg_CMD::generate(uMsg);
|
||||
case U2FHID_INIT:
|
||||
return make_shared<U2F_Init_CMD>(uMsg);
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user