21#include "CalypsoCardSelection.h"
24#include "CardSelectorSpi.h"
25#include "CardSelectionSpi.h"
36using namespace calypsonet::terminal::calypso::card;
37using namespace calypsonet::terminal::card::spi;
46:
public CalypsoCardSelection,
public CardSelectionSpi {
62 CalypsoCardSelection& filterByCardProtocol(
const std::string& cardProtocol)
override;
69 CalypsoCardSelection& filterByPowerOnData(
const std::string& powerOnDataRegex)
override;
76 CalypsoCardSelection& filterByDfName(
const std::vector<uint8_t>& aid)
override;
83 CalypsoCardSelection& filterByDfName(
const std::string& aid)
override;
90 CalypsoCardSelection& setFileOccurrence(
const FileOccurrence fileOccurrence)
override;
97 CalypsoCardSelection& setFileControlInformation(
106 CalypsoCardSelection& addSuccessfulStatusWord(
const int statusWord)
override;
113 CalypsoCardSelection& acceptInvalidatedCard()
override;
121 CalypsoCardSelection& prepareReadRecordFile(
const uint8_t sfi,
const uint8_t recordNumber)
129 CalypsoCardSelection& prepareReadRecord(
const uint8_t sfi,
const uint8_t recordNumber)
override;
136 CalypsoCardSelection& prepareGetData(
const GetDataTag tag)
override;
144 CalypsoCardSelection& prepareSelectFile(
const std::vector<uint8_t>& lid)
override;
151 CalypsoCardSelection& prepareSelectFile(
const uint16_t lid)
override;
158 CalypsoCardSelection& prepareSelectFile(
const SelectFileControl selectControl)
override;
165 const std::shared_ptr<CardSelectionRequestSpi> getCardSelectionRequest()
override;
172 const std::shared_ptr<SmartCardSpi> parse(
173 const std::shared_ptr<CardSelectionResponseApi> cardSelectionResponse)
override;
179 static const int AID_MIN_LENGTH;
180 static const int AID_MAX_LENGTH;
181 static const int SW_CARD_INVALIDATED;
182 static const std::string MSG_CARD_COMMAND_ERROR;
189 std::vector<std::shared_ptr<AbstractApduCommand>> mCommands;
194 std::shared_ptr<CardSelectorAdapter> mCardSelector;
206 void parseApduResponses(
const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
207 const std::vector<std::shared_ptr<AbstractApduCommand>>& commands,
208 const std::vector<std::shared_ptr<ApduResponseApi>>& apduResponses);
#define KEYPLECARDCALYPSO_API
CardSelectorSpi::FileOccurrence FileOccurrence
CardSelectorSpi::FileControlInformation FileControlInformation