diff --git a/doc/src/api/init/chapter.xml b/doc/src/api/init/chapter.xml index 69f64571..90495f44 100644 --- a/doc/src/api/init/chapter.xml +++ b/doc/src/api/init/chapter.xml @@ -10,8 +10,7 @@ - - + ]> diff --git a/doc/src/api/init/sc_wait_for_event.xml b/doc/src/api/init/sc_wait_for_event.xml index 6b867d14..618fe12e 100644 --- a/doc/src/api/init/sc_wait_for_event.xml +++ b/doc/src/api/init/sc_wait_for_event.xml @@ -1,4 +1,6 @@ + + OpenSC API Reference sc_wait_for_event 3 @@ -14,9 +16,9 @@ Synopsis -&includes; +#include <opensc.h> -int sc_wait_for_event(sc_reader_t *readers[], int slot_id[], size_t nslots, +int sc_wait_for_event(sc_reader_t *readers[], int slots[], size_t numslots, unsigned int event_mask, int *reader, unsigned int *event, int timeout); @@ -26,10 +28,43 @@ int sc_wait_for_event(sc_reader_t *readers[], int slot_id[], size_t nslots, Description - This function blocks until an event occurs on the reader spec + This function blocks until an event occurs on any of the + readers/slots specified. The readers and + slots fields list the readers and the + respective slots to be watched. num_slots + holds the total number of slots passed. The event_mask + parameter specifies the types of events to wait for. This may a + combination of the following flags: + + + SC_EVENT_CARD_REMOVED + A card was removed from the reader/slot. + + + SC_EVENT_CARD_INSERTED + A card was insert into the reader/slot. + + + On returning, the reader parameter holds the + reader which generated an event, and event holds + the event flag, as in event_mask. + + + + The timeout parameter may be used to specify the maximum amount of + time to wait for an event, in milliseconds. This may be set to -1 + to wait forever. + + + + + Return value + + Returns 0 if successful, 1 if a timeout occurred, or a negative + value in case of error.