Memory Cards
[Supported Cards]

Collaboration diagram for Memory Cards:

Extending Basic Card Object



CHIPCARD_API int LC_MemoryCard_ExtendCard (LC_CARD *card)
CHIPCARD_API int LC_MemoryCard_UnextendCard (LC_CARD *card)

Reading And Writing

Normally read-/write operations are limited to about 256 bytes, so these functions encapsulate the ISO functions to allow for transfers of an arbitrary number of bytes.



CHIPCARD_API LC_CLIENT_RESULT LC_MemoryCard_ReadBinary (LC_CARD *card, int offset, int size, GWEN_BUFFER *buf)
CHIPCARD_API LC_CLIENT_RESULT LC_MemoryCard_WriteBinary (LC_CARD *card, int offset, const char *ptr, unsigned int size)

Informational Functions



CHIPCARD_API unsigned int LC_MemoryCard_GetCapacity (const LC_CARD *card)

Function Documentation

CHIPCARD_API int LC_MemoryCard_ExtendCard ( LC_CARD card  ) 

Extends a basic card type thus making functions of this group available. This stores some memory-card-related data with the given card object.

CHIPCARD_API int LC_MemoryCard_UnextendCard ( LC_CARD card  ) 

Unextend a card object which has previously been extended using LC_MemoryCard_ExtendCard. This functions releases all memory-card-related ressources.

CHIPCARD_API LC_CLIENT_RESULT LC_MemoryCard_ReadBinary ( LC_CARD card,
int  offset,
int  size,
GWEN_BUFFER *  buf 
)

Read data from the card.

Parameters:
card card object
offset offset of the memory area on the card
size number of bytes to read
buf GWEN_BUFFER to receive the data read
CHIPCARD_API LC_CLIENT_RESULT LC_MemoryCard_WriteBinary ( LC_CARD card,
int  offset,
const char *  ptr,
unsigned int  size 
)

Write data to the card.

Parameters:
card card object
offset offset of the memory area on the card
ptr pointer to the data to be written
size number of bytes to write
CHIPCARD_API unsigned int LC_MemoryCard_GetCapacity ( const LC_CARD card  ) 

Returns the capacity of the card in bytes. For some cards the capacity can not be determined, in which case this function returns 0.

Generated on Mon Jul 5 23:12:04 2010 for libchipcard by  doxygen 1.6.3