sc_get_status_change()

Get the states of the specified readers of interest, waiting until there is a status change in the provided list of readers or the specified timeout period expires.

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_get_status_change(sc_context_t *context,                 
                                        sc_reader_state_t **reader_states,                 
                                        size_t num_reader_states,                 
                                        unsigned int timeout)

Since:

BlackBerry 10.2.0

Arguments:

context

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

reader_states

On input, the array describes the set of readers of interest and the current states that the caller believes each reader is in. On output, the array contains updated information about each reader's state. The list must contain at least one item.

num_reader_states

Number of elements in the reader_states array.

timeout

The amount of time in milliseconds to wait before unblocking.

Library:

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

Description:

Use a timeout value of SC_INFINITE to indicate that the calling application is willing to wait forever. Use a timeout value of zero to indicate that the function should return immediately.

If an unknown card reader is specified, then an error is returned.

This function provides information on when cards are removed from or inserted into one of the specified readers. It does not indicate the card types in a specified reader. This ensures that the calling app is made aware of all changes across the readers of interest, making it possible to present an appropriate UI.

Returns:

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