totato/src/message_cleanser.hpp

26 lines
518 B
C++
Raw Permalink Normal View History

#pragma once
#include <solanaceae/message3/registry_message_model.hpp>
2024-02-04 15:12:03 +01:00
#include <solanaceae/util/config_model.hpp>
class MessageCleanser {
Contact3Registry& _cr;
2024-10-06 11:51:02 +02:00
RegistryMessageModelI& _rmm;
2024-02-04 15:12:03 +01:00
ConfigModelI& _conf;
static constexpr int64_t _old_age_default{150}; // minutes
float _interval{3.f*60.f}; // every 3min
float _timer{0.f};
public:
2024-02-04 15:12:03 +01:00
MessageCleanser(
Contact3Registry& cr,
2024-10-06 11:51:02 +02:00
RegistryMessageModelI& rmm,
2024-02-04 15:12:03 +01:00
ConfigModelI& conf
);
~MessageCleanser(void);
float iterate(float time_delta);
};