Keyple Card Generic C++ Library - 4.0.0
Component of the Keyple C++ middleware
GenericCardApiFactoryAdapter.cpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2026 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/generic/GenericCardApiFactoryAdapter.hpp"
15
16#include <memory>
17
18#include "keyple/card/generic/CardTransactionManagerAdapter.hpp"
19#include "keyple/card/generic/GenericCardSelectionExtensionAdapter.hpp"
20
21namespace keyple {
22namespace card {
23namespace generic {
24
25std::unique_ptr<GenericCardSelectionExtension>
26GenericCardApiFactoryAdapter::createGenericCardSelectionExtension()
27{
28 return std::unique_ptr<GenericCardSelectionExtensionAdapter>(
29 new GenericCardSelectionExtensionAdapter());
30}
31
32std::unique_ptr<CardTransactionManager>
33GenericCardApiFactoryAdapter::createCardTransaction(
34 const std::shared_ptr<CardReader>& cardReader,
35 const std::shared_ptr<SmartCard>& card)
36{
37 return std::unique_ptr<CardTransactionManagerAdapter>(
38 new CardTransactionManagerAdapter(cardReader, card));
39}
40
41} /* namespace generic */
42} /* namespace card */
43} /* namespace keyple */