Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | List of all members
keyple::calypso::transaction::SamSelectionRequest Class Reference

#include <SamSelectionRequest.h>

Inherits keyple::core::selection::AbstractSeSelectionRequest< AbstractSamCommandBuilder< AbstractSamResponseParser > >.

Public Member Functions

 SamSelectionRequest (std::shared_ptr< SamSelector > samSelector)
 
const std::shared_ptr< AbstractMatchingSeparse (std::shared_ptr< SeResponse > seResponse) override
 
- Public Member Functions inherited from keyple::core::selection::AbstractSeSelectionRequest< AbstractSamCommandBuilder< AbstractSamResponseParser > >
 AbstractSeSelectionRequest (std::shared_ptr< SeSelector > seSelector)
 
virtual ~AbstractSeSelectionRequest ()=default
 
virtual std::shared_ptr< SeRequestgetSelectionRequest ()
 
virtual std::shared_ptr< SeSelectorgetSeSelector ()
 
void addCommandBuilder (std::shared_ptr< AbstractSamCommandBuilder< AbstractSamResponseParser > > commandBuilder)
 
const std::vector< std::shared_ptr< AbstractSamCommandBuilder< AbstractSamResponseParser > > > getCommandBuilders () const
 

Additional Inherited Members

- Public Attributes inherited from keyple::core::selection::AbstractSeSelectionRequest< AbstractSamCommandBuilder< AbstractSamResponseParser > >
const std::shared_ptr< SeSelectormSeSelector
 

Detailed Description

Specialized selection request to manage the specific characteristics of Calypso SAMs
Beyond the creation of a keyple::calypso::transaction::CalypsoSam object, this class also allows to execute a command to Unlock the SAM if unlockData are present in the keyple::calypso::transaction::SamSelector.
This unlock command is currently the only one allowed during the SAM selection process.

Constructor & Destructor Documentation

◆ SamSelectionRequest()

keyple::calypso::transaction::SamSelectionRequest::SamSelectionRequest ( std::shared_ptr< SamSelector samSelector)
explicit

Create a keyple::calypso::transaction::SamSelectionRequest

Parameters
samSelectorthe SAM selector

Member Function Documentation

◆ parse()

const std::shared_ptr< AbstractMatchingSe > keyple::calypso::transaction::SamSelectionRequest::parse ( std::shared_ptr< SeResponse seResponse)
overridevirtual

Create a CalypsoSam object containing the selection data received from the plugin
If an Unlock command has been prepared, its status is checked.

Parameters
seResponsethe SE response received
Returns
a keyple::calypso::transaction::CalypsoSam
Exceptions
CalypsoDesynchronizedExchangesExceptionif the APDU SAM exchanges are out of sync
CalypsoSamCommandExceptionif the SAM has responded with an error status

Return type should be std::shared_ptr<CalypsoSam> ... but invalid covariant return type

Implements keyple::core::selection::AbstractSeSelectionRequest< AbstractSamCommandBuilder< AbstractSamResponseParser > >.


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