Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
keyple::plugin::pcsc::PcscPluginImpl Class Reference

#include <PcscPluginImpl.h>

Inherits keyple::core::seproxy::plugin::AbstractThreadedObservablePlugin, and keyple::plugin::pcsc::PcscPlugin.

Public Member Functions

const std::map< const std::string, const std::string > & getParameters () const override
 
void setParameter (const std::string &key, const std::string &value) override
 
virtual const std::string & getName () const final
 
virtual void setParameters (const std::map< const std::string, const std::string > &parameters) final
 
- Public Member Functions inherited from keyple::core::seproxy::plugin::AbstractThreadedObservablePlugin
void addObserver (const std::shared_ptr< ObservablePlugin::PluginObserver > observer) final
 
void removeObserver (const std::shared_ptr< ObservablePlugin::PluginObserver > observer) final
 
void clearObservers () final
 
virtual ~AbstractThreadedObservablePlugin ()
 
- Public Member Functions inherited from keyple::core::seproxy::plugin::AbstractObservablePlugin
virtual int countObservers () const final
 
virtual void notifyObservers (const std::shared_ptr< PluginEvent > event) final
 
- Public Member Functions inherited from keyple::core::seproxy::plugin::AbstractPlugin
virtual ConcurrentMap< const std::string, std::shared_ptr< SeReader > > & getReaders () override
 
virtual const std::set< std::string > getReaderNames () const override
 
const std::shared_ptr< SeReadergetReader (const std::string &name) final
 
const std::string & getName () const
 
- Public Member Functions inherited from keyple::core::seproxy::plugin::AbstractSeProxyComponent
 AbstractSeProxyComponent (const std::string &name)
 
virtual ~AbstractSeProxyComponent ()=default
 
const std::string & getName () const
 
void setParameters (const std::map< const std::string, const std::string > &parameters)
 
- Public Member Functions inherited from keyple::core::seproxy::ReaderPlugin
virtual ~ReaderPlugin ()=default
 
- Public Member Functions inherited from keyple::core::seproxy::ProxyElement
virtual ~ProxyElement ()=default
 
- Public Member Functions inherited from keyple::core::seproxy::plugin::ObservablePluginNotifier
virtual ~ObservablePluginNotifier ()=default
 
- Public Member Functions inherited from keyple::core::seproxy::event::ObservablePlugin
virtual ~ObservablePlugin ()=default
 
virtual void addObserver (const std::shared_ptr< PluginObserver > observer)=0
 
virtual void removeObserver (const std::shared_ptr< PluginObserver > observer)=0
 

Static Public Member Functions

static std::shared_ptr< PcscPluginImplgetInstance ()
 

Public Attributes

std::set< std::string > nativeReadersNames
 

Protected Member Functions

const std::set< std::string > & fetchNativeReadersNames () override
 
ConcurrentMap< const std::string, std::shared_ptr< SeReader > > & initNativeReaders () override
 
std::shared_ptr< SeReaderfetchNativeReader (const std::string &name) override
 
- Protected Member Functions inherited from keyple::core::seproxy::plugin::AbstractThreadedObservablePlugin
 AbstractThreadedObservablePlugin (const std::string &name)
 
bool isMonitoring ()
 
- Protected Member Functions inherited from keyple::core::seproxy::plugin::AbstractObservablePlugin
 AbstractObservablePlugin (const std::string &name)
 
virtual ~AbstractObservablePlugin ()=default
 
- Protected Member Functions inherited from keyple::core::seproxy::plugin::AbstractPlugin
 AbstractPlugin (const std::string &name)
 
virtual ~AbstractPlugin ()=default
 

Additional Inherited Members

- Static Public Attributes inherited from keyple::plugin::pcsc::PcscPlugin
static const std::string PLUGIN_NAME = "PcscPlugin"
 
- Protected Attributes inherited from keyple::core::seproxy::plugin::AbstractThreadedObservablePlugin
long long mThreadWaitTimeout = SETTING_THREAD_TIMEOUT_DEFAULT
 
- Protected Attributes inherited from keyple::core::seproxy::plugin::AbstractPlugin
ConcurrentMap< const std::string, std::shared_ptr< SeReader > > mNativeReaders
 

Member Function Documentation

◆ fetchNativeReader()

std::shared_ptr< SeReader > keyple::plugin::pcsc::PcscPluginImpl::fetchNativeReader ( const std::string &  name)
overrideprotectedvirtual

Fetch the reader whose name is provided as an argument. Returns the current reader if it is already listed. Creates and returns a new reader if not.

Throws an exception if the wanted reader is not found.

Parameters
namename of the reader
Returns
the reader object
Exceptions
KeypleReaderNotFoundExceptionif a reader is not found by its name
KeypleReaderIOExceptionif the communication with the reader or the SE has failed

Implements keyple::core::seproxy::plugin::AbstractThreadedObservablePlugin.

◆ fetchNativeReadersNames()

const std::set< std::string > & keyple::plugin::pcsc::PcscPluginImpl::fetchNativeReadersNames ( )
overrideprotectedvirtual

Fetch the list of connected native reader (from smartcardio) and returns their names

Returns
connected readers' name list
Exceptions
KeypleReaderIOExceptionif the communication with the reader or the SE has failed

Implements keyple::core::seproxy::plugin::AbstractThreadedObservablePlugin.

◆ getInstance()

std::shared_ptr< PcscPluginImpl > keyple::plugin::pcsc::PcscPluginImpl::getInstance ( )
static

Gets the single instance of PcscPlugin.

Returns
single instance of PcscPlugin
Exceptions
KeypleReaderExceptionif a reader error occurs

◆ getName()

virtual const std::string& keyple::plugin::pcsc::PcscPluginImpl::getName ( ) const
inlinefinalvirtual

C++ vs. Java: temp hack

Implements keyple::core::seproxy::ProxyElement.

◆ getParameters()

const std::map< const std::string, const std::string > & keyple::plugin::pcsc::PcscPluginImpl::getParameters ( ) const
overridevirtual

Gets the parameters

Returns
the configuration of the item

Implements keyple::core::seproxy::ProxyElement.

◆ initNativeReaders()

ConcurrentMap< const std::string, std::shared_ptr< SeReader > > & keyple::plugin::pcsc::PcscPluginImpl::initNativeReaders ( )
overrideprotectedvirtual

Fetch connected native readers (from smartcard.io) and returns a list of corresponding keyple::core::seproxy::plugin::AbstractReader are new instances.

Returns
the list of AbstractReader objects.
Exceptions
KeypleReaderExceptionif a reader error occurs

Implements keyple::core::seproxy::plugin::AbstractPlugin.

◆ setParameter()

void keyple::plugin::pcsc::PcscPluginImpl::setParameter ( const std::string &  key,
const std::string &  value 
)
overridevirtual

This method has to be implemented by the reader plugin.
Allows to define a proprietary setting for a reader or a plugin (contactless protocols polling sequence, baud rate, … etc.).

Parameters
keythe parameter key
valuethe parameter value
Exceptions
IllegalArgumentExceptionif the parameter or the value is not supported
KeypleReaderIOExceptionif the communication with the reader or the SE has failed

Implements keyple::core::seproxy::plugin::AbstractSeProxyComponent.

◆ setParameters()

virtual void keyple::plugin::pcsc::PcscPluginImpl::setParameters ( const std::map< const std::string, const std::string > &  parameters)
inlinefinalvirtual

C++ vs Java: temp hack

Reimplemented from keyple::core::seproxy::ProxyElement.

Member Data Documentation

◆ nativeReadersNames

std::set<std::string> keyple::plugin::pcsc::PcscPluginImpl::nativeReadersNames

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