Keyple Card Calypso C++ Library 2.2.2
Reference Terminal Reader API for C++
CmdCardSvDebitOrUndebit.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/* Keyple Card Calypso */
20#include "AbstractApduCommand.h"
21#include "AbstractCardCommand.h"
22#include "CalypsoCardClass.h"
23
24namespace keyple {
25namespace card {
26namespace calypso {
27
29
75public:
91 CmdCardSvDebitOrUndebit(const bool isDebitCommand,
92 const CalypsoCardClass calypsoCardClass,
93 const int amount,
94 const uint8_t kvc,
95 const std::vector<uint8_t>& date,
96 const std::vector<uint8_t>& time,
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 CmdCardSvDebitOrUndebit& setApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse)
143 override;
144
154 const std::vector<uint8_t> getSignatureLo() const;
155
161 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
162 override;
163
164private:
168 static const int SV_POSTPONED_DATA_IN_SESSION;
169
173 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
174
178 CalypsoCardClass mCalypsoCardClass;
179
183 bool mIsExtendedModeAllowed = false;
184
188 std::vector<uint8_t> mDataIn;
189
193 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
194};
195
196}
197}
198}
const std::vector< uint8_t > getSvDebitOrUndebitData() const
void finalizeCommand(const std::vector< uint8_t > &debitOrUndebitComplementaryData)
const std::vector< uint8_t > getSignatureLo() const
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
CmdCardSvDebitOrUndebit & setApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
CmdCardSvDebitOrUndebit(const bool isDebitCommand, const CalypsoCardClass calypsoCardClass, const int amount, const uint8_t kvc, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time, const bool isExtendedModeAllowed)
AbstractApduCommand::StatusProperties StatusProperties