Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CmdCardSvDebit.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2022 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional information regarding *
5 * copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the terms of the Eclipse *
8 * Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 *
9 * *
10 * SPDX-License-Identifier: EPL-2.0 *
11 **************************************************************************************************/
12
13#pragma once
14
15#include <cstdint>
16#include <map>
17#include <vector>
18
19/* Calypsonet Terminal Calypso */
20#include "CalypsoCard.h"
21
22/* Keyple Card Calypso */
23#include "AbstractApduCommand.h"
24#include "AbstractCardCommand.h"
25
26namespace keyple {
27namespace card {
28namespace calypso {
29
30using namespace calypsonet::terminal::calypso::card;
31
33
78class CmdCardSvDebit final : public AbstractCardCommand {
79public:
92 CmdCardSvDebit(const std::shared_ptr<CalypsoCard> calypsoCard,
93 const int amount,
94 const uint8_t kvc,
95 const std::vector<uint8_t>& date,
96 const std::vector<uint8_t>& time);
97
114 void finalizeCommand(const std::vector<uint8_t>& debitComplementaryData);
115
123 const std::vector<uint8_t> getSvDebitData() const;
124
131 bool isSessionBufferUsed() const override;
132
141 CmdCardSvDebit& setApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
142
152 const std::vector<uint8_t> getSignatureLo() const;
153
159 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
160 override;
161
162private:
166 static const CalypsoCardCommand mCommand;
167
171 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
172
176 std::shared_ptr<CalypsoCard> mCalypsoCard;
177
181 std::vector<uint8_t> mDataIn;
182
186 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
187};
188
189}
190}
191}
const std::vector< uint8_t > getSvDebitData() const
void finalizeCommand(const std::vector< uint8_t > &debitComplementaryData)
CmdCardSvDebit & setApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
CmdCardSvDebit(const std::shared_ptr< CalypsoCard > calypsoCard, const int amount, const uint8_t kvc, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time)
const std::vector< uint8_t > getSignatureLo() const
AbstractApduCommand::StatusProperties StatusProperties