| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- #pragma once
- #include <furi.h>
- #include <furi_hal.h>
- #include <gui/gui.h>
- #include <gui/view_dispatcher.h>
- #include <gui/scene_manager.h>
- #include <notification/notification_messages.h>
- #include <storage/storage.h>
- #include <gui/modules/submenu.h>
- #include <gui/modules/popup.h>
- #include <gui/modules/loading.h>
- #include <gui/modules/text_input.h>
- #include <gui/modules/text_box.h>
- #include <gui/modules/widget.h>
- #include <input/input.h>
- #include <lib/nfc/nfc.h>
- #include <nfc/nfc_listener.h>
- #include <nfc/nfc_poller.h>
- #include <nfc/nfc_device.h>
- /* generated by fbt from .png files in images folder */
- #include <seos_icons.h>
- #include "seos.h"
- #include "keys.h"
- #include "seos_hci.h"
- #include "seos_characteristic.h"
- #include "seos_native_peripheral.h"
- #include "seos_central.h"
- #include "seos_common.h"
- #include "seos_reader.h"
- #include "seos_emulator.h"
- #include "scenes/seos_scene.h"
- #include "des_cmac.h"
- #include "aes_cmac.h"
- #define SEOS_TEXT_STORE_SIZE 128
- enum SeosCustomEvent {
- // Reserve first 100 events for button types and indexes, starting from 0
- SeosCustomEventReserved = 100,
- SeosCustomEventViewExit,
- SeosCustomEventTextInputDone,
- // Read card events
- SeosCustomEventReaderError,
- SeosCustomEventReaderSuccess,
- SeosCustomEventHCIInit,
- // Events during emulating or reading
- SeosCustomEventScan,
- SeosCustomEventFound,
- SeosCustomEventEmulate,
- SeosCustomEventADFMatched,
- SeosCustomEventAIDSelected,
- SeosCustomEventConnected,
- SeosCustomEventAuthenticated,
- SeosCustomEventSIORequested,
- SeosCustomEventAdvertising,
- };
- struct Seos {
- bool is_debug_enabled;
- ViewDispatcher* view_dispatcher;
- Gui* gui;
- NotificationApp* notifications;
- SceneManager* scene_manager;
- Storage* storage;
- char text_store[SEOS_TEXT_STORE_SIZE + 1];
- FuriString* text_box_store;
- // Common Views
- Submenu* submenu;
- Popup* popup;
- Loading* loading;
- TextInput* text_input;
- TextBox* text_box;
- Widget* widget;
- Nfc* nfc;
- NfcListener* listener;
- NfcPoller* poller;
- NfcDevice* nfc_device;
- SeosCredential credential;
- // NFC
- SeosEmulator* seos_emulator;
- SeosReader* seos_reader;
- // BLE
- bool has_external_ble;
- SeosCharacteristic* seos_characteristic;
- SeosCentral* seos_central;
- FlowMode flow_mode;
- char dev_name[SEOS_FILE_NAME_MAX_LENGTH + 1];
- FuriString* load_path;
- DialogsApp* dialogs;
- bool keys_loaded;
- Bt* bt;
- FuriHalBleProfileBase* ble_profile;
- SeosNativePeripheral* native_peripheral;
- };
- typedef enum {
- SeosViewMenu,
- SeosViewPopup,
- SeosViewLoading,
- SeosViewTextInput,
- SeosViewTextBox,
- SeosViewWidget,
- } SeosView;
- void seos_text_store_set(Seos* seos, const char* text, ...);
- void seos_text_store_clear(Seos* seos);
- void seos_blink_start(Seos* seos);
- void seos_blink_stop(Seos* seos);
- void seos_show_loading_popup(void* context, bool show);
|