![]() |
Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
|
#include <CardCommandManager.h>
Public Member Functions | |
CardCommandManager () | |
void | addRegularCommand (const std::shared_ptr< AbstractCardCommand > command) |
void | addStoredValueCommand (const std::shared_ptr< AbstractCardCommand > command, const SvOperation svOperation) |
void | notifyCommandsProcessed () |
const std::vector< std::shared_ptr< AbstractCardCommand > > & | getCardCommands () const |
bool | hasCommands () const |
bool | isSvOperationCompleteOneTime () |
(package-private)
Handles a list of AbstractCardCommand updated by the "prepare" methods of CardTransactionManager.
Keeps commands between the time the commands are created and the time their responses are parsed.
A flag (preparedCommandsProcessed) is used to manage the reset of the command list. It allows the commands to be kept until the application creates a new list of commands.
This flag is set when invoking the method notifyCommandsProcessed and reset when a new AbstractCardCommand is added.
Definition at line 47 of file CardCommandManager.h.
keyple::card::calypso::CardCommandManager::CardCommandManager | ( | ) |
(package-private)
Constructor
Definition at line 27 of file CardCommandManager.cpp.
void keyple::card::calypso::CardCommandManager::addRegularCommand | ( | const std::shared_ptr< AbstractCardCommand > | command | ) |
(package-private)
Add a regular command to the list.
command | the command. |
Definition at line 30 of file CardCommandManager.cpp.
void keyple::card::calypso::CardCommandManager::addStoredValueCommand | ( | const std::shared_ptr< AbstractCardCommand > | command, |
const SvOperation | svOperation | ||
) |
(package-private)
Add a StoredValue command to the list.
Set up a mini state machine to manage the scheduling of Stored Value commands.
The SvOperation and SvAction are also used to check the consistency of the SV process.
The svOperationPending flag is set when an SV operation (Reload/Debit/Undebit) command is added.
command | the StoredValue command. |
svOperation | the type of the current SV operation (Reload/Debit/Undebit). |
IllegalStateException | if the provided command is not an SV command or not properly used. |
Definition at line 35 of file CardCommandManager.cpp.
const std::vector< std::shared_ptr< AbstractCardCommand > > & keyple::card::calypso::CardCommandManager::getCardCommands | ( | ) | const |
(package-private)
Definition at line 79 of file CardCommandManager.cpp.
bool keyple::card::calypso::CardCommandManager::hasCommands | ( | ) | const |
(package-private)
Definition at line 84 of file CardCommandManager.cpp.
bool keyple::card::calypso::CardCommandManager::isSvOperationCompleteOneTime | ( | ) |
(package-private)
Indicates whether an SV Operation has been completed (Reload/Debit/Undebit requested)
This method is dedicated to triggering the signature verification after an SV transaction has been executed. It is a single-use method, as the flag is systematically reset to false after it is called.
Definition at line 89 of file CardCommandManager.cpp.
void keyple::card::calypso::CardCommandManager::notifyCommandsProcessed | ( | ) |
(package-private)
Informs that the commands have been processed.
Just record the information. The initialization of the list of commands will be done only the next time a command is added, this allows access to the commands contained in the list.
Definition at line 74 of file CardCommandManager.cpp.