Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardSvDebitOrUndebit.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2023 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/* Keyple Card Calypso */
20#include "AbstractApduCommand.h"
21#include "AbstractCardCommand.h"
22#include "CalypsoCardAdapter.h"
23#include "CalypsoCardClass.h"
24
25namespace keyple {
26namespace card {
27namespace calypso {
28
30
76public:
91 CmdCardSvDebitOrUndebit(const bool isDebitCommand,
92 const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
93 const int amount,
94 const std::vector<uint8_t>& date,
95 const std::vector<uint8_t>& time,
96 const bool isSessionOpen,
97 const bool isExtendedModeAllowed);
98
115 void finalizeCommand(const std::vector<uint8_t>& debitOrUndebitComplementaryData);
116
124 const std::vector<uint8_t> getSvDebitOrUndebitData() const;
125
132 bool isSessionBufferUsed() const override;
133
142 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
143
149 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
150 override;
151
152private:
156 static const int SW_POSTPONED_DATA;
157
161 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
162
166 bool mIsSessionOpen = false;
167
171 bool mIsExtendedModeAllowed = false;
172
176 std::vector<uint8_t> mDataIn;
177
181 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
182};
183
184}
185}
186}
const std::vector< uint8_t > getSvDebitOrUndebitData() const
void finalizeCommand(const std::vector< uint8_t > &debitOrUndebitComplementaryData)
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
CmdCardSvDebitOrUndebit(const bool isDebitCommand, const std::shared_ptr< CalypsoCardAdapter > calypsoCard, const int amount, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time, const bool isSessionOpen, const bool isExtendedModeAllowed)
AbstractApduCommand::StatusProperties StatusProperties