#include "device/fido/hid/fido_hid_packet.h"
#include <algorithm>
#include <utility>
#include "base/containers/contains.h"
#include "base/memory/ptr_util.h"
#include "base/numerics/safe_conversions.h"
namespace device {
FidoHidPacket::FidoHidPacket(std::vector<uint8_t> data, uint32_t channel_id)
: … { … }
FidoHidPacket::FidoHidPacket() = default;
FidoHidPacket::~FidoHidPacket() = default;
std::unique_ptr<FidoHidInitPacket> FidoHidInitPacket::CreateFromSerializedData(
base::span<const uint8_t> serialized,
size_t* remaining_size) { … }
FidoHidInitPacket::FidoHidInitPacket(uint32_t channel_id,
FidoHidDeviceCommand cmd,
std::vector<uint8_t> data,
uint16_t payload_length)
: … { … }
FidoHidInitPacket::~FidoHidInitPacket() = default;
std::vector<uint8_t> FidoHidInitPacket::GetSerializedData() const { … }
std::unique_ptr<FidoHidContinuationPacket>
FidoHidContinuationPacket::CreateFromSerializedData(
base::span<const uint8_t> serialized,
size_t* remaining_size) { … }
FidoHidContinuationPacket::FidoHidContinuationPacket(const uint32_t channel_id,
const uint8_t sequence,
std::vector<uint8_t> data)
: … { … }
FidoHidContinuationPacket::~FidoHidContinuationPacket() = default;
std::vector<uint8_t> FidoHidContinuationPacket::GetSerializedData() const { … }
}