|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
Classes | |
| class | VcardModule |
| class | VcardWizard |
| Wizard for creating or editing the device owner's vCard via the GUI. More... | |
| struct | vcard_meta_t |
| struct | FieldRef |
| Maps a step ID to the matching field inside vcard_data_t. More... | |
| struct | WizardState |
| Holds the wizard's running state between callback firings. More... | |
Enumerations | |
| enum | MainMenuItem { MENU_MY_VCARD = 0 , MENU_EDIT_MY_VCARD , MENU_SEND , MENU_RECEIVED , MENU_COUNT } |
| Main-menu item identifiers. More... | |
| enum | WizardStepId : uint8_t { STEP_GIVEN = 0 , STEP_FAMILY , STEP_FORMATTED , STEP_ORG , STEP_TITLE , STEP_EMAIL , STEP_TEL_CELL , STEP_TEL_HOME , STEP_TEL_WORK , STEP_URL , STEP_TELEGRAM , STEP_SIGNAL , STEP_MATRIX , STEP_THREEMA , STEP_SOCIAL , STEP_NOTE , STEP_COUNT } |
| Step indices into the wizard's title offset table. Order must match s_steps[] below. More... | |
| enum class | WizardTarget : uint8_t { OWN = 0 , RECEIVED_NEW , RECEIVED_EDIT } |
| Save destination for the wizard's generated vCard. More... | |
Functions | |
| static const char * | mstr (uint16_t offset) |
| static void | registerStrings () |
| static void | rebuildMainMenu () |
| Rebuilds the vCard main menu. | |
| static void | onMainMenuSelect (uint16_t index, void *userData) |
| Handles main-menu actions for local vCard operations and sharing. | |
| static void | openReceivedList () |
| Lazily wires callbacks, rebuilds and pushes the received-contacts list. | |
| static void | rebuildReceivedList () |
| Rebuilds the received-contacts list from the store (sorted by name). | |
| static void | showVcardDetails (const char *title, const char *raw, bool withActions) |
| Renders a vCard's parsed fields into a scrollable InfoView. | |
| static void | showVcardQr (const char *raw, const char *fallbackTitle) |
| Shows a vCard as a QR code, titled with the contact name. | |
| static void | onReceivedViewMenu (void *userData) |
| Detail-view context menu (key 3): edit / forward / QR / delete the currently shown contact. | |
| static bool | deliverVcard (const uint8_t *data, uint32_t len, const char *, const char *) |
| Delivers a received vCard into the contact store. | |
| static void | onReceivedSelect (uint16_t index, void *userData) |
| Opens the detail view (with action menu) for the selected contact. | |
| static void | ctxReceivedAdd () |
| Context-menu action: create a new stored contact via the wizard. | |
| static void | ctxReceivedEdit () |
| Context-menu action: edit the active stored contact via the wizard. | |
| static void | ctxReceivedQr () |
| Context-menu action: show the active contact as a QR code. | |
| static void | ctxReceivedForward () |
| Context-menu action: forward the active contact to a nearby badge. | |
| static void | onReceivedDeleteConfirm (void *userData) |
| Confirm-dialog handler: deletes the contact and refreshes the list. | |
| static void | ctxReceivedDelete () |
| Context-menu action: confirm and delete the active contact. | |
| static void | onReceivedMenu (uint16_t index, void *userData) |
| List context menu (key 3): add a contact; for a selected entry also edit / forward / delete it. | |
| static const char * | getMyVcardLockscreenLabel () |
| Returns the localized label for the lock-screen quick action. | |
| static void | onMyVcardLockscreenSelect () |
| Lock-screen quick action: shows the own vCard as a QR code. Falls back to a toast when no vCard has been configured yet. | |
| static void | vcard_session_clear () |
| static void | vcard_idle_fired (void *) |
| static void | vcard_arm_idle_timer () |
| static bool | vcardLineInterceptor (const char *line) |
| Intercepts multiline vCard paste input, accumulates lines, and stops at "---". | |
| static void | cmdVcardSet (const char *args) |
| Serial command entering multiline vCard paste mode. | |
| static void | vcardPrintLines (char *out) |
| Prints a NUL-terminated vCard buffer line by line as CRLF output. | |
| static void | cmdVcardGet (const char *args) |
| Serial command printing a stored vCard. | |
| static void | cmdVcardList (const char *args) |
| Serial command listing received vCards as "<id> <display name>". | |
| static void | cmdVcardDelete (const char *args) |
| Serial command deleting a stored vCard. | |
| static void | cmdVcard (const char *args) |
| static void | registerSerialCommands () |
| Registers serial commands exposed by vCard module. | |
| static bool | importReceivedVcard (const cJSON *je, void *user) |
| Imports one received vCard string into storage. | |
| static char * | fGiven (vcard_data_t *d) |
| static char * | fFamily (vcard_data_t *d) |
| static char * | fFn (vcard_data_t *d) |
| static char * | fOrg (vcard_data_t *d) |
| static char * | fTitle (vcard_data_t *d) |
| static char * | fEmail (vcard_data_t *d) |
| static char * | fCell (vcard_data_t *d) |
| static char * | fHome (vcard_data_t *d) |
| static char * | fWork (vcard_data_t *d) |
| static char * | fUrl (vcard_data_t *d) |
| static char * | fTele (vcard_data_t *d) |
| static char * | fSig (vcard_data_t *d) |
| static char * | fMatrix (vcard_data_t *d) |
| static char * | fThreema (vcard_data_t *d) |
| static char * | fSocial (vcard_data_t *d) |
| static char * | fNote (vcard_data_t *d) |
| static const char * | stepTitle (uint8_t step) |
| Returns the localized title for a wizard step via the configured resolver. | |
| static void | onStepSave (const char *text) |
| Forward declaration of the single per-step save handler. | |
| static void | pushCurrentStep () |
| Pushes the T9 input view for the current wizard step. Prefills the input with the current field value (which may have been seeded from a pre-existing vCard in edit mode, or auto-suggested for FN). | |
| static void | wizardFinish () |
| Persists wizard data and returns to the anchor view on success. | |
Variables | |
| constexpr ui::I18nEntry | kStrings [] |
| static constexpr uint16_t | STR_VCARD = 0 |
| static constexpr uint16_t | STR_MY_VCARD = 1 |
| static constexpr uint16_t | STR_NEARBY = 2 |
| static constexpr uint16_t | STR_SCAN = 3 |
| static constexpr uint16_t | STR_STOP_SCAN = 4 |
| static constexpr uint16_t | STR_ADVERTISING = 5 |
| static constexpr uint16_t | STR_STOP_ADV = 6 |
| static constexpr uint16_t | STR_EXCHANGE = 7 |
| static constexpr uint16_t | STR_NO_PEERS = 8 |
| static constexpr uint16_t | STR_SCANNING = 9 |
| static constexpr uint16_t | STR_EXCHANGE_REQ = 10 |
| static constexpr uint16_t | STR_ACCEPT = 11 |
| static constexpr uint16_t | STR_DECLINE = 12 |
| static constexpr uint16_t | STR_EXCHANGE_OK = 13 |
| static constexpr uint16_t | STR_EXCHANGE_FAIL = 14 |
| static constexpr uint16_t | STR_CONNECTING = 15 |
| static constexpr uint16_t | STR_EDIT_MY_VCARD = 16 |
| static constexpr uint16_t | STR_NO_VCARD = 17 |
| static constexpr uint16_t | STR_SAVED = 18 |
| static constexpr uint16_t | STR_GIVEN_NAME = 19 |
| static constexpr uint16_t | STR_FAMILY_NAME = 20 |
| static constexpr uint16_t | STR_FORMATTED_NAME = 21 |
| static constexpr uint16_t | STR_ORGANIZATION = 22 |
| static constexpr uint16_t | STR_POSITION = 23 |
| static constexpr uint16_t | STR_EMAIL = 24 |
| static constexpr uint16_t | STR_TEL_CELL = 25 |
| static constexpr uint16_t | STR_TEL_HOME = 26 |
| static constexpr uint16_t | STR_TEL_WORK = 27 |
| static constexpr uint16_t | STR_URL = 28 |
| static constexpr uint16_t | STR_TELEGRAM = 29 |
| static constexpr uint16_t | STR_SIGNAL = 30 |
| static constexpr uint16_t | STR_MATRIX = 31 |
| static constexpr uint16_t | STR_THREEMA = 32 |
| static constexpr uint16_t | STR_SOCIAL_PROFILE = 33 |
| static constexpr uint16_t | STR_NOTE = 34 |
| static constexpr uint16_t | STR_SEND = 35 |
| static constexpr uint16_t | STR_RECEIVED = 36 |
| static constexpr uint16_t | STR_RECEIVED_TITLE = 37 |
| static constexpr uint16_t | STR_NO_RECEIVED = 38 |
| static constexpr uint16_t | STR_SHOW_QR = 39 |
| static constexpr uint16_t | STR_FORWARD = 40 |
| static constexpr uint16_t | STR_CONFIRM_DELETE = 41 |
| static const uint16_t | s_wizardStepOffsets [16] |
| static ui::ListView | s_mainMenu |
| View instances used by vCard module UI flow. | |
| static bool | s_viewsInitialized = false |
| static ui::ListItem | s_mainMenuItems [MENU_COUNT] = {} |
| static ui::ListView | s_receivedMenu |
| static bool | s_receivedInitialized = false |
| static ui::ListItem | s_recvItems [VCARD_MAX_CARDS] |
| static char | s_recvLabels [VCARD_MAX_CARDS][64] |
| static uint16_t | s_recvSlots [VCARD_MAX_CARDS] |
| static uint16_t | s_recvCount = 0 |
| static uint16_t | s_activeSlot = 0 |
| static char | s_vcardBuf [VCARD_MAX_LEN+64] |
| static int | s_vcardBufPos = 0 |
| static bool | s_vcardInputMode = false |
| static int | s_vcardSetSlot = -1 |
| static esp_timer_handle_t | s_vcardIdleTimer = nullptr |
| static constexpr int64_t | VCARD_IDLE_LIMIT_US = 30 * 1000000LL |
| static const serial::SubCommand | kVcardSubs [] |
| static constexpr int | kSchemaVer = 1 |
| Schema version written to and expected from the vCard backup section. | |
| static const FieldRef | k_steps [STEP_COUNT] |
| Step descriptor table. Step order is fixed at compile time. The maximum input length for each step is clamped to the smaller of the struct field size and the T9 input view's text limit. | |
| static WizardState | s_wizard = {} |
| static ui::T9InputView | s_t9Input |
| static VcardWizard::StringResolver | s_resolver = nullptr |
| static const uint16_t * | s_titleOffsets = nullptr |
| static uint16_t | s_savedOffset = 0 |
| static uint16_t | s_failedOffset = 0 |
Main-menu item identifiers.
| Enumerator | |
|---|---|
| MENU_MY_VCARD | |
| MENU_EDIT_MY_VCARD | |
| MENU_SEND | |
| MENU_RECEIVED | |
| MENU_COUNT | |
Definition at line 148 of file VcardModule.cpp.
| enum cdc::mod_vcard::WizardStepId : uint8_t |
Step indices into the wizard's title offset table. Order must match s_steps[] below.
Definition at line 22 of file VcardWizard.cpp.
|
strong |
Save destination for the wizard's generated vCard.
| Enumerator | |
|---|---|
| OWN | Persist via vcard_store_set_own(). |
| RECEIVED_NEW | Add a new stored contact. |
| RECEIVED_EDIT | Overwrite the stored contact at editSlot. |
Definition at line 94 of file VcardWizard.cpp.
|
static |
Definition at line 751 of file VcardModule.cpp.
References cdc::serial::dispatchSubCommand(), and kVcardSubs.
Referenced by registerSerialCommands().
|
static |
Serial command deleting a stored vCard.
Without an argument it deletes the own card. With a numeric args it deletes the received card stored under that slot id (as listed by VCARD LIST).
| args | Optional received-card slot id. |
Definition at line 722 of file VcardModule.cpp.
References VCARD_MAX_CARDS, vcard_store_clear_own(), and vcard_store_delete().
|
static |
Serial command printing a stored vCard.
Without an argument it prints the own card, or an empty 4.0 template if none is set. With a numeric args it prints the received card stored under that slot id (as listed by VCARD LIST).
| args | Optional received-card slot id. |
Definition at line 652 of file VcardModule.cpp.
References VCARD_MAX_CARDS, VCARD_MAX_LEN, vcard_store_get(), vcard_store_get_own(), and vcardPrintLines().
|
static |
Serial command listing received vCards as "<id> <display name>".
| args | Unused command arguments. |
Definition at line 697 of file VcardModule.cpp.
References name, VCARD_MAX_CARDS, vcard_store_get_display(), and vcard_store_get_sorted().
|
static |
Serial command entering multiline vCard paste mode.
Without an argument it sets the own card. With a numeric args it overwrites the received card stored under that slot id (as listed by VCARD LIST).
| args | Optional received-card slot id to overwrite. |
Definition at line 603 of file VcardModule.cpp.
References cdc::serial::getCommandRegistry(), s_vcardBufPos, s_vcardInputMode, s_vcardSetSlot, cdc::serial::ICommandRegistry::setLineInterceptor(), vcard_arm_idle_timer(), VCARD_MAX_CARDS, vcard_store_get_display(), and vcardLineInterceptor().
|
static |
Context-menu action: create a new stored contact via the wizard.
Definition at line 380 of file VcardModule.cpp.
References rebuildReceivedList(), s_receivedMenu, and cdc::mod_vcard::VcardWizard::startReceived().
Referenced by onReceivedMenu().
|
static |
Context-menu action: confirm and delete the active contact.
Definition at line 423 of file VcardModule.cpp.
References mstr(), onReceivedDeleteConfirm(), s_activeSlot, cdc::ui::showConfirm(), STR_CONFIRM_DELETE, and cdc::ui::ConfirmView::WARNING.
Referenced by onReceivedMenu(), and onReceivedViewMenu().
|
static |
Context-menu action: edit the active stored contact via the wizard.
Definition at line 385 of file VcardModule.cpp.
References cdc::mod_vcard::VcardWizard::editReceived(), rebuildReceivedList(), s_activeSlot, and s_receivedMenu.
Referenced by onReceivedMenu(), and onReceivedViewMenu().
|
static |
Context-menu action: forward the active contact to a nearby badge.
Definition at line 397 of file VcardModule.cpp.
References s_activeSlot, VCARD_MAX_LEN, and vcard_store_get().
Referenced by onReceivedMenu(), and onReceivedViewMenu().
|
static |
Context-menu action: show the active contact as a QR code.
Definition at line 390 of file VcardModule.cpp.
References mstr(), s_activeSlot, showVcardQr(), STR_RECEIVED_TITLE, VCARD_MAX_LEN, and vcard_store_get().
Referenced by onReceivedViewMenu().
|
static |
Delivers a received vCard into the contact store.
Invoked by the message-transfer framework after the user consented and the encrypted transfer completed. data is UNTRUSTED, attacker-controlled and not NUL-terminated; it is copied into a bounded buffer before parsing.
Definition at line 183 of file VcardModule.cpp.
References LOG_W, TAG, VCARD_MAX_LEN, and vcard_store_add().
Referenced by cdc::mod_vcard::VcardModule::init().
|
static |
Definition at line 56 of file VcardWizard.cpp.
References vcard_data_t::tel_cell.
|
static |
Definition at line 55 of file VcardWizard.cpp.
References vcard_data_t::email.
|
static |
Definition at line 51 of file VcardWizard.cpp.
References vcard_data_t::family_name.
|
static |
Definition at line 52 of file VcardWizard.cpp.
References vcard_data_t::formatted_name.
|
static |
Definition at line 50 of file VcardWizard.cpp.
References vcard_data_t::given_name.
|
static |
Definition at line 57 of file VcardWizard.cpp.
References vcard_data_t::tel_home.
|
static |
Definition at line 62 of file VcardWizard.cpp.
References vcard_data_t::impp_matrix.
|
static |
Definition at line 65 of file VcardWizard.cpp.
References vcard_data_t::note.
|
static |
Definition at line 53 of file VcardWizard.cpp.
References vcard_data_t::organization.
|
static |
Definition at line 61 of file VcardWizard.cpp.
References vcard_data_t::impp_signal.
|
static |
Definition at line 64 of file VcardWizard.cpp.
References vcard_data_t::social_profile.
|
static |
Definition at line 60 of file VcardWizard.cpp.
References vcard_data_t::impp_telegram.
|
static |
Definition at line 63 of file VcardWizard.cpp.
References vcard_data_t::impp_threema.
|
static |
Definition at line 54 of file VcardWizard.cpp.
References vcard_data_t::title.
|
static |
Definition at line 59 of file VcardWizard.cpp.
References vcard_data_t::url.
|
static |
Definition at line 58 of file VcardWizard.cpp.
References vcard_data_t::tel_work.
|
static |
Returns the localized label for the lock-screen quick action.
Definition at line 483 of file VcardModule.cpp.
References mstr(), and STR_MY_VCARD.
Referenced by cdc::mod_vcard::VcardModule::getLockScreenContextItems().
|
static |
Imports one received vCard string into storage.
The vCard's identity is its full text; the store deduplicates on exact text, so an already-present card counts as imported (no-op upsert). Genuine validation/storage failures return false to be tallied as failed.
| je | JSON array element (expected to be a string). |
| user | Unused. |
Definition at line 924 of file VcardModule.cpp.
References vcard_store_add(), and vcard_store_contains().
Referenced by cdc::mod_vcard::VcardModule::importBackup().
|
static |
Definition at line 130 of file VcardModule.cpp.
References kStrings, and cdc::ui::tr().
Referenced by ctxReceivedDelete(), ctxReceivedQr(), cdc::mod_vcard::VcardModule::getMenuItems(), getMyVcardLockscreenLabel(), cdc::mod_vcard::VcardModule::init(), onMainMenuSelect(), onMyVcardLockscreenSelect(), onReceivedMenu(), onReceivedSelect(), onReceivedViewMenu(), rebuildMainMenu(), rebuildReceivedList(), and showVcardDetails().
|
static |
Handles main-menu actions for local vCard operations and sharing.
| index | Selected menu index. |
| userData | Optional callback context (unused). |
Definition at line 301 of file VcardModule.cpp.
References cdc::mod_vcard::VcardWizard::edit(), MENU_EDIT_MY_VCARD, MENU_MY_VCARD, MENU_RECEIVED, MENU_SEND, mstr(), openReceivedList(), s_mainMenu, cdc::ui::showToastInfo(), showVcardDetails(), cdc::mod_vcard::VcardWizard::start(), STR_MY_VCARD, STR_NO_VCARD, VCARD_MAX_LEN, vcard_store_get_own(), and vcard_store_has_own().
Referenced by cdc::mod_vcard::VcardModule::getMenuItems().
|
static |
Lock-screen quick action: shows the own vCard as a QR code. Falls back to a toast when no vCard has been configured yet.
Definition at line 491 of file VcardModule.cpp.
References mstr(), cdc::ui::showToastError(), showVcardQr(), STR_MY_VCARD, STR_NO_VCARD, VCARD_MAX_LEN, and vcard_store_get_own().
Referenced by cdc::mod_vcard::VcardModule::getLockScreenContextItems().
|
static |
Confirm-dialog handler: deletes the contact and refreshes the list.
| userData | Pointer to the store slot to delete. |
Definition at line 410 of file VcardModule.cpp.
References cdc::ui::ViewStack::instance(), cdc::ui::ViewStack::popToAnchor(), rebuildReceivedList(), s_receivedMenu, cdc::ui::showToastError(), cdc::ui::showToastSuccess(), cdc::ui::tr(), and vcard_store_delete().
Referenced by ctxReceivedDelete().
|
static |
List context menu (key 3): add a contact; for a selected entry also edit / forward / delete it.
| index | Unused on-screen position. |
| userData | Encoded store slot of the selected contact. |
Definition at line 449 of file VcardModule.cpp.
References ctxReceivedAdd(), ctxReceivedDelete(), ctxReceivedEdit(), ctxReceivedForward(), mstr(), s_activeSlot, s_recvCount, cdc::ui::showContextMenu(), STR_FORWARD, and cdc::ui::tr().
Referenced by openReceivedList().
|
static |
Opens the detail view (with action menu) for the selected contact.
| index | Unused on-screen position. |
| userData | Encoded store slot of the selected contact. |
Definition at line 371 of file VcardModule.cpp.
References mstr(), s_activeSlot, showVcardDetails(), STR_RECEIVED_TITLE, VCARD_MAX_LEN, and vcard_store_get().
Referenced by openReceivedList().
|
static |
Detail-view context menu (key 3): edit / forward / QR / delete the currently shown contact.
Definition at line 432 of file VcardModule.cpp.
References ctxReceivedDelete(), ctxReceivedEdit(), ctxReceivedForward(), ctxReceivedQr(), mstr(), cdc::ui::showContextMenu(), STR_FORWARD, STR_SHOW_QR, and cdc::ui::tr().
Referenced by showVcardDetails().
|
static |
Forward declaration of the single per-step save handler.
Per-step save handler. Copies the entered text into the matching struct field, advances to the next step, and finishes the wizard after the last step.
Definition at line 219 of file VcardWizard.cpp.
References cdc::mod_vcard::FieldRef::get, k_steps, cdc::mod_vcard::FieldRef::maxLen, pushCurrentStep(), s_wizard, STEP_COUNT, and wizardFinish().
Referenced by pushCurrentStep().
|
static |
Lazily wires callbacks, rebuilds and pushes the received-contacts list.
Definition at line 466 of file VcardModule.cpp.
References cdc::ui::ViewStack::instance(), onReceivedMenu(), onReceivedSelect(), cdc::ui::ViewStack::push(), rebuildReceivedList(), s_receivedInitialized, and s_receivedMenu.
Referenced by onMainMenuSelect().
|
static |
Pushes the T9 input view for the current wizard step. Prefills the input with the current field value (which may have been seeded from a pre-existing vCard in edit mode, or auto-suggested for FN).
Definition at line 139 of file VcardWizard.cpp.
References vcard_data_t::formatted_name, cdc::mod_vcard::FieldRef::get, cdc::ui::ViewStack::instance(), k_steps, cdc::ui::T9InputView::MAX_TEXT_LEN, cdc::mod_vcard::FieldRef::maxLen, onStepSave(), cdc::ui::ViewStack::push(), s_t9Input, s_wizard, STEP_COUNT, STEP_FORMATTED, and stepTitle().
Referenced by cdc::mod_vcard::VcardWizard::edit(), cdc::mod_vcard::VcardWizard::editReceived(), onStepSave(), cdc::mod_vcard::VcardWizard::start(), and cdc::mod_vcard::VcardWizard::startReceived().
|
static |
Rebuilds the vCard main menu.
Definition at line 288 of file VcardModule.cpp.
References MENU_COUNT, MENU_EDIT_MY_VCARD, MENU_MY_VCARD, MENU_RECEIVED, MENU_SEND, mstr(), s_mainMenu, s_mainMenuItems, STR_EDIT_MY_VCARD, STR_MY_VCARD, STR_RECEIVED_TITLE, STR_SEND, and STR_VCARD.
Referenced by cdc::mod_vcard::VcardModule::getMenuItems().
|
static |
Rebuilds the received-contacts list from the store (sorted by name).
Definition at line 352 of file VcardModule.cpp.
References mstr(), s_receivedMenu, s_recvCount, s_recvItems, s_recvLabels, s_recvSlots, STR_NO_RECEIVED, STR_RECEIVED_TITLE, VCARD_MAX_CARDS, vcard_store_get_display(), and vcard_store_get_sorted().
Referenced by ctxReceivedAdd(), ctxReceivedEdit(), onReceivedDeleteConfirm(), and openReceivedList().
|
static |
Registers serial commands exposed by vCard module.
Definition at line 758 of file VcardModule.cpp.
References cmdVcard(), cdc::serial::getCommandRegistry(), and kVcardSubs.
Referenced by cdc::mod_vcard::VcardModule::init().
|
static |
Definition at line 135 of file VcardModule.cpp.
References cdc::ui::I18n::instance(), kStrings, and cdc::ui::I18n::registerEnglishTable().
Referenced by cdc::mod_vcard::VcardModule::init().
|
static |
Renders a vCard's parsed fields into a scrollable InfoView.
Shows the display/full name as the first line, then one "<label>: <value>" line per non-empty field, reusing the editor field labels. Falls back to the raw text when nothing parses.
| title | View header title. |
| raw | NUL-terminated vCard 4.0 text. |
| withActions | When true, key 3 opens the received-contact action menu. |
Definition at line 207 of file VcardModule.cpp.
References cdc::ui::InfoView::init(), cdc::ui::ViewStack::instance(), cdc::ui::InfoView::MAX_TEXT_LEN, mstr(), onReceivedViewMenu(), cdc::ui::ViewStack::push(), cdc::ui::InfoView::setOnMenu(), STR_EMAIL, STR_MATRIX, STR_NOTE, STR_ORGANIZATION, STR_POSITION, STR_SIGNAL, STR_SOCIAL_PROFILE, STR_TEL_CELL, STR_TEL_HOME, STR_TEL_WORK, STR_TELEGRAM, STR_THREEMA, STR_URL, and vcard_parse_to_struct().
Referenced by onMainMenuSelect(), and onReceivedSelect().
|
static |
Shows a vCard as a QR code, titled with the contact name.
| raw | NUL-terminated vCard text to encode. |
| fallbackTitle | Title used when the card carries no name. |
Definition at line 259 of file VcardModule.cpp.
References cdc::ui::showQRCode(), and vcard_parse_to_struct().
Referenced by ctxReceivedQr(), and onMyVcardLockscreenSelect().
|
static |
Returns the localized title for a wizard step via the configured resolver.
Definition at line 124 of file VcardWizard.cpp.
References s_resolver, s_titleOffsets, and STEP_COUNT.
Referenced by pushCurrentStep().
|
static |
Definition at line 531 of file VcardModule.cpp.
References s_vcardIdleTimer, vcard_idle_fired(), and VCARD_IDLE_LIMIT_US.
Referenced by cmdVcardSet(), and vcardLineInterceptor().
|
static |
Definition at line 524 of file VcardModule.cpp.
References cdc::serial::Console::printf(), s_vcardInputMode, cdc::serial::Console::showPrompt(), and vcard_session_clear().
Referenced by vcard_arm_idle_timer().
|
static |
Definition at line 515 of file VcardModule.cpp.
References cdc::serial::getCommandRegistry(), s_vcardBuf, s_vcardBufPos, s_vcardIdleTimer, s_vcardInputMode, s_vcardSetSlot, and cdc::serial::ICommandRegistry::setLineInterceptor().
Referenced by vcard_idle_fired(), and vcardLineInterceptor().
|
static |
Intercepts multiline vCard paste input, accumulates lines, and stops at "---".
| line | Incoming text line. |
Definition at line 551 of file VcardModule.cpp.
References s_vcardBuf, s_vcardBufPos, s_vcardInputMode, s_vcardSetSlot, vcard_arm_idle_timer(), vcard_session_clear(), vcard_store_set_own(), and vcard_store_update().
Referenced by cmdVcardSet().
|
static |
Prints a NUL-terminated vCard buffer line by line as CRLF output.
| out | Buffer holding the vCard text; consumed in place. |
Definition at line 630 of file VcardModule.cpp.
Referenced by cmdVcardGet().
|
static |
Persists wizard data and returns to the anchor view on success.
Definition at line 171 of file VcardWizard.cpp.
References cdc::ui::ViewStack::instance(), LOG_W, OWN, cdc::ui::ViewStack::popToAnchor(), RECEIVED_EDIT, RECEIVED_NEW, s_failedOffset, s_resolver, s_savedOffset, s_wizard, cdc::ui::showToastError(), cdc::ui::showToastSuccess(), TAG, cdc::ui::tr(), vcard_generate_from_struct(), VCARD_MAX_LEN, vcard_store_add(), vcard_store_set_own(), and vcard_store_update().
Referenced by onStepSave().
|
static |
Step descriptor table. Step order is fixed at compile time. The maximum input length for each step is clamped to the smaller of the struct field size and the T9 input view's text limit.
Definition at line 72 of file VcardWizard.cpp.
Referenced by onStepSave(), and pushCurrentStep().
|
staticconstexpr |
Schema version written to and expected from the vCard backup section.
Definition at line 873 of file VcardModule.cpp.
Referenced by cdc::mod_vcard::VcardModule::exportBackup(), and cdc::mod_vcard::VcardModule::importBackup().
|
constexpr |
Definition at line 34 of file VcardModule.cpp.
Referenced by mstr(), and registerStrings().
|
static |
Definition at line 743 of file VcardModule.cpp.
Referenced by cmdVcard(), and registerSerialCommands().
|
static |
Definition at line 165 of file VcardModule.cpp.
Referenced by ctxReceivedDelete(), ctxReceivedEdit(), ctxReceivedForward(), ctxReceivedQr(), onReceivedMenu(), and onReceivedSelect().
|
static |
Definition at line 119 of file VcardWizard.cpp.
Referenced by cdc::mod_vcard::VcardWizard::configure(), and wizardFinish().
|
static |
View instances used by vCard module UI flow.
Definition at line 142 of file VcardModule.cpp.
Referenced by cdc::mod_vcard::VcardModule::getMenuItems(), onMainMenuSelect(), and rebuildMainMenu().
|
static |
Definition at line 155 of file VcardModule.cpp.
Referenced by rebuildMainMenu().
|
static |
Definition at line 159 of file VcardModule.cpp.
Referenced by openReceivedList().
|
static |
Definition at line 158 of file VcardModule.cpp.
Referenced by ctxReceivedAdd(), ctxReceivedEdit(), onReceivedDeleteConfirm(), openReceivedList(), and rebuildReceivedList().
|
static |
Definition at line 163 of file VcardModule.cpp.
Referenced by onReceivedMenu(), and rebuildReceivedList().
|
static |
Definition at line 160 of file VcardModule.cpp.
Referenced by rebuildReceivedList().
|
static |
Definition at line 161 of file VcardModule.cpp.
Referenced by rebuildReceivedList().
|
static |
Definition at line 162 of file VcardModule.cpp.
Referenced by rebuildReceivedList().
|
static |
Definition at line 116 of file VcardWizard.cpp.
Referenced by cdc::mod_vcard::VcardWizard::configure(), stepTitle(), and wizardFinish().
|
static |
Definition at line 118 of file VcardWizard.cpp.
Referenced by cdc::mod_vcard::VcardWizard::configure(), and wizardFinish().
|
static |
Definition at line 114 of file VcardWizard.cpp.
Referenced by pushCurrentStep().
|
static |
Definition at line 117 of file VcardWizard.cpp.
Referenced by cdc::mod_vcard::VcardWizard::configure(), and stepTitle().
|
static |
Definition at line 505 of file VcardModule.cpp.
Referenced by vcard_session_clear(), and vcardLineInterceptor().
|
static |
Definition at line 506 of file VcardModule.cpp.
Referenced by cmdVcardSet(), vcard_session_clear(), and vcardLineInterceptor().
|
static |
Definition at line 510 of file VcardModule.cpp.
Referenced by vcard_arm_idle_timer(), and vcard_session_clear().
|
static |
Definition at line 507 of file VcardModule.cpp.
Referenced by cmdVcardSet(), vcard_idle_fired(), vcard_session_clear(), and vcardLineInterceptor().
|
static |
Definition at line 509 of file VcardModule.cpp.
Referenced by cmdVcardSet(), vcard_session_clear(), and vcardLineInterceptor().
|
static |
Definition at line 143 of file VcardModule.cpp.
Referenced by cdc::mod_vcard::VcardModule::getMenuItems().
|
static |
Definition at line 113 of file VcardWizard.cpp.
Referenced by cdc::mod_vcard::VcardWizard::edit(), cdc::mod_vcard::VcardWizard::editReceived(), onStepSave(), pushCurrentStep(), cdc::mod_vcard::VcardWizard::start(), cdc::mod_vcard::VcardWizard::startReceived(), and wizardFinish().
|
static |
Definition at line 123 of file VcardModule.cpp.
Referenced by cdc::mod_vcard::VcardModule::init().
|
staticconstexpr |
Definition at line 91 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 85 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 121 of file VcardModule.cpp.
Referenced by ctxReceivedDelete().
|
staticconstexpr |
Definition at line 95 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 92 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 96 of file VcardModule.cpp.
Referenced by rebuildMainMenu().
|
staticconstexpr |
Definition at line 104 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 87 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 94 of file VcardModule.cpp.
Referenced by cdc::mod_vcard::VcardModule::init().
|
staticconstexpr |
Definition at line 93 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 90 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 100 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 101 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 120 of file VcardModule.cpp.
Referenced by onReceivedMenu(), and onReceivedViewMenu().
|
staticconstexpr |
Definition at line 99 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 111 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 81 of file VcardModule.cpp.
Referenced by getMyVcardLockscreenLabel(), onMainMenuSelect(), onMyVcardLockscreenSelect(), and rebuildMainMenu().
|
staticconstexpr |
Definition at line 82 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 88 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 118 of file VcardModule.cpp.
Referenced by rebuildReceivedList().
|
staticconstexpr |
Definition at line 97 of file VcardModule.cpp.
Referenced by onMainMenuSelect(), and onMyVcardLockscreenSelect().
|
staticconstexpr |
Definition at line 114 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 102 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 103 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 116 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 117 of file VcardModule.cpp.
Referenced by ctxReceivedQr(), onReceivedSelect(), rebuildMainMenu(), and rebuildReceivedList().
|
staticconstexpr |
Definition at line 98 of file VcardModule.cpp.
Referenced by cdc::mod_vcard::VcardModule::init().
|
staticconstexpr |
Definition at line 83 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 89 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 115 of file VcardModule.cpp.
Referenced by rebuildMainMenu().
|
staticconstexpr |
Definition at line 119 of file VcardModule.cpp.
Referenced by onReceivedViewMenu().
|
staticconstexpr |
Definition at line 110 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 113 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 86 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 84 of file VcardModule.cpp.
|
staticconstexpr |
Definition at line 105 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 106 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 107 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 109 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 112 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 108 of file VcardModule.cpp.
Referenced by showVcardDetails().
|
staticconstexpr |
Definition at line 80 of file VcardModule.cpp.
Referenced by cdc::mod_vcard::VcardModule::getMenuItems(), and rebuildMainMenu().
|
staticconstexpr |
Definition at line 513 of file VcardModule.cpp.
Referenced by vcard_arm_idle_timer().