2021-07-18 18:09:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
typedef struct Loader Loader;
|
|
|
|
|
2021-10-13 15:39:37 +00:00
|
|
|
typedef enum {
|
|
|
|
LoaderStatusOk,
|
|
|
|
LoaderStatusErrorAppStarted,
|
|
|
|
LoaderStatusErrorUnknownApp,
|
|
|
|
LoaderStatusErrorInternal,
|
|
|
|
} LoaderStatus;
|
|
|
|
|
2021-07-18 18:09:00 +00:00
|
|
|
/** Start application
|
|
|
|
* @param name - application name
|
|
|
|
* @param args - application arguments
|
|
|
|
* @retval true on success
|
|
|
|
*/
|
2021-10-13 15:39:37 +00:00
|
|
|
LoaderStatus loader_start(Loader* instance, const char* name, const char* args);
|
2021-07-18 18:09:00 +00:00
|
|
|
|
|
|
|
/** Lock application start
|
|
|
|
* @retval true on success
|
|
|
|
*/
|
|
|
|
bool loader_lock(Loader* instance);
|
|
|
|
|
|
|
|
/** Unlock application start */
|
|
|
|
void loader_unlock(Loader* instance);
|
2021-09-28 13:10:13 +00:00
|
|
|
|
2021-10-13 15:39:37 +00:00
|
|
|
/** Get loader lock status */
|
|
|
|
bool loader_is_locked(Loader* instance);
|
|
|
|
|
2021-09-28 13:10:13 +00:00
|
|
|
/** Show primary loader */
|
|
|
|
void loader_show_menu();
|
2021-12-15 12:23:16 +00:00
|
|
|
|
|
|
|
/** Show primary loader */
|
|
|
|
void loader_update_menu();
|