![]() |
BSB Developer Docs
|
JS Application Launcher public API. More...
#include <core/string.h>Go to the source code of this file.
Enumerations | |
| enum | JsAppLauncherStatus { JsAppLauncherStatusOk , JsAppLauncherStatusTimeout , JsAppLauncherStatusNotRunning , JsAppLauncherStatusInvalidAppId , JsAppLauncherStatusAborted , JsAppLauncherStatusLowPriority , JsAppLauncherStatusError } |
| Status codes returned by the JsApplication APIs. More... | |
| enum | JsAppLauncherStartMode { JsAppLauncherStartModeShowMenu , JsAppLauncherStartModeResume , JsAppLauncherStartModeMax } |
| Modes for starting JS applications. More... | |
| enum | JsAppLauncherStopMode { JsAppLauncherStopModeNormal , JsAppLauncherStopModeForget , JsAppLauncherStopModeMax } |
| Modes for stopping JS applications. More... | |
Functions | |
| JsAppLauncherStatus | js_app_launcher_start (const char *app_id, JsAppLauncherStartMode start_mode) |
| Start a JS application by its application ID. | |
| JsAppLauncherStatus | js_app_launcher_stop (JsAppLauncherStopMode stop_mode) |
| Stop the currently running JS application, if applicable. | |
| JsAppLauncherStatus | js_app_launcher_get_running_app_id (FuriString *app_id) |
| Get the currently running JS application ID. | |
| bool | js_app_launcher_translate_path (const char *app_id, FuriString *fs_path, const char *virtual_path) |
| Translate a virtual filesystem path available to a JS application to the actual path. | |
| bool | js_app_launcher_ensure_app_directories (const char *app_id) |
| Create all necessary directories for current JS application's storage. | |
JS Application Launcher public API.
| enum JsAppLauncherStatus |
Status codes returned by the JsApplication APIs.
| bool js_app_launcher_ensure_app_directories | ( | const char * | app_id | ) |
Create all necessary directories for current JS application's storage.
| [in] | app_id | JS application ID |
true on success false directories could not be created | JsAppLauncherStatus js_app_launcher_get_running_app_id | ( | FuriString * | app_id | ) |
Get the currently running JS application ID.
| [in,out] | app_id | pointer to application ID output string (must be allocated) |
JsAppLauncherStatusOk the application ID was successfully retrieved JsAppLauncherStatusNotRunning no application is running JsAppLauncherStatusTimeout operation timed out JsAppLauncherStatusAborted operation was aborted JsAppLauncherStatusError internal error or unexpected state | JsAppLauncherStatus js_app_launcher_start | ( | const char * | app_id, |
| JsAppLauncherStartMode | start_mode ) |
Start a JS application by its application ID.
| [in] | app_id | zero-terminated string containing the ID of the app to be started |
| [in] | start_mode | mode to be used to start the JS application |
JsAppLauncherStatusOk the application was successfully launched JsAppLauncherStatusInvalidAppId invalid application ID JsAppLauncherStatusTimeout operation timed out JsAppLauncherStatusLowPriority a higher-priority application is already running | JsAppLauncherStatus js_app_launcher_stop | ( | JsAppLauncherStopMode | stop_mode | ) |
Stop the currently running JS application, if applicable.
The start menu will not be shown upon exit.
| [in] | stop_mode | mode to be used to exit from the JS application |
JsAppLauncherStatusOk the application was successfully stopped JsAppLauncherStatusNotRunning no application is running JsAppLauncherStatusTimeout operation timed out | bool js_app_launcher_translate_path | ( | const char * | app_id, |
| FuriString * | fs_path, | ||
| const char * | virtual_path ) |
Translate a virtual filesystem path available to a JS application to the actual path.
| [in] | app_id | JS application ID |
| [in] | virtual_path | virtual filesystem path |
| [in,out] | fs_path | pointer to the path output string (must be allocated) |
true on success false path could not be translated