unleashed-firmware/applications/system/updater/updater_i.h
Sergey Gavrilov 4bf29827f8
M*LIB: non-inlined strings, FuriString primitive (#1795)
* Quicksave 1
* Header stage complete
* Source stage complete
* Lint & merge fixes
* Includes
* Documentation step 1
* FBT: output free size considering BT STACK
* Documentation step 2
* py lint
* Fix music player plugin
* unit test stage 1: string allocator, mem, getters, setters, appends, compare, search.
* unit test: string equality
* unit test: string replace
* unit test: string start_with, end_with
* unit test: string trim
* unit test: utf-8
* Rename
* Revert fw_size changes
* Simplify CLI backspace handling
* Simplify CLI character insert
* Merge fixes
* Furi: correct filenaming and spelling
* Bt: remove furi string include

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2022-10-06 00:15:23 +09:00

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;
FuriString* 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;
FuriString* startup_arg;
int32_t idle_ticks;
} Updater;
Updater* updater_alloc(const char* arg);
void updater_free(Updater* updater);
#ifdef __cplusplus
}
#endif