Keyple Card Generic C++ Library - 3.1.2
Component of the Keyple C++ middleware
GenericCardAdapter.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/generic/GenericCardAdapter.hpp"
15
16#include <memory>
17#include <string>
18#include <vector>
19
20namespace keyple {
21namespace card {
22namespace generic {
23
24GenericCardAdapter::GenericCardAdapter(
25 std::shared_ptr<CardSelectionResponseApi> cardSelectionResponse)
26: mSelectApplicationResponse(
27 cardSelectionResponse->getSelectApplicationResponse() != nullptr
28 ? cardSelectionResponse->getSelectApplicationResponse()->getApdu()
29 : std::vector<uint8_t>())
30, mPowerOnData(cardSelectionResponse->getPowerOnData())
31{
32}
33
34const std::string&
35GenericCardAdapter::getPowerOnData() const
36{
37 return mPowerOnData;
38}
39
40std::vector<uint8_t>
41GenericCardAdapter::getSelectApplicationResponse() const
42{
43 return mSelectApplicationResponse;
44}
45
46} /* namespace generic */
47} /* namespace card */
48} /* namespace keyple */