eID middleware |

# be::portugal::eid::PTEID_Card Class Reference

Abstract base class for all the card type supported. More...

Inheritance diagram for be::portugal::eid::PTEID_Card:

List of all members.

## Public Member Functions

override void | Dispose ()
virtual PTEID_CardType | getType ()
| Return the type of the card.
virtual PTEID_XMLDoc | getDocument (PTEID_DocumentType type)
| Return a document from the card.
virtual PTEID_ByteArray | getRawData (PTEID_RawDataType type)
| Return a raw data from the card.
virtual PTEID_ByteArray | sendAPDU (PTEID_ByteArray cmd)
| Send an APDU command to the card and get the result.
virtual PTEID_ByteArray | readFile (string fileID, uint ulOffset, uint ulMaxLength)
| Read a File from the card.
virtual PTEID_ByteArray | readFile (string fileID, uint ulOffset)
| Read a File from the card.
virtual PTEID_ByteArray | readFile (string fileID)
| Read a File from the card.
virtual bool | writeFile (string fileID, PTEID_ByteArray oData, uint ulOffset)
| Write a file to the card.
virtual bool | writeFile (string fileID, PTEID_ByteArray oData)
| Write a file to the card.

## Detailed Description

Abstract base class for all the card type supported.

The PTEID_ReaderContext::getCard() method will return such an object.

## Member Function Documentation

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

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

Reimplemented in be::portugal::eid::PTEID_EIDCard, be::portugal::eid::PTEID_ForeignerCard, be::portugal::eid::PTEID_KidsCard, be::portugal::eid::PTEID_MemoryCard, be::portugal::eid::PTEID_SISCard, and be::portugal::eid::PTEID_SmartCard.

virtual PTEID_XMLDoc be::portugal::eid::PTEID_Card::getDocument | ( | PTEID_DocumentType | type | ) | `[inline, virtual]`

Return a document from the card.

Throw PTEID_ExDocTypeUnknown exception if the document doesn't exist for this card.

Reimplemented in be::portugal::eid::PTEID_EIDCard, and be::portugal::eid::PTEID_SISCard.

virtual PTEID_ByteArray be::portugal::eid::PTEID_Card::getRawData | ( | PTEID_RawDataType | type | ) | `[inline, virtual]`

Return a raw data from the card.

Throw PTEID_ExFileTypeUnknown exception if the document doesn't exist for this card.

Reimplemented in be::portugal::eid::PTEID_EIDCard, and be::portugal::eid::PTEID_SISCard.

virtual PTEID_CardType be::portugal::eid::PTEID_Card::getType | ( |  | ) | `[inline, virtual]`

Return the type of the card.

virtual PTEID_ByteArray be::portugal::eid::PTEID_Card::readFile | ( | string | fileID | ) | `[inline, virtual]`

Read a File from the card.

Parameters:

  | fileID | is the path of the file

Returns:
  A PTEID_ByteArray with the content of the file

virtual PTEID_ByteArray be::portugal::eid::PTEID_Card::readFile | ( | string | fileID,
|  | uint | ulOffset |
| ) |  |  | `[inline, virtual]`

Read a File from the card.

Parameters:

  | fileID | is the path of the file
  | ulOffset | is the offset to begins the reading

Returns:
  A PTEID_ByteArray with the content of the file

virtual PTEID_ByteArray be::portugal::eid::PTEID_Card::readFile | ( | string | fileID,
|  | uint | ulOffset,
|  | uint | ulMaxLength |
| ) |  |  | `[inline, virtual]`

Read a File from the card.

Parameters:

  | fileID | is the path of the file
  | ulOffset | is the offset to begins the reading
  | ulMaxLength | is the maximum length of bytes to read

Returns:
  A PTEID_ByteArray with the content of the file

virtual PTEID_ByteArray be::portugal::eid::PTEID_Card::sendAPDU | ( | PTEID_ByteArray | cmd | ) | `[inline, virtual]`

Send an APDU command to the card and get the result.

Parameters:

  | cmd | is the apdu command

Returns:
  a PTEID_ByteArray containing the result

Reimplemented in be::portugal::eid::PTEID_SmartCard.

virtual bool be::portugal::eid::PTEID_Card::writeFile | ( | string | fileID,
|  | PTEID_ByteArray | oData |
| ) |  |  | `[inline, virtual]`

Write a file to the card.

Parameters:

  | fileID | is the path of the file
  | oData | contents the bytes to write

Reimplemented in be::portugal::eid::PTEID_SmartCard.

virtual bool be::portugal::eid::PTEID_Card::writeFile | ( | string | fileID,
|  | PTEID_ByteArray | oData,
|  | uint | ulOffset |
| ) |  |  | `[inline, virtual]`

Write a file to the card.

Parameters:

  | fileID | is the path of the file
  | oData | contents the bytes to write
  | ulOffset | is the offset to begins the writing