Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
Public Member Functions | List of all members
keyple::card::calypso::CardCommandManager Class Reference

#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 ()
 

Detailed Description

(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.

Since
2.0.0

Definition at line 47 of file CardCommandManager.h.

Constructor & Destructor Documentation

◆ CardCommandManager()

keyple::card::calypso::CardCommandManager::CardCommandManager ( )

(package-private)
Constructor

Definition at line 27 of file CardCommandManager.cpp.

Member Function Documentation

◆ addRegularCommand()

void keyple::card::calypso::CardCommandManager::addRegularCommand ( const std::shared_ptr< AbstractCardCommand command)

(package-private)
Add a regular command to the list.

Parameters
commandthe command.
Since
2.0.0

Definition at line 30 of file CardCommandManager.cpp.

◆ addStoredValueCommand()

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.

Parameters
commandthe StoredValue command.
svOperationthe type of the current SV operation (Reload/Debit/Undebit).
Exceptions
IllegalStateExceptionif the provided command is not an SV command or not properly used.
Since
2.0.0

Definition at line 35 of file CardCommandManager.cpp.

◆ getCardCommands()

const std::vector< std::shared_ptr< AbstractCardCommand > > & keyple::card::calypso::CardCommandManager::getCardCommands ( ) const

(package-private)

Returns
The current AbstractCardCommand list
Since
2.0.0

Definition at line 79 of file CardCommandManager.cpp.

◆ hasCommands()

bool keyple::card::calypso::CardCommandManager::hasCommands ( ) const

(package-private)

Returns
True if the CardCommandManager has commands
Since
2.0.0

Definition at line 84 of file CardCommandManager.cpp.

◆ isSvOperationCompleteOneTime()

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.

Returns
True if a "reload" or "debit" command has been requested
Since
2.0.0

Definition at line 89 of file CardCommandManager.cpp.

◆ notifyCommandsProcessed()

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.

Since
2.0.0

Definition at line 74 of file CardCommandManager.cpp.


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