mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-18 16:53:45 +00:00
a7d1ec03e8
* 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>
54 lines
No EOL
1 KiB
C
54 lines
No EOL
1 KiB
C
#pragma once
|
|
#include <furi.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define RECORD_LOADER "loader"
|
|
|
|
typedef struct Loader Loader;
|
|
|
|
typedef enum {
|
|
LoaderStatusOk,
|
|
LoaderStatusErrorAppStarted,
|
|
LoaderStatusErrorUnknownApp,
|
|
LoaderStatusErrorInternal,
|
|
} LoaderStatus;
|
|
|
|
typedef enum {
|
|
LoaderEventTypeApplicationStarted,
|
|
LoaderEventTypeApplicationStopped
|
|
} LoaderEventType;
|
|
|
|
typedef struct {
|
|
LoaderEventType type;
|
|
} LoaderEvent;
|
|
|
|
/** Start application
|
|
* @param name - application name
|
|
* @param args - application arguments
|
|
* @retval true on success
|
|
*/
|
|
LoaderStatus loader_start(Loader* instance, const char* name, const char* args);
|
|
|
|
/** Lock application start
|
|
* @retval true on success
|
|
*/
|
|
bool loader_lock(Loader* instance);
|
|
|
|
/** Unlock application start */
|
|
void loader_unlock(Loader* instance);
|
|
|
|
/** Get loader lock status */
|
|
bool loader_is_locked(Loader* instance);
|
|
|
|
/** Show primary loader */
|
|
void loader_show_menu(Loader* instance);
|
|
|
|
/** Show primary loader */
|
|
FuriPubSub* loader_get_pubsub(Loader* instance);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |