Keypop Reader C++ API 2.0.0
Reference Reader API for C++
Public Types | 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 Types

enum class  FileControlInformation { FCI , FCP , FMD , NO_RESPONSE }
 
enum class  FileOccurrence { FIRST , LAST , NEXT , PREVIOUS }
 

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 T & filterByCardProtocol (const std::string &logicalProtocolName)=0
 
virtual T & filterByPowerOnData (const std::string &powerOnDataRegex)=0
 

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 36 of file CommonIsoCardSelector.hpp.

Member Enumeration Documentation

◆ FileControlInformation

template<typename T >
enum class keypop::reader::selection::CommonIsoCardSelector< T >::FileControlInformation
strong

Types of templates available in return for the Select Application command, according to the ISO7816-4 standard.

Since
2.0.0
Enumerator
FCI 

File control information.

Since
2.0.0
FCP 

File control parameters.

Since
2.0.0
FMD 

File management data.

Since
2.0.0
NO_RESPONSE 

No response expected.

Since
2.0.0

Definition at line 44 of file CommonIsoCardSelector.hpp.

◆ FileOccurrence

template<typename T >
enum class keypop::reader::selection::CommonIsoCardSelector< T >::FileOccurrence
strong

Navigation options through the different applications contained in the card according to the ISO7816-4 standard.

Since
2.0.0
Enumerator
FIRST 

First occurrence.

Since
2.0.0
LAST 

Last occurrence.

Since
2.0.0
NEXT 

Next occurrence.

Since
2.0.0
PREVIOUS 

Previous occurrence.

Since
2.0.0

Definition at line 80 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: