From afd245c205e2787e54cb7e2fd34de617eeceed25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 15 Aug 2022 22:26:03 +0200 Subject: Add basic serialization functions for ElvData. --- c/data.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'c/data.h') diff --git a/c/data.h b/c/data.h index a2b6cac..797271d 100644 --- a/c/data.h +++ b/c/data.h @@ -24,6 +24,10 @@ struct DlvData wchar_t wiki[128] = {0}; }; +constexpr size_t CB_SERIALIZE_ELVDATA = 1+sizeof(ElvData); +unsigned char* Serialize(const ElvData& e, unsigned char* buf); +unsigned char* Unserialize(ElvData& e, unsigned char* buf); + inline int FromWeb(const int iEp, ElvData& e, DlvData& d) noexcept { WcharPtr title, wiki, date, source, hint; -- cgit v1.2.3