mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 08:20:21 +00:00
acc39a4bc0
* Api Symbols: replace asserts with checks * Api Symbols: replace asserts with checks part 2 * Update no args function signatures with void, to help compiler to track incorrect usage * More unavoidable void * Update PVS config and code to make it happy * Format sources * nfc: fix checks * dead code cleanup & include fixes Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: hedger <hedger@nanode.su>
50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <gui/view.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct DictAttack DictAttack;
|
|
|
|
typedef enum {
|
|
DictAttackEventSkipPressed,
|
|
} DictAttackEvent;
|
|
|
|
typedef void (*DictAttackCallback)(DictAttackEvent event, void* context);
|
|
|
|
DictAttack* dict_attack_alloc(void);
|
|
|
|
void dict_attack_free(DictAttack* instance);
|
|
|
|
void dict_attack_reset(DictAttack* instance);
|
|
|
|
View* dict_attack_get_view(DictAttack* instance);
|
|
|
|
void dict_attack_set_callback(DictAttack* instance, DictAttackCallback callback, void* context);
|
|
|
|
void dict_attack_set_header(DictAttack* instance, const char* header);
|
|
|
|
void dict_attack_set_card_state(DictAttack* instance, bool detected);
|
|
|
|
void dict_attack_set_sectors_total(DictAttack* instance, uint8_t sectors_total);
|
|
|
|
void dict_attack_set_sectors_read(DictAttack* instance, uint8_t sectors_read);
|
|
|
|
void dict_attack_set_keys_found(DictAttack* instance, uint8_t keys_found);
|
|
|
|
void dict_attack_set_current_sector(DictAttack* instance, uint8_t curr_sec);
|
|
|
|
void dict_attack_set_total_dict_keys(DictAttack* instance, size_t dict_keys_total);
|
|
|
|
void dict_attack_set_current_dict_key(DictAttack* instance, size_t cur_key_num);
|
|
|
|
void dict_attack_set_key_attack(DictAttack* instance, uint8_t sector);
|
|
|
|
void dict_attack_reset_key_attack(DictAttack* instance);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|