/* Generate VEVENT_CARD_INSERT or VEVENT_CARD_REMOVE based on vreader state. Separated from vreader_insert_card to allow replaying events for a given state.  */
void vreader_queue_card_event(VReader *reader)
/* Generate VEVENT_CARD_INSERT or VEVENT_CARD_REMOVE based on vreader state. Separated from vreader_insert_card to allow replaying events for a given state.  */
void vreader_queue_card_event(VReader *reader)
{
    vevent_queue_vevent(vevent_new(
        reader->card ? VEVENT_CARD_INSERT : VEVENT_CARD_REMOVE, reader,
        reader->card));
}