43 const char* (*getLabel)();
121 (void)items; (void)maxItems;
138 (void)items; (void)maxItems;
166 virtual void onTick(uint32_t nowMs) { (void)nowMs; }
Module interface that extends IService with module-specific features.
virtual void onTick(uint32_t nowMs)
Called periodically (optional tick for background work).
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 bool exportBackup(cJSON *out)
Exports this module's data as a JSON section for the backup file.
virtual uint8_t getMenuItems(ModuleMenuItem *items, uint8_t maxItems)
Returns module menu items.
virtual const char * getVersion() const =0
Returns the module version string.
virtual SlotRequest getSlotRequest() const
Returns slot requirements for this module (from compile-time memory map).
virtual void onUsbDisconnect()
Called when USB is disconnected.
virtual BackupResult importBackup(const cJSON *in)
Restores this module's data from its JSON backup section.
virtual void onLock()
Called when device is locked.
virtual void onUsbConnect()
Called when USB is connected.
virtual void setSlotRange(const SlotRange &range)
Sets the slot range assigned by the module registry (from compile-time memory map).
virtual void onUnlock()
Called when device is unlocked.
MenuLocation
Menu location for module registration.
Centralized key-code constants for cdc_views.
Per-module restore outcome reported by importBackup().
uint16_t failed
Records skipped due to errors.
uint16_t imported
Records restored successfully.
Lock screen context menu item registered by a module.