Keypop Reader C++ API - 2.1.0
Component of the Keypop C++ API
keypop::reader::selection::CommonIsoCardSelector< T > Class Template Referenceabstract

Common ISO filters used to restrict the selection process to certain ISO 7816-4 cards. More...

#include <keypop/reader/selection/CommonIsoCardSelector.hpp>

Inheritance diagram for keypop::reader::selection::CommonIsoCardSelector< T >:
Collaboration diagram for keypop::reader::selection::CommonIsoCardSelector< T >:

Public Member Functions

virtual T & filterByDfName (const std::vector< uint8_t > &aid)=0
 Selects a card application DF by its name. More...
 
virtual T & filterByDfName (const std::string &aid)=0
 Selects a card application DF by its name. More...
 
virtual T & setFileOccurrence (FileOccurrence fileOccurrence)=0
 Sets the file occurrence mode (see ISO7816-4). More...
 
virtual T & setFileControlInformation (FileControlInformation fileControlInformation)=0
 Sets the file control mode (see ISO7816-4). More...
 
- Public Member Functions inherited from keypop::reader::selection::CardSelector< T >
virtual ~CardSelector ()=default
 Virtual destructor. More...
 
virtual T & filterByCardProtocol (const std::string &logicalProtocolName)=0
 Restricts the selection process to cards communicating with the reader according to a specific protocol, corresponding to the underlying technology: ISO14443-A, ISO14443-B or any other proprietary or standardized communication technology. More...
 
virtual T & filterByPowerOnData (const std::string &powerOnDataRegex)=0
 Restricts the selection process to cards whose power-on data provided by the reader matches a specific regular expression. More...
 
- Public Member Functions inherited from keypop::reader::cpp::CardSelectorBase
virtual ~CardSelectorBase ()=default
 virtual destructor. More...
 

Detailed Description

template<typename T>
class keypop::reader::selection::CommonIsoCardSelector< T >

Common ISO filters used to restrict the selection process to certain ISO 7816-4 cards.

These filters are all optional but can also be combined.

If no filtering is specified, any card that responds when inserted in the reader will be considered selected.

Conversely, if one or more filters have been defined, the card will not be selected if one of them rejects the card.

Parameters
<T>The type of the lowest level child object.
Since
2.0.0

Definition at line 43 of file CommonIsoCardSelector.hpp.

Member Function Documentation

◆ filterByDfName() [1/2]

template<typename T >
virtual T & keypop::reader::selection::CommonIsoCardSelector< T >::filterByDfName ( const std::string &  aid)
pure virtual

Selects a card application DF by its name.

The DF is selected only if its name starts with the provided AID, as defined by ISO7816-4 chapter 4.2.

The provided AID will be used as a parameter of the "Selection Application" ISO card command.

Parameters
aidThe AID as a hexadecimal string of 5 to 16 bytes.
Returns
The current instance.
Exceptions
IllegalArgumentExceptionIf the provided string is null, invalid or out of range.
Since
2.0.0

◆ filterByDfName() [2/2]

template<typename T >
virtual T & keypop::reader::selection::CommonIsoCardSelector< T >::filterByDfName ( const std::vector< uint8_t > &  aid)
pure virtual

Selects a card application DF by its name.

The DF is selected only if its name starts with the provided AID, as defined by ISO7816-4 chapter 4.2.

The provided AID will be used as a parameter of the "Selection Application" ISO card command.

Parameters
aidThe AID as a byte array containing 5 to 16 bytes.
Returns
The current instance.
Exceptions
IllegalArgumentExceptionIf the provided array is null or out of range.
Since
2.0.0

◆ setFileControlInformation()

template<typename T >
virtual T & keypop::reader::selection::CommonIsoCardSelector< T >::setFileControlInformation ( FileControlInformation  fileControlInformation)
pure virtual

Sets the file control mode (see ISO7816-4).

The default value is FileControlInformation#FCI.

Parameters
fileControlInformationThe FileControlInformation.
Returns
The current instance.
Exceptions
IllegalArgumentExceptionIf fileControlInformation is null.
Since
2.0.0

◆ setFileOccurrence()

template<typename T >
virtual T & keypop::reader::selection::CommonIsoCardSelector< T >::setFileOccurrence ( FileOccurrence  fileOccurrence)
pure virtual

Sets the file occurrence mode (see ISO7816-4).

The default value is FileOccurrence#FIRST.

Parameters
fileOccurrenceThe FileOccurrence.
Returns
The current instance.
Exceptions
IllegalArgumentExceptionIf fileOccurrence is null.
Since
2.0.0

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