Generic Nfc stack event definitions. More...
Go to the source code of this file.
Data Structures | |
struct | NfcGenericEvent |
Generic Nfc event type. More... | |
Typedefs | |
typedef void | NfcGenericInstance |
Generic Nfc instance type. | |
typedef void | NfcGenericEventData |
Generic Nfc event data type. | |
typedef NfcCommand(* | NfcGenericCallback) (NfcGenericEvent event, void *context) |
Generic Nfc event callback type. | |
Generic Nfc stack event definitions.
Events are the main way of passing information about, well, various events that occur across the Nfc protocol stack.
In order to subscribe to events from a certain instance, the user code must call its corresponding start() function while providing the appropriate callback. During this call, an additional context pointer can be provided, which will be passed to the context parameter at the time of the callback execution.
For additional information on how events are passed around and processed, see protocol-specific poller and listener implementations found in the respectively named subfolders.
typedef NfcCommand(* NfcGenericCallback) (NfcGenericEvent event, void *context) |
Generic Nfc event callback type.
A function of this type must be passed as the callback parameter upon start of a poller, listener or Nfc instance.
[in] | event | Nfc generic event, passed by value, complete with protocol type and data. |
[in,out] | context | pointer to the user-specific context (set when starting a poller/listener instance). |
typedef void NfcGenericEventData |
Generic Nfc event data type.
Must be cast to a concrete type before use. Usually, it will be the protocol-specific event type.
typedef void NfcGenericInstance |
Generic Nfc instance type.
Must be cast to a concrete type before use. Depending on the context, a pointer of this type may point to an object of the following types: