|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include <SaoModule.h>
Public Member Functions | |
| const char * | getName () const override |
| const char * | getVersion () const override |
| Returns the module version string. | |
| core::ServiceState | getState () const override |
| bool | init () override |
| bool | start () override |
| void | stop () override |
| uint8_t | getMenuItems (core::ModuleMenuItem *items, uint8_t maxItems) override |
| Returns module menu items. | |
| void | onUnlock () override |
| Called when device is unlocked. | |
| Public Member Functions inherited from cdc::core::IModule | |
| virtual bool | exportBackup (cJSON *out) |
| Exports this module's data as a JSON section for the backup file. | |
| virtual BackupResult | importBackup (const cJSON *in) |
| Restores this module's data from its JSON backup section. | |
| virtual ui::IView * | getEntryView () |
| Returns the module's entry view (main view when selected from menu). | |
| virtual uint8_t | getLockScreenContextItems (LockScreenContextItem *items, uint8_t maxItems) |
| Returns the module's lock screen context menu items. | |
| virtual void | onLock () |
| Called when device is locked. | |
| virtual void | onUsbConnect () |
| Called when USB is connected. | |
| virtual void | onUsbDisconnect () |
| Called when USB is disconnected. | |
| virtual void | onTick (uint32_t nowMs) |
| Called periodically (optional tick for background work). | |
| virtual void | setSlotRange (const SlotRange &range) |
| Sets the slot range assigned by the module registry (from compile-time memory map). | |
| virtual SlotRequest | getSlotRequest () const |
| Returns slot requirements for this module (from compile-time memory map). | |
| Public Member Functions inherited from cdc::core::IService | |
| virtual | ~IService ()=default |
Static Public Member Functions | |
| static SaoModule & | instance () |
Definition at line 7 of file SaoModule.h.
|
overridevirtual |
Returns module menu items.
| items | Output array to fill. |
| maxItems | Maximum items to return. |
Reimplemented from cdc::core::IModule.
Definition at line 59 of file SaoModule.cpp.
References cdc::mod_sao::getInfoView(), getName(), cdc::core::TOOLS_MENU, and cdc::ui::tr().
|
inlineoverridevirtual |
Get service name (for logging/debugging)
Implements cdc::core::IService.
Definition at line 11 of file SaoModule.h.
Referenced by getMenuItems().
|
inlineoverridevirtual |
Get current service state
Implements cdc::core::IService.
Definition at line 13 of file SaoModule.h.
|
inlineoverridevirtual |
Returns the module version string.
Implements cdc::core::IModule.
Definition at line 12 of file SaoModule.h.
|
overridevirtual |
Initialize the service (called once during boot)
Implements cdc::core::IService.
Definition at line 35 of file SaoModule.cpp.
References cdc::core::INITIALIZED, cdc::core::ModuleRegistry::instance(), LOG_I, cdc::core::ModuleRegistry::registerModule(), cdc::mod_sao::registerStrings(), and TAG.
|
static |
Definition at line 30 of file SaoModule.cpp.
|
overridevirtual |
Called when device is unlocked.
Reimplemented from cdc::core::IModule.
Definition at line 73 of file SaoModule.cpp.
References sao_scan(), and cdc::core::STARTED.
|
overridevirtual |
Start the service (can be called after init or stop)
Implements cdc::core::IService.
Definition at line 43 of file SaoModule.cpp.
References cdc::core::INITIALIZED, LOG_W, sao_init(), cdc::core::STARTED, cdc::core::STOPPED, and TAG.
|
overridevirtual |
Stop the service (reversible, can start again)
Implements cdc::core::IService.
Definition at line 55 of file SaoModule.cpp.
References cdc::core::STOPPED.