flipperzero-firmware/applications/services/gui/modules/file_browser_worker.h
gornekich 9a21dae29c
[FL-3008], [FL-2734], [FL-2766], [FL-2898] NFC bug fixes (#2098)
* nfc: rework mf classic update
* nfc: rename cache folder to .cache
* nfc: fix ATQA order bytes in nfc files
* file browser: add hide dot files option
* nfc: fix iso-14443-4 uid cards emulation
* nfc: fix unit tests

Co-authored-by: あく <alleteam@gmail.com>
2022-12-07 19:52:44 +09:00

70 lines
1.9 KiB
C

#pragma once
#include <gui/view.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct BrowserWorker BrowserWorker;
typedef void (*BrowserWorkerFolderOpenCallback)(
void* context,
uint32_t item_cnt,
int32_t file_idx,
bool is_root);
typedef void (*BrowserWorkerListLoadCallback)(void* context, uint32_t list_load_offset);
typedef void (*BrowserWorkerListItemCallback)(
void* context,
FuriString* item_path,
bool is_folder,
bool is_last);
typedef void (*BrowserWorkerLongLoadCallback)(void* context);
BrowserWorker* file_browser_worker_alloc(
FuriString* path,
const char* filter_ext,
bool skip_assets,
bool hide_dot_files);
void file_browser_worker_free(BrowserWorker* browser);
void file_browser_worker_set_callback_context(BrowserWorker* browser, void* context);
void file_browser_worker_set_folder_callback(
BrowserWorker* browser,
BrowserWorkerFolderOpenCallback cb);
void file_browser_worker_set_list_callback(
BrowserWorker* browser,
BrowserWorkerListLoadCallback cb);
void file_browser_worker_set_item_callback(
BrowserWorker* browser,
BrowserWorkerListItemCallback cb);
void file_browser_worker_set_long_load_callback(
BrowserWorker* browser,
BrowserWorkerLongLoadCallback cb);
void file_browser_worker_set_config(
BrowserWorker* browser,
FuriString* path,
const char* filter_ext,
bool skip_assets,
bool hide_dot_files);
void file_browser_worker_folder_enter(BrowserWorker* browser, FuriString* path, int32_t item_idx);
bool file_browser_worker_is_in_start_folder(BrowserWorker* browser);
void file_browser_worker_folder_exit(BrowserWorker* browser);
void file_browser_worker_folder_refresh(BrowserWorker* browser, int32_t item_idx);
void file_browser_worker_load(BrowserWorker* browser, uint32_t offset, uint32_t count);
#ifdef __cplusplus
}
#endif