eID middleware |

# be::portugal::eid::PTEID_ReaderSet Class Reference

This is a singleton class that is the starting point to get all other objects. More...

Inheritance diagram for be::portugal::eid::PTEID_ReaderSet:

List of all members.

## Public Member Functions

override void | Dispose ()
void | releaseReaders (bool bAllReference)
| Release the readers (Useful if readers had changed).
void | releaseReaders ()
| Release the readers (Useful if readers had changed).
bool | isReadersChanged ()
| Return true if readers has been added or removed.
string[] | readerList (bool bForceRefresh)
| Get the list of the reader.
string[] | readerList ()
| Get the list of the reader.
PTEID_ReaderContext | getReader ()
| Return the first readercontext with a card.
PTEID_ReaderContext | getReaderByName (string readerName)
| Get the reader by its name.
uint | readerCount (bool bForceRefresh)
| Return the number of card readers connected to the computer.
uint | readerCount ()
| Return the number of card readers connected to the computer.
string | getReaderName (uint ulIndex)
| Get the name of the reader by its Index.
PTEID_ReaderContext | getReaderByNum (uint ulIndex)
| Get the reader by its Index.
PTEID_ReaderContext | getReaderByCardSerialNumber (string cardSerialNumber)
| Return the reader containing the card with this SN.
bool | flushCache ()
| Flush the cached files.

## Static Public Member Functions

static PTEID_ReaderSet | instance ()
static void | initSDK (bool bManageTestCard)
| Init the SDK (Optional).
static void | initSDK ()
| Init the SDK (Optional) without test card managment.
static void | releaseSDK ()
| Release the SDK.

## Detailed Description

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 DOCUMENT (PTEID_XMLDoc or derived class) -> ... /summary>

## Member Function Documentation

override void be::portugal::eid::PTEID_ReaderSet::Dispose | ( |  | ) | `[inline, virtual]`

Reimplemented from be::portugal::eid::PTEID_Object.

bool be::portugal::eid::PTEID_ReaderSet::flushCache | ( |  | ) | `[inline]`

Flush the cached files.

Return if any files were flushed (T/F).

PTEID_ReaderContext be::portugal::eid::PTEID_ReaderSet::getReader | ( |  | ) | `[inline]`

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.

PTEID_ReaderContext be::portugal::eid::PTEID_ReaderSet::getReaderByCardSerialNumber | ( | string | cardSerialNumber | ) | `[inline]`

Return the reader containing the card with this SN.

If no card with this SN is found, throw an exception PTEID_ExParamRange.

PTEID_ReaderContext be::portugal::eid::PTEID_ReaderSet::getReaderByName | ( | string | readerName | ) | `[inline]`

Get the reader by its name.

PTEID_ReaderContext be::portugal::eid::PTEID_ReaderSet::getReaderByNum | ( | uint | ulIndex | ) | `[inline]`

Get the reader by its Index.

Throw PTEID_ExParamRange exception if the index is out of range.

string be::portugal::eid::PTEID_ReaderSet::getReaderName | ( | uint | ulIndex | ) | `[inline]`

Get the name of the reader by its Index.

Throw PTEID_ExParamRange exception if the index is out of range.

static void be::portugal::eid::PTEID_ReaderSet::initSDK | ( |  | ) | `[inline, static]`

Init the SDK (Optional) without test card managment.

static void be::portugal::eid::PTEID_ReaderSet::initSDK | ( | bool | bManageTestCard | ) | `[inline, static]`

Init the SDK (Optional).

Parameters:

  | bManageTestCard | If true the applayer must ask if test cards are allowed (used for compatibility with old C API). If false other applications (ex. gui) take that into their scope.

static PTEID_ReaderSet be::portugal::eid::PTEID_ReaderSet::instance | ( |  | ) | `[inline, static]`

bool be::portugal::eid::PTEID_ReaderSet::isReadersChanged | ( |  | ) | `[inline]`

Return true if readers has been added or removed.

uint be::portugal::eid::PTEID_ReaderSet::readerCount | ( |  | ) | `[inline]`

Return the number of card readers connected to the computer.

uint be::portugal::eid::PTEID_ReaderSet::readerCount | ( | bool | bForceRefresh | ) | `[inline]`

Return the number of card readers connected to the computer.

Parameters:

  | bForceRefresh | force the reconnection to the lower layer to see if reader list have changed.

string [] be::portugal::eid::PTEID_ReaderSet::readerList | ( |  | ) | `[inline]`

Get the list of the reader.

Return an array string.

string [] be::portugal::eid::PTEID_ReaderSet::readerList | ( | bool | bForceRefresh | ) | `[inline]`

Get the list of the reader.

Return an array of string.

Parameters:

  | bForceRefresh | force the reconnection to the lower layer to see if reader list have changed

void be::portugal::eid::PTEID_ReaderSet::releaseReaders | ( |  | ) | `[inline]`

Release the readers (Useful if readers had changed).

void be::portugal::eid::PTEID_ReaderSet::releaseReaders | ( | bool | bAllReference | ) | `[inline]`

Release the readers (Useful if readers had changed).

Parameters:

  | bAllReference | If true all the invalid reference/pointer are destroyed. PUT THIS PARAMETER TO TRUE IS THREAD UNSAFE. You have to be sure that you will not use any old reference/pointer after this release.

static void be::portugal::eid::PTEID_ReaderSet::releaseSDK | ( |  | ) | `[inline, static]`

Release the SDK.