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

#include <PoSelectionRequest.h>

Inherits keyple::core::selection::AbstractSeSelectionRequest< AbstractPoCommandBuilder< AbstractPoResponseParser > >.

Public Member Functions

 PoSelectionRequest (std::shared_ptr< PoSelector > poSelector)
 
void prepareReadRecordFile (const uint8_t sfi, const uint8_t recordNumber)
 
void prepareSelectFile (const std::vector< uint8_t > &lid)
 
void prepareSelectFile (const uint16_t lid)
 
void prepareSelectFile (const SelectFileControl selectControl)
 
const std::shared_ptr< AbstractMatchingSeparse (std::shared_ptr< SeResponse > seResponse) override
 
- Public Member Functions inherited from keyple::core::selection::AbstractSeSelectionRequest< AbstractPoCommandBuilder< AbstractPoResponseParser > >
 AbstractSeSelectionRequest (std::shared_ptr< SeSelector > seSelector)
 
virtual ~AbstractSeSelectionRequest ()=default
 
virtual std::shared_ptr< SeRequestgetSelectionRequest ()
 
virtual std::shared_ptr< SeSelectorgetSeSelector ()
 
void addCommandBuilder (std::shared_ptr< AbstractPoCommandBuilder< AbstractPoResponseParser > > commandBuilder)
 
const std::vector< std::shared_ptr< AbstractPoCommandBuilder< AbstractPoResponseParser > > > getCommandBuilders () const
 

Additional Inherited Members

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

Detailed Description

Specialized selection request to manage the specific characteristics of Calypso POs

Constructor & Destructor Documentation

◆ PoSelectionRequest()

keyple::calypso::transaction::PoSelectionRequest::PoSelectionRequest ( std::shared_ptr< PoSelector poSelector)

Constructor.

Parameters
poSelectorthe selector to target a particular SE

Member Function Documentation

◆ parse()

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

Create a CalypsoPo object containing the selection data received from the plugin

C++ vs. Java: function is protected in Java

Parameters
seResponsethe SE response received
Returns
a keyple::calypso::transaction::CalypsoPo
Exceptions
CalypsoDesynchronizedExchangesExceptionif the number of responses is different from the number of requests
CalypsoPoCommandExceptionif a response from the PO was unexpected

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

Implements keyple::core::selection::AbstractSeSelectionRequest< AbstractPoCommandBuilder< AbstractPoResponseParser > >.

◆ prepareReadRecordFile()

void keyple::calypso::transaction::PoSelectionRequest::prepareReadRecordFile ( const uint8_t  sfi,
const uint8_t  recordNumber 
)

Read a single record from the indicated EF

Parameters
sfithe SFI of the EF to read
recordNumberthe record number to read
Exceptions
IllegalArgumentExceptionif one of the provided argument is out of range

◆ prepareSelectFile() [1/3]

void keyple::calypso::transaction::PoSelectionRequest::prepareSelectFile ( const SelectFileControl  selectControl)

Prepare a select file ApduRequest to be executed following the selection.

Parameters
selectControlprovides the navigation case: FIRST, NEXT or CURRENT

◆ prepareSelectFile() [2/3]

void keyple::calypso::transaction::PoSelectionRequest::prepareSelectFile ( const std::vector< uint8_t > &  lid)

Prepare a select file ApduRequest to be executed following the selection.

Parameters
lidLID of the EF to select as a byte array
Exceptions
IllegalArgumentExceptionif the argument is not an array of 2 bytes

◆ prepareSelectFile() [3/3]

void keyple::calypso::transaction::PoSelectionRequest::prepareSelectFile ( const uint16_t  lid)

Prepare a select file ApduRequest to be executed following the selection.

Parameters
lidLID of the EF to select as a byte array
Exceptions
IllegalArgumentExceptionif the argument is not an array of 2 bytes

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