#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* generated by fbt from .png files in images folder */ #include #include "seos.h" #include "keys.h" #include "seos_hci.h" #include "seos_credential.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; 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; 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);