From 1a032ce260ac84dd181092eefac0aefa1a63a374 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 6 Oct 2024 11:51:02 +0200 Subject: [PATCH] update to rmmi --- src/config_commands.cpp | 2 +- src/config_commands.hpp | 2 +- src/fun_commands.cpp | 2 +- src/fun_commands.hpp | 2 +- src/main.cpp | 6 +++--- src/managment_commands.cpp | 4 ++-- src/managment_commands.hpp | 2 +- src/message_cleanser.cpp | 2 +- src/message_cleanser.hpp | 4 ++-- src/tox_commands.cpp | 2 +- src/tox_commands.hpp | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/config_commands.cpp b/src/config_commands.cpp index 1b70789..0baec0a 100644 --- a/src/config_commands.cpp +++ b/src/config_commands.cpp @@ -14,7 +14,7 @@ void registerConfigCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm + RegistryMessageModelI& rmm ) { mcd.registerCommand( "Config", "conf", diff --git a/src/config_commands.hpp b/src/config_commands.hpp index 578f4d4..45260a5 100644 --- a/src/config_commands.hpp +++ b/src/config_commands.hpp @@ -11,6 +11,6 @@ void registerConfigCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm + RegistryMessageModelI& rmm ); diff --git a/src/fun_commands.cpp b/src/fun_commands.cpp index 8917052..a3786a1 100644 --- a/src/fun_commands.cpp +++ b/src/fun_commands.cpp @@ -13,7 +13,7 @@ void registerFunCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm + RegistryMessageModelI& rmm ) { mcd.registerCommand( "fun", "fun", diff --git a/src/fun_commands.hpp b/src/fun_commands.hpp index 63fd01c..81c159a 100644 --- a/src/fun_commands.hpp +++ b/src/fun_commands.hpp @@ -11,6 +11,6 @@ void registerFunCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm + RegistryMessageModelI& rmm ); diff --git a/src/main.cpp b/src/main.cpp index ed6f54b..2f4d344 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include @@ -186,7 +186,7 @@ int main(int argc, char** argv) { } Contact3Registry cr; - RegistryMessageModel rmm{cr}; + RegistryMessageModelImpl rmm{cr}; MessageTimeSort mts{rmm}; MessageCleanser mc{cr, rmm, conf}; MessageCommandDispatcher mcd{cr, rmm, conf}; @@ -234,7 +234,7 @@ int main(int argc, char** argv) { g_provideInstance("ConfigModelI", "host", &conf); g_provideInstance("Contact3Registry", "1", "host", &cr); - g_provideInstance("RegistryMessageModel", "host", &rmm); + g_provideInstance("RegistryMessageModelI", "host", &rmm); g_provideInstance("MessageCommandDispatcher", "host", &mcd); g_provideInstance("ToxI", "host", &tc); diff --git a/src/managment_commands.cpp b/src/managment_commands.cpp index 1b8fed4..9a51a12 100644 --- a/src/managment_commands.cpp +++ b/src/managment_commands.cpp @@ -54,7 +54,7 @@ static std::string getStatusFromContact( bool handleContactAddToGroup( ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm, + RegistryMessageModelI& rmm, std::string_view params, Message3Handle m, @@ -113,7 +113,7 @@ void registerManagementCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm + RegistryMessageModelI& rmm ) { mcd.registerCommand( "Management", "manage", diff --git a/src/managment_commands.hpp b/src/managment_commands.hpp index df01eb5..08841cb 100644 --- a/src/managment_commands.hpp +++ b/src/managment_commands.hpp @@ -11,6 +11,6 @@ void registerManagementCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm + RegistryMessageModelI& rmm ); diff --git a/src/message_cleanser.cpp b/src/message_cleanser.cpp index a9e2d1c..5ccc42e 100644 --- a/src/message_cleanser.cpp +++ b/src/message_cleanser.cpp @@ -10,7 +10,7 @@ MessageCleanser::MessageCleanser( Contact3Registry& cr, - RegistryMessageModel& rmm, + RegistryMessageModelI& rmm, ConfigModelI& conf ) : _cr(cr), _rmm(rmm), _conf(conf) { if (!_conf.has_int("MessageCleanser", "old_age_minutes")) { diff --git a/src/message_cleanser.hpp b/src/message_cleanser.hpp index b038691..7d222c0 100644 --- a/src/message_cleanser.hpp +++ b/src/message_cleanser.hpp @@ -5,7 +5,7 @@ class MessageCleanser { Contact3Registry& _cr; - RegistryMessageModel& _rmm; + RegistryMessageModelI& _rmm; ConfigModelI& _conf; static constexpr int64_t _old_age_default{150}; // minutes @@ -16,7 +16,7 @@ class MessageCleanser { public: MessageCleanser( Contact3Registry& cr, - RegistryMessageModel& rmm, + RegistryMessageModelI& rmm, ConfigModelI& conf ); ~MessageCleanser(void); diff --git a/src/tox_commands.cpp b/src/tox_commands.cpp index 7346e83..82e690d 100644 --- a/src/tox_commands.cpp +++ b/src/tox_commands.cpp @@ -18,7 +18,7 @@ void registerToxCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm, + RegistryMessageModelI& rmm, ToxI& t, ToxPrivateI& tp ) { diff --git a/src/tox_commands.hpp b/src/tox_commands.hpp index 4e8f689..0ed03c3 100644 --- a/src/tox_commands.hpp +++ b/src/tox_commands.hpp @@ -13,7 +13,7 @@ void registerToxCommands( MessageCommandDispatcher& mcd, ConfigModelI& conf, Contact3Registry& cr, - RegistryMessageModel& rmm, + RegistryMessageModelI& rmm, ToxI& t, ToxPrivateI& tp );