eID middleware |

# eIDMW::PTEID_Card Class Reference

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

`#include <eidlib.h>`

Inheritance diagram for eIDMW::PTEID_Card:

List of all members.

## Public Member Functions
virtual PTEIDSDK_API | ~PTEID_Card ()=0
| Destructor.
virtual PTEIDSDK_API PTEID_CardType | getType ()
| Return the type of the card.
virtual PTEIDSDK_API PTEID_XMLDoc & | getDocument (PTEID_DocumentType type)=0
| Return a document from the card.
virtual PTEIDSDK_API const PTEID_ByteArray & | getRawData (PTEID_RawDataType type)=0
| Return a raw data from the card.
virtual PTEIDSDK_API PTEID_ByteArray | sendAPDU (const PTEID_ByteArray &cmd)
| Send an APDU command to the card and get the result.
virtual PTEIDSDK_API PTEID_ByteArray | readFile (const char *fileID, unsigned long ulOffset=0, unsigned long ulMaxLength=0)
| Read a File from the card.
virtual PTEIDSDK_API bool | writeFile (const char *fileID, const PTEID_ByteArray &oData, unsigned long ulOffset=0)
| Write a file to the card.
## Protected Member Functions
| PTEID_Card (const SDK_Context *context, APL_Card *impl)
| For internal use : Constructor.

## Detailed Description

Abstract base class for all the card type supported.

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

## Constructor & Destructor Documentation

virtual PTEIDSDK_API eIDMW::PTEID_Card::~PTEID_Card | ( |  | ) | `[pure virtual]`

Destructor.

eIDMW::PTEID_Card::PTEID_Card | ( | const SDK_Context * | context,
|  | APL_Card * | impl |
| ) |  |  | `[protected]`

For internal use : Constructor.

## Member Function Documentation

virtual PTEIDSDK_API PTEID_XMLDoc& eIDMW::PTEID_Card::getDocument | ( | PTEID_DocumentType | type | ) | `[pure virtual]`

Return a document from the card.

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

Implemented in eIDMW::PTEID_SISCard, and eIDMW::PTEID_EIDCard.

virtual PTEIDSDK_API const PTEID_ByteArray& eIDMW::PTEID_Card::getRawData | ( | PTEID_RawDataType | type | ) | `[pure virtual]`

Return a raw data from the card.

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

Implemented in eIDMW::PTEID_SISCard, and eIDMW::PTEID_EIDCard.

virtual PTEIDSDK_API PTEID_CardType eIDMW::PTEID_Card::getType | ( |  | ) | `[virtual]`

Return the type of the card.

virtual PTEIDSDK_API PTEID_ByteArray eIDMW::PTEID_Card::readFile | ( | const char * | fileID,
|  | unsigned long | ulOffset = `0`,
|  | unsigned long | ulMaxLength = `0` |
| ) |  |  | `[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 PTEIDSDK_API PTEID_ByteArray eIDMW::PTEID_Card::sendAPDU | ( | const PTEID_ByteArray & | cmd | ) | `[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

virtual PTEIDSDK_API bool eIDMW::PTEID_Card::writeFile | ( | const char * | fileID,
|  | const PTEID_ByteArray & | oData,
|  | unsigned long | ulOffset = `0` |
| ) |  |  | `[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

The documentation for this class was generated from the following file:

- eidlib.h