Keypop Card C++ API 2.0.0
Reference Card API for C++
Public Member Functions | Friends | List of all members
keypop::card::CardSelectionResponseApi Class Referenceabstract

#include <CardSelectionResponse.hpp>

Public Member Functions

virtual const std::string & getPowerOnData () const =0
 
virtual const std::shared_ptr< ApduResponseApigetSelectApplicationResponse () const =0
 
virtual bool hasMatched () const =0
 
virtual const std::shared_ptr< CardResponseApigetCardResponse () const =0
 

Friends

std::ostream & operator<< (std::ostream &os, const std::shared_ptr< CardSelectionResponseApi > csr)
 
std::ostream & operator<< (std::ostream &os, const std::vector< std::shared_ptr< CardSelectionResponseApi > > &csrs)
 

Detailed Description

Data from the start-up phase with the card: selection data and any additional responses.

Includes the status of the selection itself and the responses to any commands that may have been executed afterwards.

See also
org::calypsonet.terminal.card.spi.CardSelectionRequestSpi
Since
1.0.0

Definition at line 33 of file CardSelectionResponse.hpp.

Member Function Documentation

◆ getCardResponse()

virtual const std::shared_ptr< CardResponseApi > keypop::card::CardSelectionResponseApi::getCardResponse ( ) const
pure virtual

Gets the responses of the card to the requests present in the calypsonet::terminal::card::spi::CardRequestSpi from the calypsonet::terminal::card::spi::CardSelectionRequestSpi.

Returns
Null if no requests have been set.
Since
1.0.0

◆ getPowerOnData()

virtual const std::string & keypop::card::CardSelectionResponseApi::getPowerOnData ( ) const
pure virtual

Gets the card's power-on data.

The power-on data is defined as the data retrieved by the reader when the card is inserted.

In the case of a contact reader, this is the Answer To Reset data (ATR) defined by ISO7816.

In the case of a contactless reader, the reader decides what this data is.
Some contactless readers provide a virtual ATR (partially standardized by the PC/SC standard), but other devices can have their own definition, including for example elements from the anti-collision stage of the ISO14443 protocol (ATQA, ATQB, ATS, SAK, etc) or any proprietary definitions.

These data being variable from one reader to another, they are defined here in string format which can be either a hexadecimal string or any other relevant information.

Returns
Null if no power-on data is available.
Since
1.0.0

◆ getSelectApplicationResponse()

virtual const std::shared_ptr< ApduResponseApi > keypop::card::CardSelectionResponseApi::getSelectApplicationResponse ( ) const
pure virtual

Gets the calypsonet::terminal::card::ApduResponseApi received from the card in response to the Select Application command.

Returns
Null if no Select Application command was performed.
Since
1.0.0

◆ hasMatched()

virtual bool keypop::card::CardSelectionResponseApi::hasMatched ( ) const
pure virtual

Gives the selection process status.

Returns
True if the card inserted matches the selection filters.
Since
1.0.0

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  os,
const std::shared_ptr< CardSelectionResponseApi csr 
)
friend

Definition at line 88 of file CardSelectionResponse.hpp.

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  os,
const std::vector< std::shared_ptr< CardSelectionResponseApi > > &  csrs 
)
friend

Definition at line 100 of file CardSelectionResponse.hpp.


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