Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
AbstractCardCommand.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/* Keyple Card Calypso */
16#include "AbstractApduCommand.h"
17#include "CalypsoCardCommand.h"
18
19namespace keyple {
20namespace card {
21namespace calypso {
22
23/* Forward declaration */
24class CalypsoCardAdapter;
25
33public:
45 const int expectedResponseLength,
46 const std::shared_ptr<CalypsoCardAdapter> calypsoCard);
47
53 const CalypsoCardCommand& getCommandRef() const override;
54
64 virtual bool isSessionBufferUsed() const = 0;
65
71 const CalypsoApduCommandException buildCommandException(const std::type_info& exceptionClass,
72 const std::string& message) const final;
73
80 const std::string& message) const final;
81
87 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
88
96 std::shared_ptr<CalypsoCardAdapter> getCalypsoCard() const;
97
104 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse,
105 const std::shared_ptr<CalypsoCardAdapter> calypsoCard);
106
107private:
111 std::shared_ptr<CalypsoCardAdapter> mCalypsoCard;
112};
113
114}
115}
116}
AbstractCardCommand(const CalypsoCardCommand &commandRef, const int expectedResponseLength, const std::shared_ptr< CalypsoCardAdapter > calypsoCard)
virtual bool isSessionBufferUsed() const =0
const CalypsoApduCommandException buildCommandException(const std::type_info &exceptionClass, const std::string &message) const final
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
const CalypsoCardCommand & getCommandRef() const override
const CalypsoApduCommandException buildUnexpectedResponseLengthException(const std::string &message) const final
std::shared_ptr< CalypsoCardAdapter > getCalypsoCard() const