Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CmdCardCloseSession.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2021 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 "CalypsoCardClass.h"
27
28/* Keyple Core Util */
29#include "LoggerFactory.h"
30
31namespace keyple {
32namespace card {
33namespace calypso {
34
35using namespace calypsonet::terminal::calypso::card;
36using namespace keyple::core::util::cpp;
37
39
47public:
59 CmdCardCloseSession(const std::shared_ptr<CalypsoCard> calypsoCard,
60 const bool ratificationAsked,
61 const std::vector<uint8_t> terminalSessionSignature);
62
71 CmdCardCloseSession(const std::shared_ptr<CalypsoCard> calypsoCard);
72
79 bool isSessionBufferUsed() const override;
80
88 CmdCardCloseSession& setApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse)
89 override;
90
98 const std::vector<uint8_t>& getSignatureLo() const;
99
108 const std::vector<uint8_t>& getPostponedData() const;
109
115 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
116 override;
117
118private:
122 static const CalypsoCardCommand mCommand;
123
127 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
128
132 const std::shared_ptr<CalypsoCard> mCalypsoCard;
133
137 std::vector<uint8_t> mSignatureLo;
138
142 std::vector<uint8_t> mPostponedData;
143
147 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
148};
149
150}
151}
152}
const std::vector< uint8_t > & getSignatureLo() const
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
CmdCardCloseSession(const std::shared_ptr< CalypsoCard > calypsoCard, const bool ratificationAsked, const std::vector< uint8_t > terminalSessionSignature)
CmdCardCloseSession & setApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
const std::vector< uint8_t > & getPostponedData() const
AbstractApduCommand::StatusProperties StatusProperties