unleashed-firmware/applications/services/loader/loader_i.h
Sergey Gavrilov a7d1ec03e8
[FL-3270] Loader refactoring, part 1 (#2593)
* Loader: menu part
* Settings: remove unused loader api
* Desktop: get loader from record_open
* CLI: remove unneeded loader api
* gitignore: ignore .old files
* Loader: now really a service
* Loader: working service prototype
* Loader: cli, system start hooks
* CI/CD: make happy
* Loader: autorun
* Loader: lock and unlock
* Loader: rearrange code
* Gui, module menu: fix memleak
* Updater test: add timeout
* added update timeouts and max run duration
* Github: revert updater test workflow changes
* Loader: less missleading message in info cli command

Co-authored-by: doomwastaken <k.volkov@flipperdevices.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2023-05-04 12:48:13 +09:00

57 lines
1.1 KiB
C

#pragma once
#include <furi.h>
#include <toolbox/api_lock.h>
#include "loader.h"
#include "loader_menu.h"
typedef struct {
char* args;
char* name;
FuriThread* thread;
bool insomniac;
} LoaderAppData;
struct Loader {
FuriPubSub* pubsub;
FuriMessageQueue* queue;
LoaderMenu* loader_menu;
LoaderAppData app;
};
typedef enum {
LoaderMessageTypeStartByName,
LoaderMessageTypeAppClosed,
LoaderMessageTypeShowMenu,
LoaderMessageTypeMenuClosed,
LoaderMessageTypeLock,
LoaderMessageTypeUnlock,
LoaderMessageTypeIsLocked,
} LoaderMessageType;
typedef struct {
const char* name;
const char* args;
} LoaderMessageStartByName;
typedef struct {
LoaderStatus value;
} LoaderMessageLoaderStatusResult;
typedef struct {
bool value;
} LoaderMessageBoolResult;
typedef struct {
FuriApiLock api_lock;
LoaderMessageType type;
union {
LoaderMessageStartByName start;
};
union {
LoaderMessageLoaderStatusResult* status_value;
LoaderMessageBoolResult* bool_value;
};
} LoaderMessage;