solanaceae_ecosystem/plugins/transfer_auto_accept.hpp
Green Sky 1efab248ca
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
sync and port with file msg -> obj refactor
2024-07-31 20:07:14 +02:00

37 lines
866 B
C++

#pragma once
#include <solanaceae/object_store/object_store.hpp>
#include <solanaceae/message3/registry_message_model.hpp>
#include <vector>
// fwd
struct ConfigModelI;
class TransferAutoAccept : public RegistryMessageModelEventI, public ObjectStoreEventI {
ObjectStore2& _os;
RegistryMessageModel& _rmm;
//ContactModelI& _cm;
ConfigModelI& _conf;
std::vector<ObjectHandle> _accept_queue;
public:
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;
};