update to rmmi

This commit is contained in:
Green Sky 2024-10-06 11:42:52 +02:00
parent d7280771ce
commit f5cf44119b
No known key found for this signature in database
4 changed files with 11 additions and 7 deletions

View File

@ -35,7 +35,7 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
try { try {
auto* cr = PLUG_RESOLVE_INSTANCE_VERSIONED(Contact3Registry, "1"); auto* cr = PLUG_RESOLVE_INSTANCE_VERSIONED(Contact3Registry, "1");
auto* rmm = PLUG_RESOLVE_INSTANCE(RegistryMessageModel); auto* rmm = PLUG_RESOLVE_INSTANCE(RegistryMessageModelI);
auto* conf = PLUG_RESOLVE_INSTANCE(ConfigModelI); auto* conf = PLUG_RESOLVE_INSTANCE(ConfigModelI);
// static store, could be anywhere tho // static store, could be anywhere tho

View File

@ -17,7 +17,7 @@
#include <iostream> #include <iostream>
IRCClientMessageManager::IRCClientMessageManager( IRCClientMessageManager::IRCClientMessageManager(
RegistryMessageModel& rmm, RegistryMessageModelI& rmm,
Contact3Registry& cr, Contact3Registry& cr,
ConfigModelI& conf, ConfigModelI& conf,
IRCClient1& ircc, IRCClient1& ircc,

View File

@ -6,7 +6,7 @@
class IRCClientMessageManager : public IRCClientEventI, public RegistryMessageModelEventI { class IRCClientMessageManager : public IRCClientEventI, public RegistryMessageModelEventI {
protected: protected:
RegistryMessageModel& _rmm; RegistryMessageModelI& _rmm;
Contact3Registry& _cr; Contact3Registry& _cr;
ConfigModelI& _conf; ConfigModelI& _conf;
IRCClient1& _ircc; IRCClient1& _ircc;
@ -14,7 +14,7 @@ class IRCClientMessageManager : public IRCClientEventI, public RegistryMessageMo
public: public:
IRCClientMessageManager( IRCClientMessageManager(
RegistryMessageModel& rmm, RegistryMessageModelI& rmm,
Contact3Registry& cr, Contact3Registry& cr,
ConfigModelI& conf, ConfigModelI& conf,
IRCClient1& ircc, IRCClient1& ircc,

View File

@ -1,6 +1,7 @@
#include <chrono>
#include <solanaceae/util/simple_config_model.hpp> #include <solanaceae/util/simple_config_model.hpp>
#include <solanaceae/contact/contact_model3.hpp> #include <solanaceae/contact/contact_model3.hpp>
#include <solanaceae/message3/registry_message_model.hpp> #include <solanaceae/message3/registry_message_model_impl.hpp>
#include <solanaceae/ircclient/ircclient.hpp> #include <solanaceae/ircclient/ircclient.hpp>
#include <solanaceae/ircclient_contacts/ircclient_contact_model.hpp> #include <solanaceae/ircclient_contacts/ircclient_contact_model.hpp>
#include <solanaceae/ircclient_messages/ircclient_message_manager.hpp> #include <solanaceae/ircclient_messages/ircclient_message_manager.hpp>
@ -9,6 +10,8 @@
#include <iostream> #include <iostream>
#include <string_view> #include <string_view>
#include <thread>
#include <chrono>
int main(void) { int main(void) {
SimpleConfigModel conf; SimpleConfigModel conf;
@ -19,7 +22,7 @@ int main(void) {
conf.set("IRCClient", "autojoin", "#green_testing", true); conf.set("IRCClient", "autojoin", "#green_testing", true);
Contact3Registry cr; Contact3Registry cr;
RegistryMessageModel rmm{cr}; RegistryMessageModelImpl rmm{cr};
IRCClient1 ircc{conf}; IRCClient1 ircc{conf};
@ -29,7 +32,8 @@ int main(void) {
//ircccm.join("#green_testing"); //ircccm.join("#green_testing");
while (irc_is_connected(ircc.getSession())) { while (irc_is_connected(ircc.getSession())) {
ircc.iterate(); ircc.iterate(0.005f);
std::this_thread::sleep_for(std::chrono::milliseconds(5));
} }
return 0; return 0;