Keypop Card C++ API - 2.0.1
Component of the Keypop C++ API
ChannelControl.hpp
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3
* *
4
* This program and the accompanying materials are made available under the *
5
* terms of the MIT License which is available at *
6
* https://opensource.org/licenses/MIT. *
7
* *
8
* SPDX-License-Identifier: MIT *
9
******************************************************************************/
10
11
#pragma once
12
13
#include <stdexcept>
14
15
namespace
keypop
{
16
namespace
card {
17
23
enum class
ChannelControl
{
29
KEEP_OPEN
,
30
38
CLOSE_AFTER
39
};
40
50
inline
ChannelControl
51
valueOf
(
const
int
value) {
52
switch
(value) {
53
case
static_cast<
int
>
(
ChannelControl::KEEP_OPEN
):
54
return
ChannelControl::KEEP_OPEN
;
55
case
static_cast<
int
>
(
ChannelControl::CLOSE_AFTER
):
56
return
ChannelControl::CLOSE_AFTER
;
57
default
:
58
throw
std::invalid_argument(
"invalid ChannelControl value"
);
59
}
60
}
61
62
}
/* namespace card */
63
}
/* namespace keypop */
keypop::card::ChannelControl
ChannelControl
Policy for managing the physical channel after a card request is executed.
Definition:
ChannelControl.hpp:23
keypop::card::ChannelControl::CLOSE_AFTER
@ CLOSE_AFTER
Terminates communication with the card.
keypop::card::ChannelControl::KEEP_OPEN
@ KEEP_OPEN
Leaves the physical channel open.
keypop::card::valueOf
ChannelControl valueOf(const int value)
Returns the enum constant of this type with the specified value.
Definition:
ChannelControl.hpp:51
keypop
Definition:
AbstractApduException.hpp:19
keypop
card
ChannelControl.hpp
Generated by
1.9.2