sneak in serializer json stuff (header only, no dep tracking)

This commit is contained in:
Green Sky 2024-04-14 14:20:52 +02:00
parent ce81ef7cf7
commit d5c1bf07db
No known key found for this signature in database
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#pragma once
#include <solanaceae/tox_messages/components.hpp>
#include <nlohmann/json.hpp>
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

View File

@ -0,0 +1,10 @@
#pragma once
#include <solanaceae/message3/message_serializer.hpp>
#include "./tox_message_components.hpp"
inline void registerToxMessageComponents(MessageSerializerNJ& msnj) {
msnj.registerSerializer<Message::Components::ToxGroupMessageID>();
msnj.registerDeserializer<Message::Components::ToxGroupMessageID>();
}