Chip Card Interface Device (CCID).

Represents a connection to a chip card device. More...

Typedefs

typedef struct _ccicci_t
 Chip Card Interface Device.

Functions

cci_t cci_probe (ccidev_t dev, const char *tracefile)
 Connect to a physical chipcard device.
void cci_close (cci_t cci)
 Close connection to a chip card device.
unsigned int cci_slots (cci_t cci)
 Retrieve the number of slots in the CCID.
chipcard_t cci_get_slot (cci_t cci, unsigned int num)
 Retrieve a handle to a CCID slot.
void cci_log (cci_t cci, const char *fmt,...)
 Print a message in the trace log.

Detailed Description

Represents a connection to a chip card device.


Typedef Documentation

typedef struct _cci* cci_t

Chip Card Interface Device.

Definition at line 55 of file ccid.h.


Function Documentation

void cci_close ( cci_t  cci  ) 

Close connection to a chip card device.

Parameters:
cci The cci_t to close. Closes connection to physical defice and frees the cci_t. Note that any transaction buffers will have to be destroyed seperately. All references to slots will become invalid.

Definition at line 719 of file cci.c.

References _xfr_do_free(), _cci::cci_dev, and _cci::cci_xfr.

Referenced by cp_cci_dealloc(), and found_cci().

Here is the call graph for this function:

Here is the caller graph for this function:

chipcard_t cci_get_slot ( cci_t  cci,
unsigned int  num 
)

Retrieve a handle to a CCID slot.

Parameters:
cci The cci_t containing the required slot.
num The slot number to retrieve (zero-based).
Returns:
chipcard_t rerpesenting the required slot.

Definition at line 745 of file cci.c.

References _cci::cci_num_slots, and _cci::cci_slot.

Referenced by cci_get(), and found_cci().

Here is the caller graph for this function:

void cci_log ( cci_t  cci,
const char *  fmt,
  ... 
)

Print a message in the trace log.

Parameters:
cci The cci_t to which the log message is pertinent.
fmt Format string as per printf().

Prints a message in the trace log of the specified CCI device. Does nothing if NULL was passed as tracefile paramater of cci_open.

Definition at line 762 of file cci.c.

References _cci::cci_tf.

Referenced by cp_log().

Here is the caller graph for this function:

cci_t cci_probe ( ccidev_t  dev,
const char *  tracefile 
)

Connect to a physical chipcard device.

Parameters:
dev ccidev_t representing a physical device.
tracefile filename to open for trace logging (or NULL).

This function: #- Probes the USB device searching for a valid CCID interface. #- Optionally opens a file for trace logging. #- Perform any device specific initialisation.

Returns:
NULL on failure, valid cci_t object otherwise.

Definition at line 622 of file cci.c.

References _PC_to_RDR_GetSlotStatus(), _probe_descriptors(), _RDR_to_PC(), _RDR_to_PC_SlotStatus(), _xfr_do_alloc(), _xfr_do_free(), _chipcard::cc_idx, _chipcard::cc_parent, _cci::cci_dev, _cci::cci_max_in, _cci::cci_max_out, _cci::cci_num_slots, _cci::cci_slot, _cci::cci_tf, _cci::cci_xfr, CCID_MAX_SLOTS, probe_descriptors(), and trace.

Referenced by cp_cci_init(), and found_cci().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int cci_slots ( cci_t  cci  ) 

Retrieve the number of slots in the CCID.

Parameters:
cci The cci_t to return number of slots for.
Returns:
The number of slots.

Definition at line 734 of file cci.c.

References _cci::cci_num_slots.

Referenced by cci_len().

Here is the caller graph for this function:

Generated on Sun Jan 2 08:36:05 2011 for ccid-utils by  doxygen 1.6.3