Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardCloseSession.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 <memory>
18#include <vector>
19
20/* Calypsonet Terminal Calypso */
21#include "CalypsoCard.h"
22
23/* Keyple Card Calypso */
24#include "AbstractApduCommand.h"
25#include "AbstractCardCommand.h"
26#include "CalypsoCardAdapter.h"
27#include "CalypsoCardClass.h"
28
29/* Keyple Core Util */
30#include "LoggerFactory.h"
31
32namespace keyple {
33namespace card {
34namespace calypso {
35
36using namespace calypsonet::terminal::calypso::card;
37using namespace keyple::core::util::cpp;
38
40
48public:
60 CmdCardCloseSession(const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
61 const bool ratificationAsked,
62 const std::vector<uint8_t> terminalSessionSignature);
63
72 CmdCardCloseSession(const std::shared_ptr<CalypsoCardAdapter> calypsoCard);
73
80 bool isSessionBufferUsed() const override;
81
89 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
90
98 const std::vector<uint8_t>& getSignatureLo() const;
99
107 const std::vector<std::vector<uint8_t>>& getPostponedData() const;
108
114 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
115 override;
116
117private:
121 static const CalypsoCardCommand mCommand;
122
126 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
127
131 std::vector<uint8_t> mSignatureLo;
132
136 std::vector<std::vector<uint8_t>> mPostponedData;
137
141 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
142};
143
144}
145}
146}
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
const std::vector< uint8_t > & getSignatureLo() const
const std::vector< std::vector< uint8_t > > & getPostponedData() const
CmdCardCloseSession(const std::shared_ptr< CalypsoCardAdapter > calypsoCard, const bool ratificationAsked, const std::vector< uint8_t > terminalSessionSignature)
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
AbstractApduCommand::StatusProperties StatusProperties