Files
trail-mate/platform/linux/common/include/app/linux_tms_document.h
T
Trail Mate Dev 6e613e382e Add CM0 Linux support and share device services across platforms
Compose the CM0 fullscreen application and standard Debian package, align the
Cardputer Zero shell, and share protocol, configuration, audio and storage
services with embedded targets through existing platform seams.

Add the paginated on-device TMAP creator using Center's published producer,
private workspace recovery and direct keyboard shortcuts. Preserve unfinished
management work behind its existing opt-in capability.

Include native, ARM and shared-core regression fixtures, integration records,
packaging helpers and dependency/license updates. Keep local build trees,
device credentials, produced packages and validation logs outside version control.

Validation before integration: ESP stack hygiene, Reticulum scope guard, staged
whitespace checks and GitNexus scope audit. Prior device/build evidence and
remaining hardware/package boundaries are recorded in the acceptance documents.
2026-10-29 10:29:29 +08:00

37 lines
1.4 KiB
C++

#pragma once
#include "app/reticulum_network_records.h"
#include "app/tms_c6_config_extension.h"
#include "app/tms_compatibility_records.h"
#include "app/tms_settings_records.h"
#include <memory>
#include <string>
namespace trailmate::linux_app
{
// Complete current-schema document staging, with no storage or live service
// effects. Keep this object on the heap. Callers commit only a successful parse.
// C6 settings are compatibility data on Linux. Cellular documents are rejected
// explicitly by the strict unknown-record policy until that block has an owner.
struct LinuxTmsDocument
{
app::AppConfig config;
app::tms::SettingsRecords settings;
chat::reticulum::ReticulumNetworkConfig network;
app::tms::CompatibilityRecords compatibility;
app::tms::c6::Config companion;
static std::unique_ptr<LinuxTmsDocument> parse(const char* bytes, size_t length,
app::tms::DocumentKind kind);
bool write(app::tms::DocumentKind kind, std::string& output);
private:
uint64_t network_seen_ = 0;
uint32_t access_seen_ = 0;
app::tms::ReticulumNetworkRecords network_records() { return {network, network_seen_, access_seen_}; }
static app::tms::RecordConsumeResult consume(void*, const app::tms::RecordReader&);
static bool finish(void*, bool, uint16_t);
static bool emit(void*, app::tms::RecordWriter&);
};
} // namespace trailmate::linux_app