Keypop Reader C++ API 2.0.0
Reference Reader API for C++
Public Member Functions | List of all members
keypop::reader::selection::CommonIsoCardSelector< T > Class Template Referenceabstract

#include <CommonIsoCardSelector.hpp>

Inheritance diagram for keypop::reader::selection::CommonIsoCardSelector< T >:
Inheritance graph
[legend]
Collaboration diagram for keypop::reader::selection::CommonIsoCardSelector< T >:
Collaboration graph
[legend]

Public Member Functions

virtual T & filterByDfName (const std::vector< uint8_t > &aid)=0
 
virtual T & filterByDfName (const std::string &aid)=0
 
virtual T & setFileOccurrence (FileOccurrence fileOccurrence)=0
 
virtual T & setFileControlInformation (FileControlInformation fileControlInformation)=0
 
- Public Member Functions inherited from keypop::reader::selection::CardSelector< T >
virtual ~CardSelector ()=default
 
virtual T & filterByCardProtocol (const std::string &logicalProtocolName)=0
 
virtual T & filterByPowerOnData (const std::string &powerOnDataRegex)=0
 
- Public Member Functions inherited from keypop::reader::cpp::CardSelectorBase
virtual ~CardSelectorBase ()=default
 

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 40 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: