Keypop Card C++ API 2.0.0
Reference Card API for C++
|
#include <ProxyReaderApi.hpp>
Public Member Functions | |
virtual | ~ProxyReaderApi ()=default |
virtual const std::shared_ptr< CardResponseApi > | transmitCardRequest (const std::shared_ptr< CardRequestSpi > cardRequest, const ChannelControl channelControl)=0 |
virtual void | releaseChannel ()=0 |
Reader able to transmit card requests and having control over the physical channel.
Backside of the keypop::reader::CardReader interface present in the Terminal Reader API.
An adapter of this interface must also implement CardReader.
To use this API, simply cast a CardReader as a ProxyReaderApi.
Definition at line 33 of file ProxyReaderApi.hpp.
|
virtualdefault |
|
pure virtual |
Releases the communication channel previously established with the card.
ReaderBrokenCommunicationException | If the communication with the reader has failed. |
|
pure virtual |
Transmits a keypop::card::CardRequestSpi, applies the provided keypop::card::ChannelControl policy and returns a keypop::card::CardResponseApi.
The APDUs (keypop::card::spi::ApduRequestSpi) contained in the keypop::card::CardRequestSpi are sent to the card, their responses (keypop::card::ApduResponseApi) are added to a new list (keypop::card::CardResponseApi).
Note: in case of an error when sending an APDU (communication error, unexpected status word), an keypop::card::AbstractApduException exception is thrown. Any responses from previously transmitted APDU commands are attached to this exception.
This allows the calling application to be tolerant to card tearing and to retrieve the partial response to the keypop::card::CardRequestSpi or to have strict control over the APDUs sent to the card (see keypop::card::CardRequestSpi::stopOnUnsuccessfulStatusWord()).
cardRequest | The card request. |
channelControl | The channel control policy to apply. |
IllegalArgumentException | If one of the provided parameters is null. |
ReaderBrokenCommunicationException | If the communication with the reader has failed. |
CardBrokenCommunicationException | If the communication with the card has failed. |
UnexpectedStatusWordException | If any of the APDUs returned an unexpected status word and the card request specified the need to check them. |