Reformatting.
This commit is contained in:
45
Channel.hpp
45
Channel.hpp
@@ -17,34 +17,25 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "U2FMessage.hpp"
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include "U2FMessage.hpp"
|
||||
|
||||
enum class ChannelInitState
|
||||
{
|
||||
Unitialised,
|
||||
Initialised
|
||||
};
|
||||
|
||||
enum class ChannelLockedState
|
||||
{
|
||||
Locked,
|
||||
Unlocked
|
||||
};
|
||||
|
||||
class Channel
|
||||
{
|
||||
protected:
|
||||
uint32_t cid;
|
||||
ChannelInitState initState;
|
||||
ChannelLockedState lockedState;
|
||||
|
||||
public:
|
||||
Channel(const uint32_t channelID);
|
||||
void handle(const U2FMessage& uMsg);
|
||||
|
||||
uint32_t getCID() const;
|
||||
void init(const ChannelInitState newInitState);
|
||||
void lock(const ChannelLockedState newLockedState);
|
||||
enum class ChannelInitState { Unitialised, Initialised };
|
||||
|
||||
enum class ChannelLockedState { Locked, Unlocked };
|
||||
|
||||
class Channel {
|
||||
protected:
|
||||
uint32_t cid;
|
||||
ChannelInitState initState;
|
||||
ChannelLockedState lockedState;
|
||||
|
||||
public:
|
||||
Channel(const uint32_t channelID);
|
||||
void handle(const U2FMessage& uMsg);
|
||||
|
||||
uint32_t getCID() const;
|
||||
void init(const ChannelInitState newInitState);
|
||||
void lock(const ChannelLockedState newLockedState);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user