2021-11-26 13:53:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "bad_usb_app.h"
|
|
|
|
#include "scenes/bad_usb_scene.h"
|
|
|
|
#include "bad_usb_script.h"
|
|
|
|
|
|
|
|
#include <gui/gui.h>
|
|
|
|
#include <gui/view_dispatcher.h>
|
|
|
|
#include <gui/scene_manager.h>
|
|
|
|
#include <gui/modules/submenu.h>
|
|
|
|
#include <dialogs/dialogs.h>
|
2022-01-05 16:10:18 +00:00
|
|
|
#include <notification/notification_messages.h>
|
|
|
|
#include <gui/modules/variable_item_list.h>
|
2022-02-02 14:27:33 +00:00
|
|
|
#include <gui/modules/widget.h>
|
2021-11-26 13:53:51 +00:00
|
|
|
#include "views/bad_usb_view.h"
|
|
|
|
|
2022-07-26 12:21:51 +00:00
|
|
|
#define BAD_USB_APP_PATH_FOLDER ANY_PATH("badusb")
|
2021-11-26 13:53:51 +00:00
|
|
|
#define BAD_USB_APP_EXTENSION ".txt"
|
|
|
|
|
2022-03-24 15:45:03 +00:00
|
|
|
typedef enum {
|
|
|
|
BadUsbAppErrorNoFiles,
|
|
|
|
BadUsbAppErrorCloseRpc,
|
|
|
|
} BadUsbAppError;
|
|
|
|
|
2021-11-26 13:53:51 +00:00
|
|
|
struct BadUsbApp {
|
|
|
|
Gui* gui;
|
|
|
|
ViewDispatcher* view_dispatcher;
|
|
|
|
SceneManager* scene_manager;
|
|
|
|
NotificationApp* notifications;
|
|
|
|
DialogsApp* dialogs;
|
2022-02-02 14:27:33 +00:00
|
|
|
Widget* widget;
|
2021-11-26 13:53:51 +00:00
|
|
|
|
2022-03-24 15:45:03 +00:00
|
|
|
BadUsbAppError error;
|
2022-05-27 11:19:21 +00:00
|
|
|
string_t file_path;
|
2021-11-26 13:53:51 +00:00
|
|
|
BadUsb* bad_usb_view;
|
|
|
|
BadUsbScript* bad_usb_script;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum {
|
2022-02-02 14:27:33 +00:00
|
|
|
BadUsbAppViewError,
|
2021-11-26 13:53:51 +00:00
|
|
|
BadUsbAppViewWork,
|
|
|
|
} BadUsbAppView;
|