mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-23 19:23:09 +00:00
917410a0a8
* fbt: reworking targets & assets handling WIP * fbt: dist fixes * fbt: moved SD card resources to owning apps * unit_tests: moved resources to app folder * github: updated unit_tests paths * github: packaging fixes * unit_tests: fixes * fbt: assets: internal cleanup * fbt: reworked assets handling * github: unit_tests: reintroducing fixes * minor cleanup * fbt: naming changes to reflect private nature of scons tools * fbt: resources: fixed dist archive paths * docs: updated paths * docs: updated more paths * docs: included "resources" parameter in app manifest docs; updated assets readme * updated gitignore for assets * github: updated action versions * unit_tests: restored timeout; scripts: assets: logging changes * gh: don't upload desktop animations for unit test run Co-authored-by: あく <alleteam@gmail.com>
84 lines
No EOL
1.8 KiB
C
84 lines
No EOL
1.8 KiB
C
#pragma once
|
|
#include <furi.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define RECORD_LOADER "loader"
|
|
#define LOADER_APPLICATIONS_NAME "Apps"
|
|
|
|
typedef struct Loader Loader;
|
|
|
|
typedef enum {
|
|
LoaderStatusOk,
|
|
LoaderStatusErrorAppStarted,
|
|
LoaderStatusErrorUnknownApp,
|
|
LoaderStatusErrorInternal,
|
|
} LoaderStatus;
|
|
|
|
typedef enum {
|
|
LoaderEventTypeApplicationStarted,
|
|
LoaderEventTypeApplicationStopped
|
|
} LoaderEventType;
|
|
|
|
typedef struct {
|
|
LoaderEventType type;
|
|
} LoaderEvent;
|
|
|
|
/**
|
|
* @brief Start application
|
|
* @param[in] instance loader instance
|
|
* @param[in] name application name or id
|
|
* @param[in] args application arguments
|
|
* @param[out] error_message detailed error message, can be NULL
|
|
* @return LoaderStatus
|
|
*/
|
|
LoaderStatus
|
|
loader_start(Loader* instance, const char* name, const char* args, FuriString* error_message);
|
|
|
|
/**
|
|
* @brief Start application with GUI error message
|
|
* @param[in] instance loader instance
|
|
* @param[in] name application name or id
|
|
* @param[in] args application arguments
|
|
* @return LoaderStatus
|
|
*/
|
|
LoaderStatus loader_start_with_gui_error(Loader* loader, const char* name, const char* args);
|
|
|
|
/**
|
|
* @brief Lock application start
|
|
* @param[in] instance loader instance
|
|
* @return true on success
|
|
*/
|
|
bool loader_lock(Loader* instance);
|
|
|
|
/**
|
|
* @brief Unlock application start
|
|
* @param[in] instance loader instance
|
|
*/
|
|
void loader_unlock(Loader* instance);
|
|
|
|
/**
|
|
* @brief Check if loader is locked
|
|
* @param[in] instance loader instance
|
|
* @return true if locked
|
|
*/
|
|
bool loader_is_locked(Loader* instance);
|
|
|
|
/**
|
|
* @brief Show loader menu
|
|
* @param[in] instance loader instance
|
|
*/
|
|
void loader_show_menu(Loader* instance);
|
|
|
|
/**
|
|
* @brief Get loader pubsub
|
|
* @param[in] instance loader instance
|
|
* @return FuriPubSub*
|
|
*/
|
|
FuriPubSub* loader_get_pubsub(Loader* instance);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |