Keypop Calypso Card C++ API - 2.2.0
Component of the Keypop C++ API
CalypsoCardSelectionExtension.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * This program and the accompanying materials are made available under the *
5 * terms of the MIT License which is available at *
6 * https://opensource.org/licenses/MIT. *
7 * *
8 * SPDX-License-Identifier: MIT *
9 ******************************************************************************/
10
11#pragma once
12
13#include <cstdint>
14
18#include "keypop/reader/selection/spi/CardSelectionExtension.hpp"
19
20namespace keypop {
21namespace calypso {
22namespace card {
23namespace card {
24
26using keypop::reader::selection::spi::CardSelectionExtension;
27
61class CalypsoCardSelectionExtension : public CardSelectionExtension {
62public:
73
88 = 0;
89
106 = 0;
107
125 = 0;
126
147 prepareReadRecord(const uint8_t sfi, const int recordNumber)
148 = 0;
149
172 const uint8_t sfi, const int offset, const int nbBytesToRead)
173 = 0;
174
198 prepareReadCounter(const uint8_t sfi, const int nbCountersToRead)
199 = 0;
200
256 = 0;
257};
258
259} /* namespace card */
260} /* namespace card */
261} /* namespace calypso */
262} /* namespace keypop */
Extends the CardSelectionExtension interface of the "Keypop Reader API" to provide means to define op...
virtual CalypsoCardSelectionExtension & prepareReadRecord(const uint8_t sfi, const int recordNumber)=0
Adds a "Read Records" command to read a single record from the indicated "linear" or "cyclic" EF.
virtual CalypsoCardSelectionExtension & prepareReadBinary(const uint8_t sfi, const int offset, const int nbBytesToRead)=0
Adds one or multiple "Read Binary" commands to read all or part of the indicated "binary" EF.
virtual CalypsoCardSelectionExtension & acceptInvalidatedCard()=0
Request to accept invalidated cards during the selection stage.
virtual CalypsoCardSelectionExtension & preparePreOpenSecureSession(const WriteAccessLevel writeAccessLevel)=0
Adds a specific "Open Secure Session" command to attempt a secure session pre-opening.
virtual CalypsoCardSelectionExtension & prepareSelectFile(const SelectFileControl selectControl)=0
Adds a "Select File" command to select file according to the provided SelectFileControl enum entry in...
virtual CalypsoCardSelectionExtension & prepareReadCounter(const uint8_t sfi, const int nbCountersToRead)=0
Adds a "Read Records" command to read a part of a record of the indicated EF, which should be a count...
virtual CalypsoCardSelectionExtension & prepareSelectFile(const uint16_t lid)=0
Adds a command APDU to select an EF by its LID in the current DF.
virtual CalypsoCardSelectionExtension & prepareGetData(const GetDataTag tag)=0
Adds a "Get Data" command to retrieve the data indicated by the provided tag.
WriteAccessLevel
Enumeration of the write access levels for the Calypso card Secure Session.
GetDataTag
Enumeration of all output data types.
Definition: GetDataTag.hpp:27
SelectFileControl
Enumeration of all expected behaviors of the selection command (see the specifics of this command in ...