Portuguese eID Middleware SDK
Version: 3.12.0
|
#include <eidlib.h>
Public Member Functions | |
virtual PTEIDSDK_API | ~PTEID_ReaderContext () |
PTEIDSDK_API const char * | getName () |
PTEIDSDK_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 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 () |
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 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 method : 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 is not an EIDcard, exception PTEID_ExCardBadType is thrown.
PTEIDSDK_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_API bool eIDMW::PTEID_ReaderContext::isCardPresent | ( | ) |
Return true if a card is present and false otherwise.
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(*)(long lRet, unsigned long ulState, void *pvRef) | callback, |
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