sync and port with file msg -> obj refactor
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Failing after 3m16s
ContinuousIntegration / linux (push) Successful in 2m44s
ContinuousIntegration / android (push) Failing after 5m25s
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled

This commit is contained in:
2024-07-31 20:07:14 +02:00
parent e497941b18
commit 1efab248ca
10 changed files with 70 additions and 28 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include <solanaceae/object_store/object_store.hpp>
#include <solanaceae/message3/registry_message_model.hpp>
#include <vector>
@@ -7,25 +8,29 @@
// fwd
struct ConfigModelI;
class TransferAutoAccept : public RegistryMessageModelEventI {
class TransferAutoAccept : public RegistryMessageModelEventI, public ObjectStoreEventI {
ObjectStore2& _os;
RegistryMessageModel& _rmm;
//ContactModelI& _cm;
ConfigModelI& _conf;
std::vector<Message3Handle> _accept_queue;
std::vector<ObjectHandle> _accept_queue;
public:
TransferAutoAccept(RegistryMessageModel& rmm, ConfigModelI& conf);
TransferAutoAccept(ObjectStore2& os, RegistryMessageModel& rmm, ConfigModelI& conf);
// TODO: iterate
void iterate(void);
protected:
void checkObj(ObjectHandle h);
void checkMsg(Message3Handle h);
protected: // mm
bool onEvent(const Message::Events::MessageConstruct& e) override;
bool onEvent(const Message::Events::MessageUpdated& e) override;
protected: // os
bool onEvent(const ObjectStore::Events::ObjectUpdate& e) override;
};