mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-22 10:43:11 +00: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>
67 lines
1.4 KiB
C
67 lines
1.4 KiB
C
#pragma once
|
|
|
|
#include "views/updater_main.h"
|
|
#include "util/update_task.h"
|
|
|
|
#include <furi.h>
|
|
#include <gui/gui.h>
|
|
#include <gui/view_stack.h>
|
|
#include <gui/view_dispatcher.h>
|
|
#include <gui/modules/popup.h>
|
|
#include <gui/scene_manager.h>
|
|
#include <gui/modules/widget.h>
|
|
#include <storage/storage.h>
|
|
#include <notification/notification_app.h>
|
|
#include <update_util/update_operation.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define UPDATER_APP_TICK 500
|
|
|
|
typedef enum {
|
|
UpdaterViewMain,
|
|
UpdaterViewWidget,
|
|
} UpdaterViewEnum;
|
|
|
|
typedef enum {
|
|
UpdaterCustomEventUnknown,
|
|
UpdaterCustomEventStartUpdate,
|
|
UpdaterCustomEventRetryUpdate,
|
|
UpdaterCustomEventCancelUpdate,
|
|
UpdaterCustomEventSdUnmounted,
|
|
} UpdaterCustomEvent;
|
|
|
|
typedef struct UpdaterManifestProcessingState {
|
|
UpdateManifest* manifest;
|
|
string_t message;
|
|
bool ready_to_be_applied;
|
|
} UpdaterManifestProcessingState;
|
|
|
|
typedef struct {
|
|
// GUI
|
|
Gui* gui;
|
|
NotificationApp* notification;
|
|
SceneManager* scene_manager;
|
|
ViewDispatcher* view_dispatcher;
|
|
Storage* storage;
|
|
|
|
UpdaterMainView* main_view;
|
|
|
|
UpdaterManifestProcessingState* pending_update;
|
|
UpdatePrepareResult preparation_result;
|
|
|
|
UpdateTask* update_task;
|
|
Widget* widget;
|
|
string_t startup_arg;
|
|
int32_t idle_ticks;
|
|
} Updater;
|
|
|
|
Updater* updater_alloc(const char* arg);
|
|
|
|
void updater_free(Updater* updater);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|