Flipper Zero Firmware
Loading...
Searching...
No Matches
updater_i.h
1#pragma once
2
3#include "views/updater_main.h"
4#include "util/update_task.h"
5
6#include <furi.h>
7#include <gui/gui.h>
8#include <gui/view_stack.h>
10#include <gui/modules/popup.h>
11#include <gui/scene_manager.h>
12#include <gui/modules/widget.h>
13#include <storage/storage.h>
14#include <notification/notification_app.h>
15#include <update_util/update_operation.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define UPDATER_APP_TICK 500
22
23typedef enum {
24 UpdaterViewMain,
25 UpdaterViewWidget,
26} UpdaterViewEnum;
27
28typedef enum {
29 UpdaterCustomEventUnknown,
30 UpdaterCustomEventStartUpdate,
31 UpdaterCustomEventRetryUpdate,
32 UpdaterCustomEventCancelUpdate,
33 UpdaterCustomEventSdUnmounted,
34} UpdaterCustomEvent;
35
36typedef struct {
37 // GUI
38 Gui* gui;
39 NotificationApp* notification;
40 SceneManager* scene_manager;
41 ViewDispatcher* view_dispatcher;
42 Storage* storage;
43
44 UpdaterMainView* main_view;
45
46 UpdateManifest* loaded_manifest;
47 UpdatePrepareResult preparation_result;
48
49 UpdateTask* update_task;
50 Widget* widget;
51 FuriString* startup_arg;
52 int32_t idle_ticks;
53} Updater;
54
55Updater* updater_alloc(const char* arg);
56
57void updater_free(Updater* updater);
58
59#ifdef __cplusplus
60}
61#endif
GUI: main API.
GUI: Popup view module API.
GUI: SceneManager API.
APIs for working with storages, directories and files.
Definition string.c:4
Gui structure.
Definition gui_i.h:47
Definition notification_app.h:48
Definition scene_manager_i.h:17
Definition storage_i.h:23
Definition update_manifest.h:29
Definition update_task_i.h:9
Definition updater_i.h:36
Definition updater_main.c:12
Definition view_dispatcher_i.h:16
Definition widget.c:8
GUI: ViewDispatcher API.
GUI: ViewStack API.
GUI: Widget view module API.