|
Portuguese eID Middleware SDK Version: 3.14.0
|
#include <eidlib.h>
Public Member Functions | |
| virtual PTEIDSDK_MULTIPASS_API | ~PTEID_ReaderContext () |
| PTEIDSDK_MULTIPASS_API const char * | getName () |
| PTEIDSDK_MULTIPASS_API bool | isCardPresent () |
| PTEIDSDK_API void | releaseCard (bool bAllReference=false) |
| PTEIDSDK_API bool | isCardChanged (unsigned long &ulOldId) |
| PTEIDSDK_API PTEID_CardType | getCardType () |
| PTEIDSDK_API PTEID_Card & | getCard () |
| PTEIDSDK_API PTEID_CardContactInterface | getCardContactInterface () |
| PTEIDSDK_API PTEID_EIDCard & | getEIDCard () |
| PTEIDSDK_API ICAO_Card & | getICAOCard () |
| PTEIDSDK_MULTIPASS_API PTEID_ByteArray | getMultiPassToken () |
| PTEIDSDK_API unsigned long | SetEventCallback (void(*callback)(long lRet, unsigned long ulState, void *pvRef), void *pvRef) |
| PTEIDSDK_API void | StopEventCallback (unsigned long ulHandle) |
| PTEIDSDK_API void | BeginTransaction () |
| PTEIDSDK_API void | EndTransaction () |
| PTEIDSDK_API void | Recover () |
Public Member Functions inherited from eIDMW::PTEID_Object | |
| virtual PTEIDSDK_API | ~PTEID_Object ()=0 |
| NOEXPORT_PTEIDSDK void | Init (const SDK_Context *context, void *impl) |
| NOEXPORT_PTEIDSDK void | Release () |
Friends | |
| PTEID_ReaderContext & | PTEID_ReaderSet::getReader (APL_ReaderContext *pAplReader) |
Additional Inherited Members | |
Protected Member Functions inherited from eIDMW::PTEID_Object | |
| PTEID_Object (const SDK_Context *context, void *impl) | |
| void | addObject (PTEID_Object *impl) |
| void | backupObject (unsigned long idx) |
| PTEID_Object * | getObject (unsigned long idx) |
| PTEID_Object * | getObject (void *impl) |
| void | delObject (unsigned long idx) |
| void | delObject (void *impl) |
| void | checkContextStillOk () const |
| PTEID_Object (const PTEID_Object &obj) | |
| PTEID_Object & | operator= (const PTEID_Object &obj) |
Protected Attributes inherited from eIDMW::PTEID_Object | |
| bool | m_delimpl |
| void * | m_impl |
| unsigned long | m_ulIndexExtAdd |
| std::map< unsigned long, PTEID_Object * > | m_objects |
| SDK_Context * | m_context |
This class represent a reader. You get a reader object from the ReaderSet either by its index (getReaderByNum) or by its name (getReaderByName). Once you have a reader object, you can check if a card is present (isCardPresent). Then you can ask which type of card is in the reader with getCardType() and then get a card object using one of this methods : getCard or getEIDCard.
|
virtual |
Destructor
| PTEIDSDK_API void eIDMW::PTEID_ReaderContext::BeginTransaction | ( | ) |
Begin a transaction with the reader
| PTEIDSDK_API void eIDMW::PTEID_ReaderContext::EndTransaction | ( | ) |
End the transaction
| PTEIDSDK_API PTEID_Card & eIDMW::PTEID_ReaderContext::getCard | ( | ) |
Get the card in the reader. Instantiation is made regarding the type of the card (PTEID_EIDCard).
If no card is present in the reader, exception PTEID_ExNoCardPresent is thrown. If the card type is not supported, exception PTEID_ExCardTypeUnknown is thrown.
| PTEIDSDK_API PTEID_CardContactInterface eIDMW::PTEID_ReaderContext::getCardContactInterface | ( | ) |
Get the card interface used on the current used card
Returns the interface of the current card
| PTEIDSDK_API PTEID_CardType eIDMW::PTEID_ReaderContext::getCardType | ( | ) |
Return the type of the card in the reader.
Throw PTEID_ExNoCardPresent exception if no card is present.
| PTEIDSDK_API PTEID_EIDCard & eIDMW::PTEID_ReaderContext::getEIDCard | ( | ) |
Get the EIDcard in the reader. Instantiation is made regarding the type of the card (PTEID_EIDCard).
If no card is present in the reader, exception PTEID_ExNoCardPresent is thrown. If the card type is not supported, exception PTEID_ExCardTypeUnknown is thrown.
| PTEIDSDK_API ICAO_Card & eIDMW::PTEID_ReaderContext::getICAOCard | ( | ) |
Get an instance of ICAO_Card if the smartcard chip present in reader is compatible with ICAO Doc 9303 specification
Example of compatible documents: newer PT eID cards of type PTEID_CARDTYPE_IAS5, resident permits, european identity cards and ePassports
If no card is present in the reader, exception PTEID_ExNoCardPresent is thrown.
If the current card is not compatible with the ICAO specification, exception PTEID_ExCardTypeUnknown is thrown.
| PTEIDSDK_MULTIPASS_API PTEID_ByteArray eIDMW::PTEID_ReaderContext::getMultiPassToken | ( | ) |
Read the Multipass token information from the card present in the reader
This token is a free access unique value, not related to personal citizen data. Its purpose is to be used in some physical access control scenarios. This is the only useful information available on IAS v5 cards without access control on contactless interface.
The implementation uses Passive and Chip Authentication mechanisms defined in ICAO Doc 9303 Part 11 to counter the risk of receiving untrusted or cloned information.
| PTEIDSDK_MULTIPASS_API const char * eIDMW::PTEID_ReaderContext::getName | ( | ) |
Return the name of the reader.
| PTEIDSDK_API bool eIDMW::PTEID_ReaderContext::isCardChanged | ( | unsigned long & | ulOldId | ) |
Return true if a card has changed since the last called (with the same ulOldId parameter).
| PTEIDSDK_MULTIPASS_API bool eIDMW::PTEID_ReaderContext::isCardPresent | ( | ) |
Return true if a card is present and false otherwise.
| PTEIDSDK_API void eIDMW::PTEID_ReaderContext::Recover | ( | ) |
Recover the card when it's not responding properly anymore. This method attempts to reset the card connection and restore communication.
| PTEIDSDK_API void eIDMW::PTEID_ReaderContext::releaseCard | ( | bool | bAllReference = false | ) |
Release the card.
| bAllReference | If true all the invalid reference/pointer are destroyed. |
| bAllReference | PUT THIS PARAMETER TO TRUE IS THREAD UNSAFE. |
| bAllReference | You have to be sure that you will not use any old reference/pointer after this release |
| PTEIDSDK_API unsigned long eIDMW::PTEID_ReaderContext::SetEventCallback | ( | void(* | callback )(long lRet, unsigned long ulState, void *pvRef), |
| void * | pvRef ) |
Specify a callback function to be called each time a card is inserted/remove in/from this reader.
| PTEIDSDK_API void eIDMW::PTEID_ReaderContext::StopEventCallback | ( | unsigned long | ulHandle | ) |
To tell that the callbacks are not longer needed.
| ulHandle | is the handle return by SetEventCallback |
|
friend |
For internal use : This method must access protected constructor