18#include "ApduResponseApi.h"
47using namespace calypsonet::terminal::card;
71 const std::shared_ptr<AbstractCardCommand> command,
72 const std::shared_ptr<ApduResponseApi> apduResponse,
73 const bool isSessionOpen);
88 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
89 const std::vector<std::shared_ptr<AbstractCardCommand>>& commands,
90 const std::vector<std::shared_ptr<ApduResponseApi>>& apduResponses,
91 const bool isSessionOpen);
110 static void updateCalypsoCardOpenSession(
111 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
112 std::shared_ptr<CmdCardOpenSession> cmdCardOpenSession,
113 const std::shared_ptr<ApduResponseApi> apduResponse);
123 static void updateCalypsoCardCloseSession(
124 std::shared_ptr<CmdCardCloseSession> cmdCardCloseSession,
125 const std::shared_ptr<ApduResponseApi> apduResponse);
139 static void updateCalypsoCardReadRecords(
140 const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
141 const std::shared_ptr<CmdCardReadRecords> cmdCardReadRecords,
142 const std::shared_ptr<ApduResponseApi> apduResponse,
143 const bool isSessionOpen);
153 static void checkResponseStatusForStrictAndBestEffortMode(
154 const std::shared_ptr<AbstractCardCommand> command,
const bool isSessionOpen);
169 static void updateCalypsoCardSearchRecordMultiple(
170 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
171 std::shared_ptr<CmdCardSearchRecordMultiple> cmdCardSearchRecordMultiple,
172 const std::shared_ptr<ApduResponseApi> apduResponse,
173 const bool isSessionOpen);
187 static void updateCalypsoCardReadRecordMultiple(
188 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
189 std::shared_ptr<CmdCardReadRecordMultiple> cmdCardReadRecordMultiple,
190 const std::shared_ptr<ApduResponseApi> apduResponse,
191 const bool isSessionOpen);
205 static void updateCalypsoCardReadBinary(std::shared_ptr<CalypsoCardAdapter> calypsoCard,
206 std::shared_ptr<CmdCardReadBinary> cmdCardReadBinary,
207 const std::shared_ptr<ApduResponseApi> apduResponse,
208 const bool isSessionOpen);
222 static void updateCalypsoCardWithFcp(
223 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
224 std::shared_ptr<AbstractCardCommand> command,
225 const std::shared_ptr<ApduResponseApi> apduResponse);
240 static void updateCalypsoCardWithEfList(
241 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
242 std::shared_ptr<CmdCardGetDataEfList> command,
243 const std::shared_ptr<ApduResponseApi> apduResponse);
256 static void updateCalypsoCardWithTraceabilityInformation(
257 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
258 std::shared_ptr<CmdCardGetDataTraceabilityInformation> command,
259 const std::shared_ptr<ApduResponseApi> apduResponse);
271 static void updateCalypsoCardUpdateRecord(
272 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
273 std::shared_ptr<CmdCardUpdateRecord> cmdCardUpdateRecord,
274 const std::shared_ptr<ApduResponseApi> apduResponse);
286 static void updateCalypsoCardWriteRecord(
287 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
288 std::shared_ptr<CmdCardWriteRecord> cmdCardWriteRecord,
289 const std::shared_ptr<ApduResponseApi> apduResponse);
301 static void updateCalypsoCardUpdateBinary(
302 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
303 std::shared_ptr<CmdCardUpdateOrWriteBinary> cmdCardUpdateBinary,
304 const std::shared_ptr<ApduResponseApi> apduResponse);
316 static void updateCalypsoCardWriteBinary(
317 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
318 std::shared_ptr<CmdCardUpdateOrWriteBinary> cmdCardWriteBinary,
319 const std::shared_ptr<ApduResponseApi> apduResponse);
332 static void updateCalypsoCardAppendRecord(
333 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
334 std::shared_ptr<CmdCardAppendRecord> cmdCardAppendRecord,
335 const std::shared_ptr<ApduResponseApi> apduResponse);
348 static void updateCalypsoCardIncreaseOrDecrease(
349 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
350 std::shared_ptr<CmdCardIncreaseOrDecrease> cmdCardIncreaseOrDecrease,
351 const std::shared_ptr<ApduResponseApi> apduResponse);
364 static void updateCalypsoCardIncreaseOrDecreaseMultiple(
365 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
366 std::shared_ptr<CmdCardIncreaseOrDecreaseMultiple> cmdCardIncreaseOrDecreaseMultiple,
367 const std::shared_ptr<ApduResponseApi> apduResponse);
379 static void updateCalypsoCardGetChallenge(
380 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
381 std::shared_ptr<CmdCardGetChallenge> cmdCardGetChallenge,
382 const std::shared_ptr<ApduResponseApi> apduResponse);
397 static void updateCalypsoVerifyPin(std::shared_ptr<CalypsoCardAdapter> calypsoCard,
398 std::shared_ptr<CmdCardVerifyPin> cmdCardVerifyPin,
399 const std::shared_ptr<ApduResponseApi> apduResponse);
408 static void updateCalypsoChangePin(std::shared_ptr<CmdCardChangePin> cmdCardChangePin,
409 const std::shared_ptr<ApduResponseApi> apduResponse);
418 static void updateCalypsoChangeKey(std::shared_ptr<CmdCardChangeKey> cmdCardChangeKey,
419 const std::shared_ptr<ApduResponseApi> apduResponse);
433 static void updateCalypsoCardSvGet(
434 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
435 std::shared_ptr<CmdCardSvGet> cmdCardSvGet,
436 const std::shared_ptr<ApduResponseApi> apduResponse);
451 static void updateCalypsoCardSvOperation(
452 std::shared_ptr<CalypsoCardAdapter> calypsoCard,
453 std::shared_ptr<AbstractCardCommand> cmdCardSvOperation,
454 const std::shared_ptr<ApduResponseApi> apduResponse);
464 static void updateCalypsoInvalidateRehabilitate(
465 std::shared_ptr<AbstractCardCommand> cmdCardInvalidateRehabilitate,
466 const std::shared_ptr<ApduResponseApi> apduResponse);
476 static const std::shared_ptr<DirectoryHeader> createDirectoryHeader(
477 const std::vector<uint8_t>& proprietaryInformation);
486 static ElementaryFile::Type getEfTypeFromCardValue(
const uint8_t efType);
496 static const std::shared_ptr<FileHeaderAdapter> createFileHeader(
497 const std::vector<uint8_t>& proprietaryInformation);
static void updateCalypsoCard(std::shared_ptr< CalypsoCardAdapter > calypsoCard, const std::shared_ptr< AbstractCardCommand > command, const std::shared_ptr< ApduResponseApi > apduResponse, const bool isSessionOpen)