mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-15 16:52:38 +03:00
b9a766d909
* Added support for running applications from SD card (FAPs - Flipper Application Packages) * Added plugin_dist target for fbt to build FAPs * All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default * Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them * Added debugging support for FAPs with fbt debug & VSCode * Added public firmware API with automated versioning Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
60 lines
1.1 KiB
C
60 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include <core/pubsub.h>
|
|
#include <stdbool.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();
|
|
|
|
/** Show primary loader */
|
|
void loader_update_menu();
|
|
|
|
/** Show primary loader */
|
|
FuriPubSub* loader_get_pubsub(Loader* instance);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|