sc_list_card_types()

Retrieve a list of all available card types that match the supplied Answer to Reset (ATR)

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_list_card_types(sc_context_t *context,                 
                                      const sc_atr_string_t *atr,                 
                                      sc_card_name_t *cards,                 
                                      size_t *num_cards)

Since:

BlackBerry 10.2.0

Arguments:

context

The active smart card context. This value cannot be NULL.

atr

The ATR to compare against registered card types. This value may be NULL.

cards

The card array that will be used to write all the available cards to. If NULL, only the number of available card types is retrieved.

num_cards

On input, this value indicates the length of the cards array. On output, this value contains the number of card names that have been written to the cards array. This value cannot be NULL.

Library:

libscs (For the qcc command, use the -l scs option to link against this library)

Description:

Matching for the ATR is determined by examining each registered card type and performing a byte-wise comparison of the card driver registered ATR against the supplied ATR.

If the ATR parameter is NULL, all cards are considered matching for the supplied criteria.

Returns:

SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.