Loading...
Searching...
No Matches
nfc_poller_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
32typedef NfcGenericInstance* (*NfcPollerAlloc)(NfcGenericInstance* base_poller);
33
39typedef void (*NfcPollerFree)(NfcGenericInstance* instance);
40
50typedef void (
51 *NfcPollerSetCallback)(NfcGenericInstance* poller, NfcGenericCallback callback, void* context);
52
86typedef NfcCommand (*NfcPollerRun)(NfcGenericEvent event, void* context);
87
103typedef bool (*NfcPollerDetect)(NfcGenericEvent event, void* context);
104
111typedef const NfcDeviceData* (*NfcPollerGetData)(const NfcGenericInstance* instance);
112
129
130#ifdef __cplusplus
131}
132#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
void(* NfcPollerFree)(NfcGenericInstance *instance)
Delete a protocol-specific poller instance.
Definition nfc_poller_base.h:39
NfcGenericInstance *(* NfcPollerAlloc)(NfcGenericInstance *base_poller)
Allocate a protocol-specific poller instance.
Definition nfc_poller_base.h:32
NfcCommand(* NfcPollerRun)(NfcGenericEvent event, void *context)
Activate and read a supported NFC card.
Definition nfc_poller_base.h:86
bool(* NfcPollerDetect)(NfcGenericEvent event, void *context)
Determine whether there is a supported card in the vicinity.
Definition nfc_poller_base.h:103
const NfcDeviceData *(* NfcPollerGetData)(const NfcGenericInstance *instance)
Get the data that was that was gathered during the reading process.
Definition nfc_poller_base.h:111
void(* NfcPollerSetCallback)(NfcGenericInstance *poller, NfcGenericCallback callback, void *context)
Set the callback function to handle events emitted by the poller instance.
Definition nfc_poller_base.h:51
Generic Nfc event type.
Definition nfc_generic_event.h:58
Generic NFC poller interface.
Definition nfc_poller_base.h:121
NfcPollerSetCallback set_callback
Pointer to the set_callback() function.
Definition nfc_poller_base.h:124
NfcPollerRun run
Pointer to the run() function.
Definition nfc_poller_base.h:125
NfcPollerGetData get_data
Pointer to the get_data() function.
Definition nfc_poller_base.h:127
NfcPollerDetect detect
Pointer to the detect() function.
Definition nfc_poller_base.h:126
NfcPollerFree free
Pointer to the free() function.
Definition nfc_poller_base.h:123
NfcPollerAlloc alloc
Pointer to the alloc() function.
Definition nfc_poller_base.h:122