Keypop Reader C++ API - 2.1.0
Component of the Keypop C++ API
ConfigurableCardReader.hpp
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 MIT License which is available at *
9 * https://opensource.org/licenses/MIT *
10 * *
11 * SPDX-License-Identifier: MIT *
12 ******************************************************************************/
13
14#pragma once
15
16#include <string>
17
19
20namespace keypop {
21namespace reader {
22
28class ConfigurableCardReader : virtual public CardReader {
29public:
33 virtual ~ConfigurableCardReader() = default;
34
66 virtual void activateProtocol(
67 const std::string& physicalProtocolName,
68 const std::string& logicalProtocolName) = 0;
69
83 virtual void deactivateProtocol(const std::string& physicalProtocolName)
84 = 0;
85
94 virtual const std::string& getCurrentProtocol() const = 0;
95};
96
97} /* namespace reader */
98} /* namespace keypop */
Card reader driving the underlying hardware to manage the card detection.
Definition: CardReader.hpp:26
Configurable card reader providing the methods to manage the card protocols.
virtual void activateProtocol(const std::string &physicalProtocolName, const std::string &logicalProtocolName)=0
Activates the reader communication protocol by associating the provided physical communication protoc...
virtual const std::string & getCurrentProtocol() const =0
Returns the name of the physical protocol currently used by the reader.
virtual void deactivateProtocol(const std::string &physicalProtocolName)=0
Deactivates the provided reader communication protocol.