Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
CmdCardAppendRecord.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"
28
29/* Keyple Core Util */
30#include "LoggerFactory.h"
31
32namespace keyple {
33namespace card {
34namespace calypso {
35
36using namespace calypsonet::terminal::card;
37using namespace keyple::core::util::cpp;
38
40
48public:
59 CmdCardAppendRecord(const std::shared_ptr<CalypsoCardAdapter> calypsoCard,
60 const uint8_t sfi,
61 const std::vector<uint8_t>& newRecordData);
62
69 void parseApduResponse(const std::shared_ptr<ApduResponseApi> apduResponse) override;
70
76 bool isSessionBufferUsed() const override;
77
83 const std::map<const int, const std::shared_ptr<StatusProperties>>& getStatusTable() const
84 override;
85
86private:
90 const std::unique_ptr<Logger> mLogger =
91 LoggerFactory::getLogger(typeid(CmdCardAppendRecord));
92
96 static const std::map<const int, const std::shared_ptr<StatusProperties>> STATUS_TABLE;
97
101 static const CalypsoCardCommand mCommand;
102
106 const uint8_t mSfi;
107
111 const std::vector<uint8_t> mData;
112
116 static const std::map<const int, const std::shared_ptr<StatusProperties>> initStatusTable();
117};
118
119}
120}
121}
CmdCardAppendRecord(const std::shared_ptr< CalypsoCardAdapter > calypsoCard, const uint8_t sfi, const std::vector< uint8_t > &newRecordData)
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
void parseApduResponse(const std::shared_ptr< ApduResponseApi > apduResponse) override
AbstractApduCommand::StatusProperties StatusProperties