Keypop Reader C++ API - 2.1.0
Component of the Keypop C++ API
keypop::reader::CardReaderEvent Class Referenceabstract

Card event data container indicating a change of state. More...

#include <keypop/reader/CardReaderEvent.hpp>

Public Types

enum  Type { CARD_INSERTED , CARD_MATCHED , CARD_REMOVED , UNAVAILABLE }
 Possible card events. More...
 

Public Member Functions

virtual const std::string & getReaderName () const =0
 Returns the name of the reader that generated the event. More...
 
virtual Type getType () const =0
 Returns the reader event type. More...
 
virtual const std::shared_ptr< ScheduledCardSelectionsResponse > getScheduledCardSelectionsResponse () const =0
 Returns the card selection responses when it is available and null in all other cases. More...
 

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 35 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 42 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: