Keypop Reader C++ API 2.0.0
Reference Reader API for C++
Public Types | Public Member Functions | List of all members
keypop::reader::CardReaderEvent Class Referenceabstract

#include <CardReaderEvent.hpp>

Public Types

enum  Type { CARD_INSERTED , CARD_MATCHED , CARD_REMOVED , UNAVAILABLE }
 

Public Member Functions

virtual const std::string & getReaderName () const =0
 
virtual Type getType () const =0
 
virtual const std::shared_ptr< ScheduledCardSelectionsResponsegetScheduledCardSelectionsResponse () const =0
 

Detailed Description

Card event data container indicating a change of state.

Contains the event origin (reader name), the event type and possibly the card selection response (when available).

Since
1.0.0

Definition at line 30 of file CardReaderEvent.hpp.

Member Enumeration Documentation

◆ Type

Possible card events.

Since
1.0.0
Enumerator
CARD_INSERTED 

A card has been inserted with or without specific selection.

Since
1.0.0
CARD_MATCHED 

A card has been inserted that matches the selection.

Since
1.0.0
CARD_REMOVED 

The card has been removed from the reader.

Since
1.0.0
UNAVAILABLE 

The reader has become unavailable.

Since
1.0.0

Definition at line 37 of file CardReaderEvent.hpp.

Member Function Documentation

◆ getReaderName()

virtual const std::string & keypop::reader::CardReaderEvent::getReaderName ( ) const
pure virtual

Returns the name of the reader that generated the event.

Returns
A non-empty string.
Since
1.0.0

◆ getScheduledCardSelectionsResponse()

virtual const std::shared_ptr< ScheduledCardSelectionsResponse > keypop::reader::CardReaderEvent::getScheduledCardSelectionsResponse ( ) const
pure virtual

Returns the card selection responses when it is available and null in all other cases. It may be available when the event type is Type#CARD_INSERTED and always present when the event type is Type#CARD_MATCHED.

It is necessary to use the method keypop::reader::selection::CardSelectionManager ::parseScheduledCardSelectionsResponse(ScheduledCardSelectionsResponse) to analyze the result.

Returns
Null if the event is not carrying a ScheduledCardSelectionsResponse.
Since
1.0.0

◆ getType()

virtual Type keypop::reader::CardReaderEvent::getType ( ) const
pure virtual

Returns the reader event type.

Returns
A non-null value.
Since
1.0.0

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