sc_detect_card_presence(3) Detect presence of smart card in a reader

SYNOPSIS


#include <opensc.h>
int sc_detect_card_presence(sc_reader_t *reader, int slot_id);

DESCRIPTION

This function checks whether reader has a card present in slot_id.

RETURN VALUE

If an error occurred, the return value is a a negative OpenSC error code. If no card is present, 0 is returned. Otherwise, a positive value is returned, which is a combination of flags. The flag SC_SLOT_CARD_PRESENT is always set. In addition, if the card was exchanged, the SC_SLOT_CARD_CHANGED flag is set.