Keypop Calypso Card C++ API 2.0.0
Reference Calypso Card API for C++
TransactionManager.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 <map>
14#include <vector>
15
17#include "keypop/calypso/card/SearchCommandData.hpp"
20
21namespace keypop {
22namespace calypso {
23namespace card {
24namespace transaction {
25
55template <typename T>
57public:
72 virtual T& prepareSelectFile(const uint16_t lid) = 0;
73
86 virtual T& prepareSelectFile(const SelectFileControl selectFileControl) = 0;
87
103 virtual T& prepareGetData(const GetDataTag tag) = 0;
104
140 virtual T& prepareReadRecord(const uint8_t sfi, const int recordNumber) = 0;
141
173 const uint8_t sfi,
174 const int fromRecordNumber,
175 const int toRecordNumber,
176 const int recordSize)
177 = 0;
178
216 const uint8_t sfi,
217 const int fromRecordNumber,
218 const int toRecordNumber,
219 const int offset,
220 const int nbBytesToRead)
221 = 0;
222
257 const uint8_t sfi, const int offset, const int nbBytesToRead)
258 = 0;
259
291 virtual T& prepareReadCounter(const uint8_t sfi, const int nbCountersToRead)
292 = 0;
293
337 virtual T& prepareSearchRecords(const SearchCommandData data) = 0;
338
352 virtual T& prepareCheckPinStatus() = 0;
353
373 const uint8_t sfi, const std::vector<uint8_t>& recordData)
374 = 0;
375
398 const uint8_t sfi,
399 const int recordNumber,
400 const std::vector<uint8_t>& recordData)
401 = 0;
402
426 const uint8_t sfi,
427 const int recordNumber,
428 const std::vector<uint8_t>& recordData)
429 = 0;
430
455 const uint8_t sfi, const int offset, const std::vector<uint8_t>& data)
456 = 0;
457
483 const uint8_t sfi, const int offset, const std::vector<uint8_t>& data)
484 = 0;
485
510 const uint8_t sfi, const int counterNumber, const int incValue)
511 = 0;
512
535 const uint8_t sfi,
536 const std::map<const int, const int>& counterNumberToIncValueMap)
537 = 0;
538
563 const uint8_t sfi, const int counterNumber, const int decValue)
564 = 0;
565
588 const uint8_t sfi,
589 const std::map<const int, const int>& counterNumberToDecValueMap)
590 = 0;
591
628 const uint8_t sfi, const int counterNumber, const int newValue)
629 = 0;
630
656 virtual T& prepareSvReadAllLogs() = 0;
657
679 virtual T& prepareVerifyPin(const std::vector<uint8_t>& pin) = 0;
680
705 virtual T& prepareChangePin(const std::vector<uint8_t>& newPin) = 0;
706
746 virtual T processCommands(const ChannelControl channelControl) = 0;
747
755 const st::vector<std::vector<uint8_t>>& getTransactionAuditData() const = 0;
756};
757
758} /* namespace transaction */
759} /* namespace card */
760} /* namespace calypso */
761} /* namespace keypop */
virtual T & prepareWriteRecord(const uint8_t sfi, const int recordNumber, const std::vector< uint8_t > &recordData)=0
virtual T & prepareDecreaseCounter(const uint8_t sfi, const int counterNumber, const int decValue)=0
virtual T & prepareWriteBinary(const uint8_t sfi, const int offset, const std::vector< uint8_t > &data)=0
virtual T & prepareDecreaseCounters(const uint8_t sfi, const std::map< const int, const int > &counterNumberToDecValueMap)=0
const st::vector< std::vector< uint8_t > > & getTransactionAuditData() const =0
virtual T & prepareReadRecordsPartially(const uint8_t sfi, const int fromRecordNumber, const int toRecordNumber, const int offset, const int nbBytesToRead)=0
virtual T & prepareChangePin(const std::vector< uint8_t > &newPin)=0
virtual T & prepareSelectFile(const uint16_t lid)=0
virtual T & prepareReadRecords(const uint8_t sfi, const int fromRecordNumber, const int toRecordNumber, const int recordSize)=0
virtual T processCommands(const ChannelControl channelControl)=0
virtual T & prepareIncreaseCounter(const uint8_t sfi, const int counterNumber, const int incValue)=0
virtual T & prepareIncreaseCounters(const uint8_t sfi, const std::map< const int, const int > &counterNumberToIncValueMap)=0
virtual T & prepareUpdateBinary(const uint8_t sfi, const int offset, const std::vector< uint8_t > &data)=0
virtual T & prepareReadBinary(const uint8_t sfi, const int offset, const int nbBytesToRead)=0
virtual T & prepareUpdateRecord(const uint8_t sfi, const int recordNumber, const std::vector< uint8_t > &recordData)=0
virtual T & prepareGetData(const GetDataTag tag)=0
virtual T & prepareSelectFile(const SelectFileControl selectFileControl)=0
virtual T & prepareAppendRecord(const uint8_t sfi, const std::vector< uint8_t > &recordData)=0
virtual T & prepareSetCounter(const uint8_t sfi, const int counterNumber, const int newValue)=0
virtual T & prepareReadRecord(const uint8_t sfi, const int recordNumber)=0
virtual T & prepareSearchRecords(const SearchCommandData data)=0
virtual T & prepareReadCounter(const uint8_t sfi, const int nbCountersToRead)=0
virtual T & prepareVerifyPin(const std::vector< uint8_t > &pin)=0