Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardGetDataFci.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 <map>
16#include <memory>
17#include <typeinfo>
18#include <vector>
19
20/* Keyple Card Calypso */
21#include "AbstractApduCommand.h"
22#include "AbstractCardCommand.h"
23#include "CalypsoCardAdapter.h"
24#include "CalypsoCardClass.h"
25#include "CalypsoCardCommand.h"
26
27/* Keyple Core Util */
28#include "LoggerFactory.h"
29
30namespace keyple {
31namespace card {
32namespace calypso {
33
34using namespace keyple::core::util::cpp;
35
37
48: public AbstractCardCommand,
49 public std::enable_shared_from_this<CmdCardGetDataFci> {
50public:
58 CmdCardGetDataFci(const std::shared_ptr<CalypsoCardAdapter> calypsoCard);
59
67 CmdCardGetDataFci(const CalypsoCardClass calypsoCardClass);
68
75 bool isSessionBufferUsed() const override;
76
101 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
102
110 bool isValidCalypsoFCI() const;
111
119 const std::vector<uint8_t>& getDfName() const;
120
128 const std::vector<uint8_t>& getApplicationSerialNumber() const;
129
137 const std::vector<uint8_t>& getDiscretionaryData() const;
138
146 bool isDfInvalidated() const;
147
153 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
154 override;
155
156private:
160 const std::unique_ptr<Logger> mLogger = LoggerFactory::getLogger(typeid(CmdCardGetDataFci));
161
165 static const CalypsoCardCommand mCommand;
166
170 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
171
175 static const int TAG_DF_NAME;
176 static const int TAG_APPLICATION_SERIAL_NUMBER;
177 static const int TAG_DISCRETIONARY_DATA;
178
182 bool mIsDfInvalidated = false;
183
187 bool mIsValidCalypsoFCI = false;
188
192 std::vector<uint8_t> mDfName;
193
197 std::vector<uint8_t> mApplicationSN;
198
202 std::vector<uint8_t> mDiscretionaryData;
203
207 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
208
215 void buildCommand(const CalypsoCardClass calypsoCardClass);
216};
217
218}
219}
220}
CmdCardGetDataFci(const std::shared_ptr< CalypsoCardAdapter > calypsoCard)
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
const std::vector< uint8_t > & getDfName() const
const std::vector< uint8_t > & getDiscretionaryData() const
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
const std::vector< uint8_t > & getApplicationSerialNumber() const
AbstractApduCommand::StatusProperties StatusProperties