Keypop Generic Card C++ API - 1.0.0
Component of the Keypop C++ API
CardTransactionManager.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2026 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional *
5 * information regarding copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the *
8 * terms of the MIT License which is available at *
9 * https://opensource.org/licenses/MIT *
10 * *
11 * SPDX-License-Identifier: MIT *
12 ******************************************************************************/
13
14#pragma once
15
16#include <cstdint>
17#include <string>
18#include <vector>
19
20#include "keypop/reader/transaction/spi/CardTransactionManager.hpp"
21
22namespace keypop {
23namespace genericcard {
24
31: public keypop::reader::transaction::spi::CardTransactionManager<
32 CardTransactionManager> {
33public:
37 virtual ~CardTransactionManager() = default;
38
49 prepareApdu(const std::string& apduCommand)
50 = 0;
51
62 prepareApdu(const std::vector<std::uint8_t>& apduCommand)
63 = 0;
64
80 const std::uint8_t cla,
81 const std::uint8_t ins,
82 const std::uint8_t p1,
83 const std::uint8_t p2,
84 const std::vector<std::uint8_t>& dataIn,
85 const std::uint8_t le)
86 = 0;
87
101 const std::uint8_t cla,
102 const std::uint8_t ins,
103 const std::uint8_t p1,
104 const std::uint8_t p2,
105 const std::vector<std::uint8_t>& dataIn)
106 = 0;
107
126 virtual const std::vector<std::vector<std::uint8_t>>
128 = 0;
129
148 virtual const std::vector<std::string> getResponsesAsHexStrings() = 0;
149};
150
151} /* namespace genericcard */
152} /* namespace keypop */
Provides basic methods to prepare and process APDU exchange with a card.
virtual CardTransactionManager & prepareApdu(const std::vector< std::uint8_t > &apduCommand)=0
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is i...
virtual CardTransactionManager & prepareApdu(const std::string &apduCommand)=0
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is i...
virtual CardTransactionManager & prepareApdu(const std::uint8_t cla, const std::uint8_t ins, const std::uint8_t p1, const std::uint8_t p2, const std::vector< std::uint8_t > &dataIn, const std::uint8_t le)=0
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is i...
virtual const std::vector< std::string > getResponsesAsHexStrings()=0
Returns the list of responses corresponding to the commands executed by the last call to processComma...
virtual CardTransactionManager & prepareApdu(const std::uint8_t cla, const std::uint8_t ins, const std::uint8_t p1, const std::uint8_t p2, const std::vector< std::uint8_t > &dataIn)=0
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is i...
virtual const std::vector< std::vector< std::uint8_t > > getResponsesAsByteArrays()=0
Returns the list of responses corresponding to the commands executed by the last call to processComma...