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) 2024 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 https://opensource.org/licenses/MIT. *
6 * *
7 * SPDX-License-Identifier: MIT *
8 **************************************************************************************************/
9
10#pragma once
11
12#include <map>
13#include <vector>
14
16#include "keypop/calypso/card/SearchCommandData.hpp"
19
20namespace keypop {
21namespace calypso {
22namespace card {
23namespace transaction {
24
53template <typename T>
55public:
70 virtual T& prepareSelectFile(const uint16_t lid) = 0;
71
84 virtual T& prepareSelectFile(const SelectFileControl selectFileControl) = 0;
85
100 virtual T& prepareGetData(const GetDataTag tag) = 0;
101
134 virtual T& prepareReadRecord(const uint8_t sfi, const int recordNumber) = 0;
135
166 const uint8_t sfi,
167 const int fromRecordNumber,
168 const int toRecordNumber,
169 const int recordSize)
170 = 0;
171
205 const uint8_t sfi,
206 const int fromRecordNumber,
207 const int toRecordNumber,
208 const int offset,
209 const int nbBytesToRead)
210 = 0;
211
242 virtual T& prepareReadBinary(const uint8_t sfi, const int offset, const int nbBytesToRead) = 0;
243
274 virtual T& prepareReadCounter(const uint8_t sfi, const int nbCountersToRead) = 0;
275
317 virtual T& prepareSearchRecords(const SearchCommandData data) = 0;
318
330 virtual T& prepareCheckPinStatus() = 0;
331
349 virtual T& prepareAppendRecord(const uint8_t sfi, const std::vector<uint8_t>& recordData) = 0;
350
372 const uint8_t sfi, const int recordNumber, const std::vector<uint8_t>& recordData)
373 = 0;
374
396 const uint8_t sfi, const int recordNumber, const std::vector<uint8_t>& recordData)
397 = 0;
398
418 virtual T&
419 prepareUpdateBinary(const uint8_t sfi, const int offset, const std::vector<uint8_t>& data)
420 = 0;
421
442 virtual T&
443 prepareWriteBinary(const uint8_t sfi, const int offset, const std::vector<uint8_t>& data)
444 = 0;
445
466 virtual T&
467 prepareIncreaseCounter(const uint8_t sfi, const int counterNumber, const int incValue)
468 = 0;
469
490 const uint8_t sfi, const std::map<const int, const int>& counterNumberToIncValueMap)
491 = 0;
492
513 virtual T&
514 prepareDecreaseCounter(const uint8_t sfi, const int counterNumber, const int decValue)
515 = 0;
516
537 const uint8_t sfi, const std::map<const int, const int>& counterNumberToDecValueMap)
538 = 0;
539
574 virtual T& prepareSetCounter(const uint8_t sfi, const int counterNumber, const int newValue)
575 = 0;
576
598 virtual T& prepareSvReadAllLogs() = 0;
599
617 virtual T& prepareVerifyPin(const std::vector<uint8_t>& pin) = 0;
618
640 virtual T& prepareChangePin(const std::vector<uint8_t>& newPin) = 0;
641
674 virtual T processCommands(const ChannelControl channelControl) = 0;
675
683 const st::vector<std::vector<uint8_t>>& getTransactionAuditData() const = 0;
684};
685
686} /* namespace transaction */
687} /* namespace card */
688} /* namespace calypso */
689} /* 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