solanaceae_ecosystem/plugins/transfer_auto_accept.hpp
Green Sky 4b41375e0d
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / android (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
update to rmmi and imgui
2024-10-06 11:56:20 +02:00

37 lines
868 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;
RegistryMessageModelI& _rmm;
//ContactModelI& _cm;
ConfigModelI& _conf;
std::vector<ObjectHandle> _accept_queue;
public:
TransferAutoAccept(ObjectStore2& os, RegistryMessageModelI& 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;
};