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
37 lines
866 B
C++
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;
|
|
};
|
|
|