build info, accept info - but sents grable

This commit is contained in:
2023-08-08 23:55:12 +02:00
parent 0459b43b64
commit 599b0a19cb
7 changed files with 381 additions and 14 deletions

View File

@ -2,29 +2,39 @@
// solanaceae port of sha1 fts for NGCFT1
#include <solanaceae/contact/contact_model3.hpp>
#include <solanaceae/message3/registry_message_model.hpp>
#include <solanaceae/tox_contacts/tox_contact_model2.hpp>
#include "./ngcft1.hpp"
#include "./ft1_sha1_info.hpp"
class SHA1_NGCFT1 : public RegistryMessageModelEventI, public NGCFT1EventI {
Contact3Registry& _cr;
RegistryMessageModel& _rmm;
NGCFT1EventProviderI& _nftep;
NGCFT1& _nft;
ToxContactModel2& _tcm;
// limit this to each group?
entt::dense_map<SHA1Digest, Message3Handle> _info_to_message;
public:
SHA1_NGCFT1(
Contact3Registry& cr,
RegistryMessageModel& rmm,
NGCFT1EventProviderI& nftep,
NGCFT1& nft,
ToxContactModel2& tcm
);
//void iterate(float delta);
protected:
protected: // events
bool onEvent(const Events::NGCFT1_recv_request&) override;
bool onEvent(const Events::NGCFT1_recv_init&) override;
bool onEvent(const Events::NGCFT1_recv_data&) override;
bool onEvent(const Events::NGCFT1_send_data&) override; // const?
bool sendFilePath(const Contact3 c, std::string_view file_name, std::string_view file_path) override;
};