Represents a connection to a chip card device. More...
Typedefs | |
| typedef struct _cci * | cci_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. | |
Represents a connection to a chip card device.
| void cci_close | ( | cci_t | cci | ) |
Close connection to a chip card device.
| 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().


| chipcard_t cci_get_slot | ( | cci_t | cci, | |
| unsigned int | num | |||
| ) |
Retrieve a handle to a CCID slot.
| cci | The cci_t containing the required slot. | |
| num | The slot number to retrieve (zero-based). |
Definition at line 745 of file cci.c.
References _cci::cci_num_slots, and _cci::cci_slot.
Referenced by cci_get(), and found_cci().

| void cci_log | ( | cci_t | cci, | |
| const char * | fmt, | |||
| ... | ||||
| ) |
Print a message in the trace log.
| 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().

Connect to a physical chipcard device.
| 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.
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().


| unsigned int cci_slots | ( | cci_t | cci | ) |
Retrieve the number of slots in the CCID.
| cci | The cci_t to return number of slots for. |
Definition at line 734 of file cci.c.
References _cci::cci_num_slots.
Referenced by cci_len().

1.6.3