// SPDX-License-Identifier: GPL-3.0-only // Persistent device configuration in NVS (Preferences). Holds the device id, WiFi // credentials, the API bearer token, and upload settings (upload is used from M3). // Secrets live here, never on the SD card in clear. #pragma once #include namespace config { // Open NVS and ensure a stable device id exists (derived from the MAC on first boot). bool begin(); String deviceId(); String wifiSsid(); String wifiPsk(); void setWifi(const String &ssid, const String &psk); // Bearer token for mutating API calls. Empty = auth disabled (open on a trusted LAN). String apiToken(); void setApiToken(const String &token); // Upload settings (consumed in M3). Getters return stored values or sensible defaults. String uploadTarget(); // "none" | "s3" | "webdav" void setUploadTarget(const String &target); } // namespace config