Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CardRequestAdapter.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 <memory>
16#include <ostream>
17
18/* Calypsonet Terminal Car */
19#include "CardRequestSpi.h"
20
21/* Keyple Card Cakypso */
23
24namespace keyple {
25namespace card {
26namespace calypso {
27
28using namespace calypsonet::terminal::card::spi;
29
37class KEYPLECARDCALYPSO_API CardRequestAdapter final : public CardRequestSpi {
38public:
50 CardRequestAdapter(const std::vector<std::shared_ptr<ApduRequestSpi>>& apduRequests,
51 const bool isStatusCodesVerificationEnabled);
52
58 const std::vector<std::shared_ptr<ApduRequestSpi>>& getApduRequests() const override;
59
65 bool stopOnUnsuccessfulStatusWord() const override;
66
70 friend std::ostream& operator<<(std::ostream& os, const CardRequestAdapter& cra);
71
75 friend std::ostream& operator<<(std::ostream& os, const std::shared_ptr<CardRequestAdapter> cra);
76
77private:
81 std::vector<std::shared_ptr<ApduRequestSpi>> mApduRequests;
82
86 const bool mIsStatusCodesVerificationEnabled;
87};
88
89}
90}
91}
#define KEYPLECARDCALYPSO_API
std::ostream & operator<<(std::ostream &os, const std::shared_ptr< ApduRequestAdapter > ara)