mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 06:50:21 +00:00
ac05387803
* 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>
56 lines
1.1 KiB
C
56 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;
|