From d5c1bf07db96143939d47e3c49cbc4fef308b3d3 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 14 Apr 2024 14:20:52 +0200 Subject: [PATCH] sneak in serializer json stuff (header only, no dep tracking) --- .../tox_messages/nj/tox_message_components.hpp | 14 ++++++++++++++ .../nj/tox_message_components_serializer.hpp | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 solanaceae/tox_messages/nj/tox_message_components.hpp create mode 100644 solanaceae/tox_messages/nj/tox_message_components_serializer.hpp diff --git a/solanaceae/tox_messages/nj/tox_message_components.hpp b/solanaceae/tox_messages/nj/tox_message_components.hpp new file mode 100644 index 0000000..cdf9827 --- /dev/null +++ b/solanaceae/tox_messages/nj/tox_message_components.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include + +#include + +namespace Message::Components { + + // TODO: friend msg id, does not have the same qualities + NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(ToxGroupMessageID, id) + // TODO: transfer stuff, needs content rewrite + +} // Message::Components + diff --git a/solanaceae/tox_messages/nj/tox_message_components_serializer.hpp b/solanaceae/tox_messages/nj/tox_message_components_serializer.hpp new file mode 100644 index 0000000..0d73349 --- /dev/null +++ b/solanaceae/tox_messages/nj/tox_message_components_serializer.hpp @@ -0,0 +1,10 @@ +#pragma once + +#include +#include "./tox_message_components.hpp" + +inline void registerToxMessageComponents(MessageSerializerNJ& msnj) { + msnj.registerSerializer(); + msnj.registerDeserializer(); +} +