mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-27 15:22:29 +03:00
056446dfed
* storage: added global #defines for /int, /ext & /any * storage: introduced PATH_EXT, PATH_INT& PATH_ANY macros * core apps: moved hardcoded config files names to separate headers; prefixed them with "."; updater: added file name migration to new naming convention on backup extraction * storage: fixed storage_merge_recursive handling of complex directory structures; storage_move_to_sd: changed data migration logic to all non-dot files & all folders * core: added macro aliases for core record names * Bumped protobuf commit pointer * storage: reserved 5 pages in /int; denying write&creation of non-dot files when running out of free space Co-authored-by: あく <alleteam@gmail.com>
43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
#include "dialogs/dialogs_message.h"
|
|
#include "dialogs_i.h"
|
|
#include "dialogs_api_lock.h"
|
|
#include "dialogs_module_file_browser.h"
|
|
#include "dialogs_module_message.h"
|
|
|
|
static DialogsApp* dialogs_app_alloc() {
|
|
DialogsApp* app = malloc(sizeof(DialogsApp));
|
|
app->message_queue = furi_message_queue_alloc(8, sizeof(DialogsAppMessage));
|
|
|
|
return app;
|
|
}
|
|
|
|
static void dialogs_app_process_message(DialogsApp* app, DialogsAppMessage* message) {
|
|
UNUSED(app);
|
|
switch(message->command) {
|
|
case DialogsAppCommandFileBrowser:
|
|
message->return_data->bool_value =
|
|
dialogs_app_process_module_file_browser(&message->data->file_browser);
|
|
break;
|
|
case DialogsAppCommandDialog:
|
|
message->return_data->dialog_value =
|
|
dialogs_app_process_module_message(&message->data->dialog);
|
|
break;
|
|
}
|
|
API_LOCK_UNLOCK(message->lock);
|
|
}
|
|
|
|
int32_t dialogs_srv(void* p) {
|
|
UNUSED(p);
|
|
DialogsApp* app = dialogs_app_alloc();
|
|
furi_record_create(RECORD_DIALOGS, app);
|
|
|
|
DialogsAppMessage message;
|
|
while(1) {
|
|
if(furi_message_queue_get(app->message_queue, &message, FuriWaitForever) == FuriStatusOk) {
|
|
dialogs_app_process_message(app, &message);
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|