unleashed-firmware/applications/archive/helpers/archive_apps.h
Nikolay Minaylov 2a52d2d620
[FL-2216, FL-2233] Archive fixes (#987)
* archive: badusb, u2f and various fixes
* archive: delete confirmation
* badusb: removed empty string check
* string pointer check
* FuriHal: insomnia overflow assert, fix double insomnia exit in ble. BadUsb: fix uncommitted model.
* view update fixes in gpio, badusb, u2f

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-02-10 16:01:49 +03:00

21 lines
654 B
C

#pragma once
typedef enum {
ArchiveAppTypeU2f,
ArchiveAppTypeUnknown,
ArchiveAppsTotal,
} ArchiveAppTypeEnum;
static const ArchiveFileTypeEnum app_file_types[] = {
[ArchiveAppTypeU2f] = ArchiveFileTypeU2f,
[ArchiveAppTypeUnknown] = ArchiveFileTypeUnknown,
};
static inline const ArchiveFileTypeEnum archive_get_app_filetype(ArchiveAppTypeEnum app) {
return app_file_types[app];
}
ArchiveAppTypeEnum archive_get_app_type(const char* path);
bool archive_app_is_available(void* context, const char* path);
bool archive_app_read_dir(void* context, const char* path);
void archive_app_delete_file(void* context, const char* path);