Loading...
Searching...
No Matches
nfc_listener_base.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "nfc_generic_event.h"
14#include "nfc_device_base.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
40 *NfcListenerAlloc)(NfcGenericInstance* base_listener, NfcDeviceData* data);
41
47typedef void (*NfcListenerFree)(NfcGenericInstance* instance);
48
58typedef void (*NfcListenerSetCallback)(
59 NfcGenericInstance* listener,
60 NfcGenericCallback callback,
61 void* context);
62
70typedef NfcCommand (*NfcListenerRun)(NfcGenericEvent event, void* context);
71
78typedef const NfcDeviceData* (*NfcListenerGetData)(const NfcGenericInstance* instance);
79
95
96#ifdef __cplusplus
97}
98#endif
NfcCommand
Enumeration of possible Nfc commands.
Definition nfc.h:71
Common top-level types for the NFC protocol stack.
void NfcDeviceData
Generic opaque type for protocol-specific NFC device data.
Definition nfc_device_base.h:22
Generic Nfc stack event definitions.
NfcCommand(* NfcGenericCallback)(NfcGenericEvent event, void *context)
Generic Nfc event callback type.
Definition nfc_generic_event.h:75
void NfcGenericInstance
Generic Nfc instance type.
Definition nfc_generic_event.h:36
NfcCommand(* NfcListenerRun)(NfcGenericEvent event, void *context)
Emulate a supported NFC card with given device data.
Definition nfc_listener_base.h:70
void(* NfcListenerFree)(NfcGenericInstance *instance)
Delete a protocol-specific listener instance.
Definition nfc_listener_base.h:47
NfcGenericInstance *(* NfcListenerAlloc)(NfcGenericInstance *base_listener, NfcDeviceData *data)
Allocate a protocol-specific listener instance.
Definition nfc_listener_base.h:40
const NfcDeviceData *(* NfcListenerGetData)(const NfcGenericInstance *instance)
Get the protocol-specific data that was that was provided for emulation.
Definition nfc_listener_base.h:78
void(* NfcListenerSetCallback)(NfcGenericInstance *listener, NfcGenericCallback callback, void *context)
Set the callback function to handle events emitted by the listener instance.
Definition nfc_listener_base.h:58
Generic Nfc event type.
Definition nfc_generic_event.h:58
Generic NFC listener interface.
Definition nfc_listener_base.h:88
NfcListenerAlloc alloc
Pointer to the alloc() function.
Definition nfc_listener_base.h:89
NfcListenerGetData get_data
Pointer to the get_data() function.
Definition nfc_listener_base.h:93
NfcListenerRun run
Pointer to the run() function.
Definition nfc_listener_base.h:92
NfcListenerSetCallback set_callback
Pointer to the set_callback() function.
Definition nfc_listener_base.h:91
NfcListenerFree free
Pointer to the free() function.
Definition nfc_listener_base.h:90