nfc_event_type_t

This enumeration defines event codes for the various NFC events.

Synopsis:

#include <nfc/nfc_types.h>

typedef enum {
      NFC_SNEP_CONNECTION_EVENT = 1   
      NFC_TAG_READWRITE_EVENT = 2   
      NFC_HANDOVER_DETECTED_EVENT = 3   
      NFC_HANDOVER_COMPLETE_EVENT = 4   
      NFC_LLCP_CONNECTION_EVENT = 5   
      NFC_OFF_EVENT = 6   
      NFC_ON_EVENT = 7   
      NFC_FIELD_LOST_EVENT = 8   
      NFC_FIELD_DETECTED_EVENT = 9   
      NFC_VIRTUAL_TAG_SELECTION_EVENT = 10   
      NFC_VIRTUAL_TAG_LEFT_EVENT = 11   
      NFC_VIRTUAL_TAG_READ_EVENT = 12   
      NFC_VIRTUAL_TAG_WRITE_EVENT = 13   
      NFC_NDEF_PUSH_SUCCEED_EVENT = 20   
      NFC_NDEF_PUSH_FAILURE_MSG_OVER_SIZE_EVENT = 21   
      NFC_NDEF_PUSH_FAILURE_REJECTED_EVENT = 22   
      NFC_NDEF_PUSH_FAILURE_IO_ERROR_EVENT = 23   
      NFC_HANDOVER_FAILURE_NO_TRANSPORT_EVENT = 30   
      NFC_ISO14443_4_COMMAND_EVENT = 40   
      NFC_ISO14443_4_EVENT_CODE_EVENT = 41   
      NFC_LLCP_READ_COMPLETE_EVENT = 42   
      NFC_LLCP_WRITE_COMPLETE_EVENT = 43   
      NFC_CE_ENABLE_BACKLIGHT_OFF_EVENT = 44   
      NFC_CE_ENABLE_POWERED_OFF_EVENT = 45   
      NFC_CE_DISABLE_BACKLIGHT_OFF_EVENT = 46   
      NFC_CE_DISABLE_POWERED_OFF_EVENT = 47   
      NFC_CE_SET_UICC_ACTIVE_SE_TYPE_EVENT = 48   
      NFC_TARGET_LOST_EVENT = 49   
} nfc_event_type_t;

Data:

NFC_SNEP_CONNECTION_EVENT
A SNEP connection detected and ready for sending an NDEF message to NFC-enabled device.

The target could be retrieved by calling nfc_get_target() function.

NFC_TAG_READWRITE_EVENT
An NFC tag target is detected and ready to read from or write to.

The tag could be retrieved by calling the nfc_get_target() function.

NFC_HANDOVER_DETECTED_EVENT
An NFC connection handover target is detected and ready for handover negotiation process to start.

The application retrieves the target by calling nfc_get_target() function, and then, the application informs the NFC system whether the application wants to proceed with the handover or ignore the target.

NFC_HANDOVER_COMPLETE_EVENT
An NFC connection hand-over negotiation was completed.

You can call the nfc_get_target() function to retrieve hand-over details from the target containing connection hand-over details.

NFC_LLCP_CONNECTION_EVENT
An Logical Link Control Protocol (LLCP) connection has been detected and ready for communication.

You can call the nfc_get_target() function to retrieve the LLCP connection.

NFC_OFF_EVENT
The NFC system is off.

No further NFC events will be delivered.

NFC_ON_EVENT
The NFC system is on.
NFC_FIELD_LOST_EVENT
An external field was lost.
NFC_FIELD_DETECTED_EVENT
An external field was detected.
NFC_VIRTUAL_TAG_SELECTION_EVENT
The emulating NFC virtual Tag has been selected by a remote reader device.
NFC_VIRTUAL_TAG_LEFT_EVENT
The emulating NFC virtual Tag detects that the remote reader device has left the field.
NFC_VIRTUAL_TAG_READ_EVENT
The emulating NFC virtual Tag has been read by a remote reader device.
NFC_VIRTUAL_TAG_WRITE_EVENT
The emulating NFC virtual Tag has been written by a remote reader device.
NFC_NDEF_PUSH_SUCCEED_EVENT
The NDEF message has been successfully pushed to the remote device.
NFC_NDEF_PUSH_FAILURE_MSG_OVER_SIZE_EVENT
The remote device has rejected the NDEF push message because the message is too large.
NFC_NDEF_PUSH_FAILURE_REJECTED_EVENT
The remote device has rejected the NDEF push message.
NFC_NDEF_PUSH_FAILURE_IO_ERROR_EVENT
The NDEF message push failed because of the I/O error.
NFC_HANDOVER_FAILURE_NO_TRANSPORT_EVENT
The NFC connection hand-over negotiation failed because the transport is not supported.
NFC_ISO14443_4_COMMAND_EVENT
The NFC ISO14443_4 command event.
NFC_ISO14443_4_EVENT_CODE_EVENT
The NFC ISO14443_4 command event code.
NFC_LLCP_READ_COMPLETE_EVENT
The NFC LLCP read complete event code.
NFC_LLCP_WRITE_COMPLETE_EVENT
The NFC LLCP write complete event code.
NFC_CE_ENABLE_BACKLIGHT_OFF_EVENT
A programmatic attempt to enable the "Allow Card Transactions When Locked or Backlight is Off" user setting.

The following nfc_result_t values are returned as part of this event code:

NFC_CE_ENABLE_POWERED_OFF_EVENT
A programmatic attempt to enable the "Allow Card Transactions When Powered Off" user setting.

The following nfc_result_t values are returned as part of this event code:

NFC_CE_DISABLE_BACKLIGHT_OFF_EVENT
A programmatic attempt to disable the "Allow Card Transactions When Locked or Backlight is Off" user setting.

The following nfc_result_t values are returned as part of this event code:

NFC_CE_DISABLE_POWERED_OFF_EVENT
A programmatic attempt to disable the "Allow Card Transactions When Powered Off" user setting.

The following nfc_result_t values are returned as part of this event code:

NFC_CE_SET_UICC_ACTIVE_SE_TYPE_EVENT
A programmatic attempt to set the UICC as the active secure element The following nfc_result_t values are returned as part of this event code:

  • NFC_RESULT_SUCCESS: The change was successful as the active secure element was already the UICC or the user allowed the active secure element to become the UICC.
  • NFC_RESULT_SE_NOT_PRESENT: The change was unsuccessful as no UICC secure element was detected.
  • NFC_RESULT_OPERATION_REJECTED: The user denied the request to change the active secure element to the UICC.

NFC_TARGET_LOST_EVENT
An NFC target is no longer being detected within the NFC field.

Use the nfc_get_notification_value() function to retrieve the target connection id.

Library:

libnfc

Description: