Keyple Card Calypso C++ Library - 3.2.2
Component of the Keyple C++ middleware
CalypsoExtensionService.cpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional *
5 * information regarding copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the *
8 * terms of the Eclipse Public License 2.0 which is available at *
9 * http://www.eclipse.org/legal/epl-2.0 *
10 * *
11 * SPDX-License-Identifier: EPL-2.0 *
12 ******************************************************************************/
13
14#include "keyple/card/calypso/CalypsoExtensionService.hpp"
15
16#include "keyple/card/calypso/CalypsoCardApiFactoryAdapter.hpp"
17#include "keyple/core/common/CommonApiProperties.hpp"
18#include "keypop/card/CardApiProperties.hpp"
19#include "keypop/reader/ReaderApiProperties.hpp"
20
21namespace keyple {
22namespace card {
23namespace calypso {
24
25using keyple::core::common::CommonApiProperties_VERSION;
26using keypop::card::CardApiProperties_VERSION;
27using keypop::reader::ReaderApiProperties_VERSION;
28
29std::shared_ptr<CalypsoExtensionService> CalypsoExtensionService::mInstance;
30
31std::shared_ptr<CalypsoExtensionService>
32CalypsoExtensionService::getInstance()
33{
34 if (mInstance == nullptr) {
35 mInstance = std::shared_ptr<CalypsoExtensionService>(
36 new CalypsoExtensionService());
37 }
38
39 return mInstance;
40}
41
42std::shared_ptr<CalypsoCardApiFactory>
43CalypsoExtensionService::getCalypsoCardApiFactory()
44{
45 return std::make_shared<CalypsoCardApiFactoryAdapter>();
46}
47
48const std::string
49CalypsoExtensionService::getReaderApiVersion() const
50{
51 return ReaderApiProperties_VERSION;
52}
53
54const std::string
55CalypsoExtensionService::getCardApiVersion() const
56{
57 return CardApiProperties_VERSION;
58}
59
60const std::string
61CalypsoExtensionService::getCommonApiVersion() const
62{
63 return CommonApiProperties_VERSION;
64}
65
66} /* namespace calypso */
67} /* namespace card */
68} /* namespace keyple */