5de2c32c81
* nfc: update detect reader view * nfc: make detect reader more interractive * nfc: update icons * nfc: fix detect reader gui * nfc: fix gui, fix worker events * nfc: fix notifications * nfc: add nfc_worker NULL assert Co-authored-by: あく <alleteam@gmail.com>
35 lines
954 B
C
35 lines
954 B
C
#pragma once
|
|
#include <stdint.h>
|
|
#include <gui/view.h>
|
|
#include <gui/modules/widget.h>
|
|
|
|
typedef struct DetectReader DetectReader;
|
|
|
|
typedef enum {
|
|
DetectReaderStateStart,
|
|
DetectReaderStateReaderDetected,
|
|
DetectReaderStateReaderLost,
|
|
DetectReaderStateDone,
|
|
} DetectReaderState;
|
|
|
|
typedef void (*DetectReaderDoneCallback)(void* context);
|
|
|
|
DetectReader* detect_reader_alloc();
|
|
|
|
void detect_reader_free(DetectReader* detect_reader);
|
|
|
|
void detect_reader_reset(DetectReader* detect_reader);
|
|
|
|
View* detect_reader_get_view(DetectReader* detect_reader);
|
|
|
|
void detect_reader_set_callback(
|
|
DetectReader* detect_reader,
|
|
DetectReaderDoneCallback callback,
|
|
void* context);
|
|
|
|
void detect_reader_set_nonces_max(DetectReader* detect_reader, uint16_t nonces_max);
|
|
|
|
void detect_reader_set_nonces_collected(DetectReader* detect_reader, uint16_t nonces_collected);
|
|
|
|
void detect_reader_set_state(DetectReader* detect_reader, DetectReaderState state);
|