flipperzero-firmware/applications/loader/loader.h
Albert Kharisov 1db29eaea8
[FL-1946] RPC App launch (#758)
* RPC: Add App start, lock status
 - Add RPC commands Application start, lock status acquiring.
 - Write tests for RPC App system.
 - Replace Unit Tests application with CLI command. This is for CI needs and for tests that run application.
* Fix NDEBUG build
* Update PB submodule
* Fix RPC print (ENABLE DEBUG PRINT!)
* snprintf -> string_t
* Fix Hard Fault (early mutex free)
* printf -> string_t, format, enable tests
* Update submodule: protobuf
* Applications: rollback unit test naming scheme.

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-10-13 18:39:37 +03:00

34 lines
714 B
C

#pragma once
#include <stdbool.h>
typedef struct Loader Loader;
typedef enum {
LoaderStatusOk,
LoaderStatusErrorAppStarted,
LoaderStatusErrorUnknownApp,
LoaderStatusErrorInternal,
} LoaderStatus;
/** 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();