hacked in endpoint for sd.cpp wip

This commit is contained in:
2024-04-07 15:14:08 +02:00
parent 5490509fc5
commit fba8417ddf
2 changed files with 153 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include <solanaceae/util/span.hpp>
#include <solanaceae/message3/registry_message_model.hpp>
#include <solanaceae/contact/contact_model3.hpp>
@@ -33,6 +34,19 @@ class SDBot : public RegistryMessageModelEventI {
std::default_random_engine _rng;
public:
struct EndpointI {
RegistryMessageModel& _rmm;
std::default_random_engine& _rng;
EndpointI(RegistryMessageModel& rmm, std::default_random_engine& rng) : _rmm(rmm), _rng(rng) {}
virtual ~EndpointI(void) {}
virtual bool handleResponse(Contact3 contact, ByteSpan data) = 0;
};
private:
std::unique_ptr<EndpointI> _endpoint;
public:
SDBot(
Contact3Registry& cr,