From de9c58c92c29f9498c9e91a1a1b918261135d31b Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 18 Jun 2023 21:10:03 +0200 Subject: Basic reader interface --- nfcommander.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'nfcommander.h') diff --git a/nfcommander.h b/nfcommander.h index 65ca9d2..7990198 100644 --- a/nfcommander.h +++ b/nfcommander.h @@ -6,6 +6,25 @@ #define NFCOMMANDER_VERSION "v0.1-dev" #endif +typedef enum { + tag_unset, + tag_mifare1, + tag_ntag, + tag_desfire, + tag_ultralight, + tag_ultralightc +} nfc_tag_t; + +typedef struct { + //core identifying properties + nfc_tag_t type; + uint8_t uid_length; + uint8_t uid[10]; +} nfc_tag_info_t; + +typedef int (*reader_plugin_init)(void); +typedef int (*reader_plugin_handle)(int fd); + typedef enum { system_control, system_reader, @@ -13,3 +32,5 @@ typedef enum { } notification_target_t; int core_manage_fd(int fd, int manage, notification_target_t system); +int core_tag_present(nfc_tag_info_t tag); +int core_tag_removed(nfc_tag_info_t tag); -- cgit v1.2.3