Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CalypsoExtensionService.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 <string>
17
18/* Calypsonet Terminal Calypso */
19#include "CalypsoCard.h"
20#include "CalypsoCardSelection.h"
21#include "CalypsoSamSelection.h"
22#include "CardSecuritySetting.h"
23#include "CardTransactionManager.h"
24#include "SearchCommandData.h"
25
26/* Keyple Card Calypso */
31
32/* Keyple Core Common */
33#include "KeypleCardExtension.h"
34
35/* Keyple Core Service */
36#include "CardResourceProfileExtension.h"
37
38namespace keyple {
39namespace card {
40namespace calypso {
41
42using namespace calypsonet::terminal::calypso::card;
43using namespace calypsonet::terminal::calypso::sam;
44using namespace calypsonet::terminal::calypso::transaction;
45using namespace keyple::core::common;
46using namespace keyple::core::service::resource::spi;
47
48
54class KEYPLECARDCALYPSO_API CalypsoExtensionService final : public KeypleCardExtension {
55public:
59 static const std::string PRODUCT_TYPE;
60
61 // static {
62 // // Register additional JSON adapters.
63 // JsonUtil.registerTypeAdapter(
64 // DirectoryHeader.class, new DirectoryHeaderJsonDeserializerAdapter(), false);
65 // JsonUtil.registerTypeAdapter(
66 // ElementaryFile.class, new ElementaryFileJsonDeserializerAdapter(), false);
67 // JsonUtil.registerTypeAdapter(FileHeader.class, new FileHeaderJsonDeserializerAdapter(), false);
68 // JsonUtil.registerTypeAdapter(
69 // SvLoadLogRecord.class, new SvLoadLogRecordJsonDeserializerAdapter(), false);
70 // JsonUtil.registerTypeAdapter(
71 // SvDebitLogRecord.class, new SvDebitLogRecordJsonDeserializerAdapter(), false);
72 // }
73
80 static std::shared_ptr<CalypsoExtensionService> getInstance();
81
87 const std::string& getReaderApiVersion() const override;
88
94 const std::string& getCardApiVersion() const override;
95
101 const std::string& getCommonApiVersion() const override;
102
110 std::shared_ptr<SearchCommandData> createSearchCommandData() const;
111
119 std::shared_ptr<CalypsoCardSelection> createCardSelection() const;
120
127 std::shared_ptr<CalypsoSamSelection> createSamSelection() const;
128
141 std::shared_ptr<CardResourceProfileExtension> createSamResourceProfileExtension(
142 const std::shared_ptr<CalypsoSamSelection> calypsoSamSelection) const;
143
151 std::shared_ptr<CardSecuritySetting> createCardSecuritySetting() const;
152
168 std::shared_ptr<CardTransactionManager> createCardTransaction(
169 std::shared_ptr<CardReader> reader,
170 const std::shared_ptr<CalypsoCard> calypsoCard,
171 const std::shared_ptr<CardSecuritySetting> cardSecuritySetting);
172
183 std::shared_ptr<CardTransactionManager> createCardTransactionWithoutSecurity(
184 std::shared_ptr<CardReader> reader, const std::shared_ptr<CalypsoCard> calypsoCard);
185
186private:
190 static std::shared_ptr<CalypsoExtensionService> mInstance;
191
192
197};
198
199}
200}
201}
#define KEYPLECARDCALYPSO_API