Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | Friends | List of all members
keyple::core::seproxy::SeReader Class Referenceabstract

#include <SeReader.h>

Inherits keyple::core::seproxy::ProxyElement.

Inherited by keyple::core::seproxy::event::ObservableReader [virtual], and keyple::core::seproxy::message::ProxyReader [virtual].

Public Member Functions

virtual ~SeReader ()
 
virtual bool isSePresent ()=0
 
virtual void addSeProtocolSetting (std::shared_ptr< SeProtocol > seProtocol, const std::string &protocolRule)=0
 
virtual void setSeProtocolSetting (const std::map< std::shared_ptr< SeProtocol >, std::string > &protocolSetting)=0
 
virtual const TransmissionModegetTransmissionMode () const =0
 
virtual bool operator== (const SeReader &o) const
 
- Public Member Functions inherited from keyple::core::seproxy::ProxyElement
virtual ~ProxyElement ()=default
 
virtual const std::string & getName () const =0
 
virtual const std::map< const std::string, const std::string > & getParameters () const =0
 
virtual void setParameter (const std::string &key, const std::string &value)=0
 
virtual void setParameters (const std::map< const std::string, const std::string > &parameters)
 

Friends

std::ostream & operator<< (std::ostream &os, const std::shared_ptr< SeReader > sr)
 

Detailed Description

SeReader interface

Interface used by applications processing SE.

Constructor & Destructor Documentation

◆ ~SeReader()

virtual keyple::core::seproxy::SeReader::~SeReader ( )
inlinevirtual

Member Function Documentation

◆ addSeProtocolSetting()

virtual void keyple::core::seproxy::SeReader::addSeProtocolSetting ( std::shared_ptr< SeProtocol seProtocol,
const std::string &  protocolRule 
)
pure virtual

A protocol setting is an association that establish the link between a protocol identifier and a String that defines how a particular SE may match this protocol.

For example:

for a PC/SC plugin the String is defined as a regular expression that will be applied to the ATR in order to identify which type of SE is currently communicating.

for another plugin (e.g. NFC or proprietary plugin) the String would be any specific word to match a value handled by the low level API of the reader (e.g. "NfcA", "NfcB", "MifareClassic", etc)

A reader plugin will handle a list of protocol settings in order to target multiple types of SE.

Parameters
seProtocolthe protocol key identifier to be added to the plugin internal list
protocolRulea string use to define how to identify the protocol

Implemented in keyple::core::seproxy::plugin::AbstractLocalReader.

◆ getTransmissionMode()

virtual const TransmissionMode& keyple::core::seproxy::SeReader::getTransmissionMode ( ) const
pure virtual
Returns
the transmission mode in use with this SE reader

Implemented in keyple::plugin::stub::StubReaderImpl, and keyple::plugin::pcsc::PcscReaderImpl.

◆ isSePresent()

virtual bool keyple::core::seproxy::SeReader::isSePresent ( )
pure virtual

Checks if is SE present.

Returns
true if a Secure Element is present in the reader
Exceptions
KeypleReaderIOExceptionif the communication with the reader or the SE has failed

Implemented in keyple::core::seproxy::plugin::AbstractObservableLocalReader, and keyple::core::seproxy::plugin::AbstractLocalReader.

◆ operator==()

virtual bool keyple::core::seproxy::SeReader::operator== ( const SeReader o) const
inlinevirtual

◆ setSeProtocolSetting()

virtual void keyple::core::seproxy::SeReader::setSeProtocolSetting ( const std::map< std::shared_ptr< SeProtocol >, std::string > &  protocolSetting)
pure virtual

Complete the current setting map with the provided map

Parameters
protocolSettingthe protocol setting map

Implemented in keyple::core::seproxy::plugin::AbstractLocalReader.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const std::shared_ptr< SeReader sr 
)
friend

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