2023-08-19 23:22:33 +02:00
|
|
|
#pragma once
|
|
|
|
|
2024-07-31 20:07:14 +02:00
|
|
|
#include <solanaceae/object_store/object_store.hpp>
|
2023-08-19 23:22:33 +02:00
|
|
|
#include <solanaceae/message3/registry_message_model.hpp>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
// fwd
|
|
|
|
struct ConfigModelI;
|
|
|
|
|
2024-07-31 20:07:14 +02:00
|
|
|
class TransferAutoAccept : public RegistryMessageModelEventI, public ObjectStoreEventI {
|
|
|
|
ObjectStore2& _os;
|
2023-08-19 23:22:33 +02:00
|
|
|
RegistryMessageModel& _rmm;
|
|
|
|
//ContactModelI& _cm;
|
|
|
|
ConfigModelI& _conf;
|
|
|
|
|
2024-07-31 20:07:14 +02:00
|
|
|
std::vector<ObjectHandle> _accept_queue;
|
2023-08-19 23:22:33 +02:00
|
|
|
|
|
|
|
public:
|
2024-07-31 20:07:14 +02:00
|
|
|
TransferAutoAccept(ObjectStore2& os, RegistryMessageModel& rmm, ConfigModelI& conf);
|
2023-08-19 23:22:33 +02:00
|
|
|
|
|
|
|
// TODO: iterate
|
|
|
|
void iterate(void);
|
|
|
|
|
|
|
|
protected:
|
2024-07-31 20:07:14 +02:00
|
|
|
void checkObj(ObjectHandle h);
|
2023-08-19 23:22:33 +02:00
|
|
|
void checkMsg(Message3Handle h);
|
|
|
|
|
|
|
|
protected: // mm
|
|
|
|
bool onEvent(const Message::Events::MessageConstruct& e) override;
|
|
|
|
bool onEvent(const Message::Events::MessageUpdated& e) override;
|
|
|
|
|
2024-07-31 20:07:14 +02:00
|
|
|
protected: // os
|
|
|
|
bool onEvent(const ObjectStore::Events::ObjectUpdate& e) override;
|
2023-08-19 23:22:33 +02:00
|
|
|
};
|
|
|
|
|