Keypop Reader C++ API 2.0.0
Reference Reader API for C++
Public Member Functions | List of all members
keypop::reader::ConfigurableCardReader Class Referenceabstract

#include <ConfigurableCardReader.hpp>

Inheritance diagram for keypop::reader::ConfigurableCardReader:
Inheritance graph
[legend]
Collaboration diagram for keypop::reader::ConfigurableCardReader:
Collaboration graph
[legend]

Public Member Functions

virtual ~ConfigurableCardReader ()=default
 
virtual void activateProtocol (const std::string &physicalProtocolName, const std::string &logicalProtocolName)=0
 
virtual void deactivateProtocol (const std::string &physicalProtocolName)=0
 
virtual const std::string & getCurrentProtocol () const =0
 
- Public Member Functions inherited from keypop::reader::CardReader
virtual ~CardReader ()=default
 
virtual const std::string & getName () const =0
 
virtual bool isContactless ()=0
 
virtual bool isCardPresent ()=0
 

Detailed Description

Configurable card reader providing the methods to manage the card protocols.

Since
1.0.0

Definition at line 24 of file ConfigurableCardReader.hpp.

Constructor & Destructor Documentation

◆ ~ConfigurableCardReader()

virtual keypop::reader::ConfigurableCardReader::~ConfigurableCardReader ( )
virtualdefault

Member Function Documentation

◆ activateProtocol()

virtual void keypop::reader::ConfigurableCardReader::activateProtocol ( const std::string &  physicalProtocolName,
const std::string &  logicalProtocolName 
)
pure virtual

Activates the reader communication protocol by associating the provided physical communication protocol name and the logical communication protocol name defined by the application.

  • Activates the detection of cards using the provided reader communication protocol.
  • Internally associates the two strings provided as arguments.

The association between the communication protocol name known by the reader and the communication protocol name defined by the application is intended to manage non-ISO cards. It allows a unique protocol name to be set when constructing a card selector as defined by the Keypop Card API regardless of the type of reader that will be used.

Parameters
physicalProtocolNameThe name of the physical communication protocol as known by the reader. See the reader documentation for the list of supported communication protocols.
logicalProtocolNameThe name of the logical protocol associated with the cards detected with the physical protocol also provided. This name can be used by the application to perform filtering at the time of selection.
Exceptions
IllegalArgumentExceptionIf one of the provided communication protocols is null or empty.
ReaderProtocolNotSupportedExceptionIf the reader communication protocol is not supported.
Since
1.0.0

◆ deactivateProtocol()

virtual void keypop::reader::ConfigurableCardReader::deactivateProtocol ( const std::string &  physicalProtocolName)
pure virtual

Deactivates the provided reader communication protocol. Inhibits the detection of cards using this reader communication protocol.

Parameters
physicalProtocolNameThe name of the physical communication protocol as known by the reader. See the reader documentation for the list of supported communication protocols.
Exceptions
IllegalArgumentExceptionIf the provided reader communication protocol is null or empty.
ReaderProtocolNotSupportedExceptionIf the reader communication protocol is not supported.
Since
1.0.0

◆ getCurrentProtocol()

virtual const std::string & keypop::reader::ConfigurableCardReader::getCurrentProtocol ( ) const
pure virtual

Returns the name of the physical protocol currently used by the reader.

Returns
Null if no selection has been made yet or if no protocol has been activated.
See also
activateProtocol(const std::string&, const std::string&)
Since
1.2.0

The documentation for this class was generated from the following file: