Flipper application.
More...
#include "application_manifest.h"
#include "elf/elf_api_interface.h"
#include <furi.h>
#include <storage/storage.h>
#include <stdbool.h>
Go to the source code of this file.
|
typedef struct FlipperApplication | FlipperApplication |
|
typedef int32_t(* | FlipperApplicationEntryPoint) (void *) |
| Entry point prototype for standalone applications.
|
|
typedef const FlipperAppPluginDescriptor *(* | FlipperApplicationPluginEntryPoint) (void) |
| Entry point prototype for plugins.
|
|
|
enum | FlipperApplicationPreloadStatus {
FlipperApplicationPreloadStatusSuccess = 0
, FlipperApplicationPreloadStatusInvalidFile
, FlipperApplicationPreloadStatusNotEnoughMemory
, FlipperApplicationPreloadStatusInvalidManifest
,
FlipperApplicationPreloadStatusApiTooOld
, FlipperApplicationPreloadStatusApiTooNew
, FlipperApplicationPreloadStatusTargetMismatch
} |
|
enum | FlipperApplicationLoadStatus { FlipperApplicationLoadStatusSuccess = 0
, FlipperApplicationLoadStatusUnspecifiedError
, FlipperApplicationLoadStatusMissingImports
} |
|
◆ flipper_application_alloc()
Initialize FlipperApplication object.
- Parameters
-
storage | Storage instance |
api_interface | ELF API interface to use for pre-loading and symbol resolving |
- Returns
- Application instance
◆ flipper_application_alloc_thread()
Allocate application thread at entry point address, using app name and stack size from metadata.
Returned thread isn't started yet. Can be only called once for application instance.
- Parameters
-
app | Applicaiton pointer |
args | Args to pass to app's entry point |
- Returns
- Created thread
◆ flipper_application_free()
Destroy FlipperApplication object.
- Parameters
-
◆ flipper_application_get_manifest()
Get pointer to application manifest for preloaded application.
- Parameters
-
- Returns
- Pointer to application manifest
◆ flipper_application_is_plugin()
Check if application is a plugin (not a runnable standalone app)
- Parameters
-
- Returns
- true if application is a plugin, false otherwise
◆ flipper_application_load_name_and_icon()
Load name and icon from FAP file.
- Parameters
-
path | Path to FAP file. |
storage | Storage instance. |
icon_ptr | Icon pointer. |
item_name | Application name. |
- Returns
- true if icon and name were loaded successfully.
◆ flipper_application_load_status_to_string()
const char * flipper_application_load_status_to_string |
( |
FlipperApplicationLoadStatus | status | ) |
|
Get text description of load status.
- Parameters
-
- Returns
- String pointer to description
◆ flipper_application_map_to_memory()
FlipperApplicationLoadStatus flipper_application_map_to_memory |
( |
FlipperApplication * | app | ) |
|
Load sections and process relocations for already pre-loaded application.
- Parameters
-
- Returns
- Load result code
◆ flipper_application_plugin_get_descriptor()
Get plugin descriptor for preloaded plugin.
- Parameters
-
- Returns
- Pointer to plugin descriptor
◆ flipper_application_preload()
FlipperApplicationPreloadStatus flipper_application_preload |
( |
FlipperApplication * | app, |
|
|
const char * | path ) |
Validate elf file and load application metadata.
- Parameters
-
| app | Application pointer |
[in] | path | The path to fap file |
- Returns
- Preload result code
◆ flipper_application_preload_manifest()
FlipperApplicationPreloadStatus flipper_application_preload_manifest |
( |
FlipperApplication * | app, |
|
|
const char * | path ) |
Validate elf file and load application manifest.
- Parameters
-
| app | Application pointer |
[in] | path | The path to fap file |
- Returns
- Preload result code
◆ flipper_application_preload_status_to_string()
const char * flipper_application_preload_status_to_string |
( |
FlipperApplicationPreloadStatus | status | ) |
|
Get text description of preload status.
- Parameters
-
- Returns
- String pointer to description