mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-24 13:33:06 +00:00
4bf29827f8
* 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>
47 lines
No EOL
1.1 KiB
C
47 lines
No EOL
1.1 KiB
C
#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>
|
|
#include <notification/notification_messages.h>
|
|
#include <gui/modules/variable_item_list.h>
|
|
#include <gui/modules/widget.h>
|
|
#include "views/bad_usb_view.h"
|
|
|
|
#define BAD_USB_APP_BASE_FOLDER ANY_PATH("badusb")
|
|
#define BAD_USB_APP_PATH_LAYOUT_FOLDER BAD_USB_APP_BASE_FOLDER "/layouts"
|
|
#define BAD_USB_APP_SCRIPT_EXTENSION ".txt"
|
|
#define BAD_USB_APP_LAYOUT_EXTENSION ".kl"
|
|
|
|
typedef enum {
|
|
BadUsbAppErrorNoFiles,
|
|
BadUsbAppErrorCloseRpc,
|
|
} BadUsbAppError;
|
|
|
|
struct BadUsbApp {
|
|
Gui* gui;
|
|
ViewDispatcher* view_dispatcher;
|
|
SceneManager* scene_manager;
|
|
NotificationApp* notifications;
|
|
DialogsApp* dialogs;
|
|
Widget* widget;
|
|
Submenu* submenu;
|
|
|
|
BadUsbAppError error;
|
|
string_t file_path;
|
|
string_t keyboard_layout;
|
|
BadUsb* bad_usb_view;
|
|
BadUsbScript* bad_usb_script;
|
|
};
|
|
|
|
typedef enum {
|
|
BadUsbAppViewError,
|
|
BadUsbAppViewWork,
|
|
BadUsbAppViewConfig,
|
|
} BadUsbAppView; |