|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include "mod_vcard/VcardModule.h"#include "mod_vcard/VcardWizard.h"#include "mod_vcard/vcard_store.h"#include "cdc_msg/MessageTransfer.h"#include "serial_cmd/ICommandRegistry.h"#include "serial_cmd/SubCommand.h"#include "serial_cmd/Console.h"#include "cdc_core/ModuleRegistry.h"#include "cdc_core/EventBus.h"#include "cdc_core/Raii.h"#include "cdc_ui/BackupImport.h"#include "cJSON.h"#include "cdc_ui/I18n.h"#include "cdc_ui/ViewStack.h"#include "cdc_views/ListView.h"#include "cdc_views/InfoView.h"#include "cdc_views/ConfirmView.h"#include "cdc_views/ContextMenuView.h"#include "cdc_views/QRCodeView.h"#include "esp_timer.h"#include "cdc_views/ToastView.h"#include "cdc_log.h"#include "esp_attr.h"#include "freertos/FreeRTOS.h"#include "freertos/semphr.h"#include <cstring>#include <cstdio>#include <cstdlib>Go to the source code of this file.
Namespaces | |
| namespace | cdc |
| namespace | cdc::mod_vcard |
Enumerations | |
| enum | cdc::mod_vcard::MainMenuItem { cdc::mod_vcard::MENU_MY_VCARD = 0 , cdc::mod_vcard::MENU_EDIT_MY_VCARD , cdc::mod_vcard::MENU_SEND , cdc::mod_vcard::MENU_RECEIVED , cdc::mod_vcard::MENU_COUNT } |
| Main-menu item identifiers. More... | |
Functions | |
| static const char * | cdc::mod_vcard::mstr (uint16_t offset) |
| static void | cdc::mod_vcard::registerStrings () |
| static void | cdc::mod_vcard::rebuildMainMenu () |
| Rebuilds the vCard main menu. | |
| static void | cdc::mod_vcard::onMainMenuSelect (uint16_t index, void *userData) |
| Handles main-menu actions for local vCard operations and sharing. | |
| static void | cdc::mod_vcard::openReceivedList () |
| Lazily wires callbacks, rebuilds and pushes the received-contacts list. | |
| static void | cdc::mod_vcard::rebuildReceivedList () |
| Rebuilds the received-contacts list from the store (sorted by name). | |
| static void | cdc::mod_vcard::showVcardDetails (const char *title, const char *raw, bool withActions) |
| Renders a vCard's parsed fields into a scrollable InfoView. | |
| static void | cdc::mod_vcard::showVcardQr (const char *raw, const char *fallbackTitle) |
| Shows a vCard as a QR code, titled with the contact name. | |
| static void | cdc::mod_vcard::onReceivedViewMenu (void *userData) |
| Detail-view context menu (key 3): edit / forward / QR / delete the currently shown contact. | |
| static bool | cdc::mod_vcard::deliverVcard (const uint8_t *data, uint32_t len, const char *, const char *) |
| Delivers a received vCard into the contact store. | |
| static void | cdc::mod_vcard::onReceivedSelect (uint16_t index, void *userData) |
| Opens the detail view (with action menu) for the selected contact. | |
| static void | cdc::mod_vcard::ctxReceivedAdd () |
| Context-menu action: create a new stored contact via the wizard. | |
| static void | cdc::mod_vcard::ctxReceivedEdit () |
| Context-menu action: edit the active stored contact via the wizard. | |
| static void | cdc::mod_vcard::ctxReceivedQr () |
| Context-menu action: show the active contact as a QR code. | |
| static void | cdc::mod_vcard::ctxReceivedForward () |
| Context-menu action: forward the active contact to a nearby badge. | |
| static void | cdc::mod_vcard::onReceivedDeleteConfirm (void *userData) |
| Confirm-dialog handler: deletes the contact and refreshes the list. | |
| static void | cdc::mod_vcard::ctxReceivedDelete () |
| Context-menu action: confirm and delete the active contact. | |
| static void | cdc::mod_vcard::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 * | cdc::mod_vcard::getMyVcardLockscreenLabel () |
| Returns the localized label for the lock-screen quick action. | |
| static void | cdc::mod_vcard::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 | cdc::mod_vcard::vcard_session_clear () |
| static void | cdc::mod_vcard::vcard_idle_fired (void *) |
| static void | cdc::mod_vcard::vcard_arm_idle_timer () |
| static bool | cdc::mod_vcard::vcardLineInterceptor (const char *line) |
| Intercepts multiline vCard paste input, accumulates lines, and stops at "---". | |
| static void | cdc::mod_vcard::cmdVcardSet (const char *args) |
| Serial command entering multiline vCard paste mode. | |
| static void | cdc::mod_vcard::vcardPrintLines (char *out) |
| Prints a NUL-terminated vCard buffer line by line as CRLF output. | |
| static void | cdc::mod_vcard::cmdVcardGet (const char *args) |
| Serial command printing a stored vCard. | |
| static void | cdc::mod_vcard::cmdVcardList (const char *args) |
| Serial command listing received vCards as "<id> <display name>". | |
| static void | cdc::mod_vcard::cmdVcardDelete (const char *args) |
| Serial command deleting a stored vCard. | |
| static void | cdc::mod_vcard::cmdVcard (const char *args) |
| static void | cdc::mod_vcard::registerSerialCommands () |
| Registers serial commands exposed by vCard module. | |
| static bool | cdc::mod_vcard::importReceivedVcard (const cJSON *je, void *user) |
| Imports one received vCard string into storage. | |
| void | mod_vcard_register () |
| Registers vCard module initializer in global module registry. | |
| void mod_vcard_register | ( | ) |
Registers vCard module initializer in global module registry.
Definition at line 983 of file VcardModule.cpp.
References cdc::core::ModuleRegistry::instance(), and cdc::core::ModuleRegistry::registerInitializer().
|
static |
Definition at line 30 of file VcardModule.cpp.