Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardUpdateRecord.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 Card */
21#include "ApduResponseApi.h"
22
23/* Keyple Card Calypso */
24#include "AbstractApduCommand.h"
25#include "AbstractCardCommand.h"
26#include "CalypsoCardAdapter.h"
27#include "CalypsoCardClass.h"
29
30/* Keyple Core Util */
31#include "LoggerFactory.h"
32
33namespace keyple {
34namespace card {
35namespace calypso {
36
37using namespace calypsonet::terminal::card;
38using namespace keyple::core::util::cpp;
39
41
49public:
62 CmdCardUpdateRecord(const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
63 const uint8_t sfi,
64 const uint8_t recordNumber,
65 const std::vector<uint8_t>& newRecordData);
66
73 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
74
83 bool isSessionBufferUsed() const override;
84
90 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
91 override;
92
93private:
97 const std::unique_ptr<Logger> mLogger =
98 LoggerFactory::getLogger(typeid(CmdCardUpdateRecord));
99
103 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
104
105
109 static const CalypsoCardCommand mCommand;
110
114 const uint8_t mSfi;
115
119 const uint8_t mRecordNumber;
120
124 const std::vector<uint8_t> mData;
125
129 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
130};
131
132}
133}
134}
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
CmdCardUpdateRecord(const std::shared_ptr< CalypsoCardAdapter > calypsoCard, const uint8_t sfi, const uint8_t recordNumber, const std::vector< uint8_t > &newRecordData)
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
AbstractApduCommand::StatusProperties StatusProperties