const uint8_t * nfc_device_get_uid(const NfcDevice *instance, size_t *uid_len)
Get the unique identifier (UID) of an NfcDevice instance.
Definition nfc_device.c:77
const char * nfc_device_get_protocol_name(NfcProtocol protocol)
Get the protocol name by its identifier.
Definition nfc_device.c:64
NfcDevice * nfc_device_alloc(void)
Allocate an NfcDevice instance.
Definition nfc_device.c:17
bool nfc_device_is_equal(const NfcDevice *instance, const NfcDevice *other)
Compare two NfcDevice instances to determine whether they are equal.
Definition nfc_device.c:136
bool nfc_device_save(NfcDevice *instance, const char *path)
Save NFC device data form an NfcDevice instance to a file.
Definition nfc_device.c:154
void nfc_device_free(NfcDevice *instance)
Delete an NfcDevice instance.
Definition nfc_device.c:24
void nfc_device_set_data(NfcDevice *instance, NfcProtocol protocol, const NfcDeviceData *protocol_data)
Set the data and protocol of an NfcDevice instance.
Definition nfc_device.c:93
void nfc_device_clear(NfcDevice *instance)
Clear an NfcDevice instance.
Definition nfc_device.c:31
void(* NfcLoadingCallback)(void *context, bool state)
Loading callback function signature.
Definition nfc_device.h:40
const NfcDeviceData * nfc_device_get_data(const NfcDevice *instance, NfcProtocol protocol)
Get the protocol-specific data from an NfcDevice instance.
Definition nfc_device.c:59
void nfc_device_copy_data(const NfcDevice *instance, NfcProtocol protocol, NfcDeviceData *protocol_data)
Copy (export) the data contained in an NfcDevice instance to an outside NfcDeviceData instance.
Definition nfc_device.c:109
bool nfc_device_is_equal_data(const NfcDevice *instance, NfcProtocol protocol, const NfcDeviceData *protocol_data)
Check whether an NfcDevice instance holds certain data.
Definition nfc_device.c:124
NfcProtocol nfc_device_get_protocol(const NfcDevice *instance)
Get the protocol identifier from an NfcDevice instance.
Definition nfc_device.c:54
bool nfc_device_set_uid(NfcDevice *instance, const uint8_t *uid, size_t uid_len)
Set the unique identifier (UID) of an NfcDevice instance.
Definition nfc_device.c:85
void nfc_device_reset(NfcDevice *instance)
Reset an NfcDevice instance.
Definition nfc_device.c:45
void nfc_device_set_loading_callback(NfcDevice *instance, NfcLoadingCallback callback, void *context)
Set the loading callback function.
Definition nfc_device.c:143
bool nfc_device_load(NfcDevice *instance, const char *path)
Load NFC device data to an NfcDevice instance from a file.
Definition nfc_device.c:319
const char * nfc_device_get_name(const NfcDevice *instance, NfcDeviceNameType name_type)
Get the name of an NfcDevice instance.
Definition nfc_device.c:70
Common top-level types for the NFC protocol stack.
NfcDeviceNameType
Verbosity level of the displayed NFC device name.
Definition nfc_device_base.h:14
void NfcDeviceData
Generic opaque type for protocol-specific NFC device data.
Definition nfc_device_base.h:22
Top-level NFC protocol definitions.
NfcProtocol
Enumeration of all available NFC protocols.
Definition nfc_protocol.h:178
NfcDevice structure definition.
Definition nfc_device_i.h:19
NfcDeviceData * protocol_data
Pointer to the NFC device data.
Definition nfc_device_i.h:21
NfcProtocol protocol
Numeric identifier of the data's protocol.
Definition nfc_device_i.h:20