flipperzero-firmware/applications/services/dolphin/helpers/dolphin_deed.h
Georgii Surkov f11df49468
[FL-2828] Dolphin score update take 2 (#1929)
* Move DolphinDeedNfcRead
* Move DolphinDeedNfcReadSuccess
* Move DolphinDeedNfcSave
* Move DolphinDeedNfcDetectReader
* Move DolphinDeedNfcEmulate
* Count DolphinDeedNfcEmulate when launched from file browser
* Implement most of the score accounting for NFC
* Fully update Nfc icounter handling
* Move DolphinDeedSubGhzFrequencyAnalyzer
* Update the rest of icounter in SubGHz
* Adjust SubGHz icounter handling
* Adjust LFRFID icounter handling
* Adjust Infrared icounter handling
* Don't count renaming RFID tags as saving
* Don't count renaming SubGHz signals as saving
* Don't count renaming NFC tags as saving
* Adjust iButton icounter handling
* Minor code refactoring
* Correct formatting
* Account for emulating iButton keys from file manager/rpc

Co-authored-by: あく <alleteam@gmail.com>
2022-10-28 16:18:41 +09:00

85 lines
1.6 KiB
C

#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
DolphinAppSubGhz,
DolphinAppRfid,
DolphinAppNfc,
DolphinAppIr,
DolphinAppIbutton,
DolphinAppBadusb,
DolphinAppPlugin,
DolphinAppMAX,
} DolphinApp;
typedef enum {
DolphinDeedSubGhzReceiverInfo,
DolphinDeedSubGhzSave,
DolphinDeedSubGhzRawRec,
DolphinDeedSubGhzAddManually,
DolphinDeedSubGhzSend,
DolphinDeedSubGhzFrequencyAnalyzer,
DolphinDeedRfidRead,
DolphinDeedRfidReadSuccess,
DolphinDeedRfidSave,
DolphinDeedRfidEmulate,
DolphinDeedRfidAdd,
DolphinDeedNfcRead,
DolphinDeedNfcReadSuccess,
DolphinDeedNfcSave,
DolphinDeedNfcDetectReader,
DolphinDeedNfcEmulate,
DolphinDeedNfcMfcAdd,
DolphinDeedNfcAddSave,
DolphinDeedNfcAddEmulate,
DolphinDeedIrSend,
DolphinDeedIrLearnSuccess,
DolphinDeedIrSave,
DolphinDeedIbuttonRead,
DolphinDeedIbuttonReadSuccess,
DolphinDeedIbuttonSave,
DolphinDeedIbuttonEmulate,
DolphinDeedIbuttonAdd,
DolphinDeedBadUsbPlayScript,
DolphinDeedU2fAuthorized,
DolphinDeedGpioUartBridge,
DolphinDeedPluginStart,
DolphinDeedPluginGameStart,
DolphinDeedPluginGameWin,
DolphinDeedMAX,
DolphinDeedTestLeft,
DolphinDeedTestRight,
} DolphinDeed;
typedef struct {
uint8_t icounter;
DolphinApp app;
} DolphinDeedWeight;
typedef struct {
DolphinApp app;
uint8_t icounter_limit;
} DolphinDeedLimits;
DolphinApp dolphin_deed_get_app(DolphinDeed deed);
uint8_t dolphin_deed_get_app_limit(DolphinApp app);
uint8_t dolphin_deed_get_weight(DolphinDeed deed);
#ifdef __cplusplus
}
#endif