-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nfc_uid_bf.h
71 lines (59 loc) · 1.85 KB
/
nfc_uid_bf.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef NFC_UID_BF_APP_HEADER
#define NFC_UID_BF_APP_HEADER
#include <furi.h>
#include <gui/gui.h>
#include <gui/icon_i.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/menu.h>
#include <gui/modules/dialog_ex.h>
#include <gui/modules/text_input.h>
#include <dialogs/dialogs.h>
#include <storage/storage.h>
#include <storage/storage.h>
#include <nfc/nfc_device.h>
#include <nfc/nfc_listener.h>
#include <nfc/protocols/iso14443_4a/iso14443_4a.h>
#include <nfc/protocols/mf_desfire/mf_desfire.h>
#include <notification/notification_messages.h>
#define TAG "NfcUidBfApp"
#define NFC_UID_BF_APP_EXTENSION "nfc_uid"
#define NFC_APP_FOLDER ANY_PATH("nfc")
#define NFC_UID_BF_TEXT_STORE_SIZE 128
/* generated by fbt from .png files in images folder */
#include <nfc_uid_bf_icons.h>
typedef enum {
#define ADD_SCENE(name, id) NfcUidBfScene_##id,
#include "nfc_scene_config.h"
#undef ADD_SCENE
NfcUidBfScene_count
} NfcUidBfScene;
// TODO
typedef enum {
NfcUidBfView_Menu,
NfcUidBfView_Fuzzing,
NfcUidBfView_ChoosingUidPattern
} NfcUidBfView;
typedef enum { NfcUidBfEvent_ShowChooseUidPattern, NfcUidBfEvent_ShowListingSaved } NfcUidBfEvent;
typedef struct {
char text_store[NFC_UID_BF_TEXT_STORE_SIZE + 1];
FuriString* tmp_str;
FuriString* pattern;
FuriString* current_uid;
FuriString* saving_uid;
NfcDevice* nfc_device;
NotificationApp* notifications;
NfcListener* listener;
Nfc* nfc;
SceneManager* scene_manager;
ViewDispatcher* view_dispatcher;
Menu* menu;
DialogEx* dialog_ex;
DialogsApp* dialogs;
TextInput* text_input;
} NfcUidBf;
void nfc_uid_bf_scene_manager_init(NfcUidBf* app);
void nfc_uid_bf_scene_manager_free(NfcUidBf* app);
void nfc_uid_bf_view_dispatcher_init(NfcUidBf* app);
void nfc_uid_bf_view_dispatcher_free(NfcUidBf* app);
#endif // NFC_UID_BF_APP_HEADER