2022-08-09 19:00:47 +02:00
|
|
|
#include "UserMock.h"
|
|
|
|
|
2022-08-24 15:43:58 +02:00
|
|
|
namespace cfdp {
|
|
|
|
|
2022-08-09 19:00:47 +02:00
|
|
|
cfdp::UserMock::UserMock(HasFileSystemIF& vfs) : UserBase(vfs) {}
|
|
|
|
|
2023-08-14 13:33:47 +02:00
|
|
|
void UserMock::transactionIndication(const TransactionId& id) { transactionIndicRecvd.emplace(id); }
|
|
|
|
|
2023-08-14 13:40:25 +02:00
|
|
|
void UserMock::eofSentIndication(const TransactionId& id) { eofSentRecvd.emplace(id); }
|
2022-08-24 15:43:58 +02:00
|
|
|
void UserMock::abandonedIndication(const TransactionId& id, cfdp::ConditionCode code,
|
2022-08-24 17:31:26 +02:00
|
|
|
uint64_t progress) {}
|
2022-09-06 13:45:43 +02:00
|
|
|
|
2023-08-14 13:40:25 +02:00
|
|
|
void UserMock::eofRecvIndication(const TransactionId& id) { eofRecvdRecvd.push(id); }
|
2022-09-06 13:45:43 +02:00
|
|
|
|
2022-09-06 14:06:22 +02:00
|
|
|
void UserMock::transactionFinishedIndication(const TransactionFinishedParams& finishedParams) {
|
2023-08-14 13:33:47 +02:00
|
|
|
finishedRecvd.emplace(finishedParams.id, finishedParams);
|
2022-09-06 14:06:22 +02:00
|
|
|
}
|
2022-09-06 13:16:00 +02:00
|
|
|
|
|
|
|
void UserMock::metadataRecvdIndication(const MetadataRecvdParams& params) {
|
2023-08-14 13:33:47 +02:00
|
|
|
metadataRecvd.emplace(params.id, params);
|
2022-09-06 13:16:00 +02:00
|
|
|
}
|
|
|
|
|
2022-08-24 15:43:58 +02:00
|
|
|
void UserMock::fileSegmentRecvdIndication(const FileSegmentRecvdParams& params) {}
|
|
|
|
void UserMock::reportIndication(const TransactionId& id, StatusReportIF& report) {}
|
|
|
|
void UserMock::suspendedIndication(const TransactionId& id, ConditionCode code) {}
|
|
|
|
void UserMock::resumedIndication(const TransactionId& id, size_t progress) {}
|
2022-08-24 17:31:26 +02:00
|
|
|
void UserMock::faultIndication(const TransactionId& id, cfdp::ConditionCode code, size_t progress) {
|
2022-08-24 15:43:58 +02:00
|
|
|
}
|
2022-08-24 17:31:26 +02:00
|
|
|
|
2022-09-06 13:16:00 +02:00
|
|
|
void UserMock::reset() {
|
2023-08-14 13:40:25 +02:00
|
|
|
std::queue<TransactionId>().swap(eofRecvdRecvd);
|
2022-09-06 14:06:22 +02:00
|
|
|
std::queue<std::pair<TransactionId, cfdp::MetadataRecvdParams>>().swap(metadataRecvd);
|
|
|
|
std::queue<std::pair<TransactionId, cfdp::TransactionFinishedParams>>().swap(finishedRecvd);
|
2022-09-06 13:16:00 +02:00
|
|
|
}
|
|
|
|
|
2022-08-24 17:31:26 +02:00
|
|
|
} // namespace cfdp
|