Portuguese eID Middleware SDK
Version: 3.12.0
|
#include <eidlib.h>
Public Member Functions | |
virtual PTEIDSDK_API | ~PTEID_ReaderSet () |
PTEIDSDK_API void | releaseReaders (bool bAllReference=false) |
PTEIDSDK_API bool | isReadersChanged () const |
PTEIDSDK_API const char *const * | readerList (bool bForceRefresh=false) |
PTEIDSDK_API PTEID_ReaderContext & | getReader () |
PTEIDSDK_API PTEID_ReaderContext & | getReaderByName (const char *readerName) |
PTEIDSDK_API unsigned long | readerCount (bool bForceRefresh=false) |
PTEIDSDK_API const char * | getReaderName (unsigned long ulIndex) |
PTEIDSDK_API PTEID_ReaderContext & | getReaderByNum (unsigned long ulIndex) |
PTEIDSDK_API PTEID_ReaderContext & | getReaderByCardSerialNumber (const char *cardSerialNumber) |
PTEIDSDK_API bool | flushCache () |
NOEXPORT_PTEIDSDK PTEID_ReaderContext & | getReader (APL_ReaderContext *pAplReader) |
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 () |
Static Public Member Functions | |
static PTEIDSDK_API PTEID_ReaderSet & | instance () |
static PTEIDSDK_API void | initSDK (bool bManageTestCard=false) |
static PTEIDSDK_API void | releaseSDK () |
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 is a singleton class that is the starting point to get all other objects. You get an instance from the static instance() method (or using the define ReaderSet). Then you get a READER (PTEID_ReaderContext) -> from this reader, you a CARD (PTEID_Card or derived class) -> from this card, you get identity or address objects (PTEID_EId or PTEID_Address) -> ...
|
virtual |
Destructor
PTEIDSDK_API bool eIDMW::PTEID_ReaderSet::flushCache | ( | ) |
Flush the cached files. Return if any files were flushed (T/F).Flush the cache
PTEIDSDK_API PTEID_ReaderContext& eIDMW::PTEID_ReaderSet::getReader | ( | ) |
Return the first readercontext with a card. If no card is present, return the firs reader. If no reader exist, throw an exception PTEID_ExNoReader.
NOEXPORT_PTEIDSDK PTEID_ReaderContext& eIDMW::PTEID_ReaderSet::getReader | ( | APL_ReaderContext * | pAplReader | ) |
For internal use - Not exported
PTEIDSDK_API PTEID_ReaderContext& eIDMW::PTEID_ReaderSet::getReaderByCardSerialNumber | ( | const char * | cardSerialNumber | ) |
Return the reader containing the card with this SN. If no card with this SN is found, throw an exception PTEID_ExParamRange.
PTEIDSDK_API PTEID_ReaderContext& eIDMW::PTEID_ReaderSet::getReaderByName | ( | const char * | readerName | ) |
Get the reader by its name.
PTEIDSDK_API PTEID_ReaderContext& eIDMW::PTEID_ReaderSet::getReaderByNum | ( | unsigned long | ulIndex | ) |
Get the reader by its Index. Throw PTEID_ExParamRange exception if the index is out of range.
PTEIDSDK_API const char* eIDMW::PTEID_ReaderSet::getReaderName | ( | unsigned long | ulIndex | ) |
Get the name of the reader by its Index. Throw PTEID_ExParamRange exception if the index is out of range.
|
static |
Init the SDK (Optional).
bManageTestCard | If true the applayer must ask if test cards are allowed (used for compatibility with old C API). |
bManageTestCard | If false other applications (ex. gui) take that into their scope |
|
static |
Return the singleton object (create it at first use)
PTEIDSDK_API bool eIDMW::PTEID_ReaderSet::isReadersChanged | ( | ) | const |
Return true if readers has been added or removed
PTEIDSDK_API unsigned long eIDMW::PTEID_ReaderSet::readerCount | ( | bool | bForceRefresh = false | ) |
Return the number of card readers connected to the computer.
bForceRefresh | force the reconnection to the lower layer to see if reader list have changed |
PTEIDSDK_API const char* const* eIDMW::PTEID_ReaderSet::readerList | ( | bool | bForceRefresh = false | ) |
Get the list of the reader. Return an array of const char * The last pointer is NULL Usage : const char * const *ppList=PTEID_ReaderSet::readerList(); for(const char * const *ppName=ppList;*ppName!=NULL;ppName++) {...}
bForceRefresh | force the reconnection to the lower layer to see if reader list have changed |
PTEIDSDK_API void eIDMW::PTEID_ReaderSet::releaseReaders | ( | bool | bAllReference = false | ) |
Release the readers (Useful if readers had changed).
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 |
|
static |
Release the SDK