From 3372860038a68a32ce8f0df42a9b68548243c6f2 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 6 Oct 2024 12:57:36 +0200 Subject: [PATCH] update to rmmi --- .gitignore | 1 + plugins/plugin_sdbot-webui.cpp | 2 +- src/sd_bot.cpp | 6 +++--- src/sd_bot.hpp | 8 ++++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 56f48bf..ebb0cec 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ CMakeCache.txt *.tox imgui.ini +config.json diff --git a/plugins/plugin_sdbot-webui.cpp b/plugins/plugin_sdbot-webui.cpp index ef22e3b..6e60707 100644 --- a/plugins/plugin_sdbot-webui.cpp +++ b/plugins/plugin_sdbot-webui.cpp @@ -33,7 +33,7 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api) try { 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); // static store, could be anywhere tho diff --git a/src/sd_bot.cpp b/src/sd_bot.cpp index 3511398..3a9fc6a 100644 --- a/src/sd_bot.cpp +++ b/src/sd_bot.cpp @@ -15,7 +15,7 @@ #include struct Automatic1111_v1_Endpoint : public SDBot::EndpointI { - Automatic1111_v1_Endpoint(RegistryMessageModel& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {} + Automatic1111_v1_Endpoint(RegistryMessageModelI& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {} bool handleResponse(Contact3 contact, ByteSpan data) override { //std::cout << std::string_view{reinterpret_cast(data.ptr), data.size} << "\n"; @@ -61,7 +61,7 @@ struct Automatic1111_v1_Endpoint : public SDBot::EndpointI { }; struct SDcpp_wip1_Endpoint : public SDBot::EndpointI { - SDcpp_wip1_Endpoint(RegistryMessageModel& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {} + SDcpp_wip1_Endpoint(RegistryMessageModelI& rmm, std::default_random_engine& rng) : SDBot::EndpointI(rmm, rng) {} bool handleResponse(Contact3 contact, ByteSpan data) override { //std::cout << std::string_view{reinterpret_cast(data.ptr), data.size} << "\n"; @@ -131,7 +131,7 @@ struct SDcpp_wip1_Endpoint : public SDBot::EndpointI { SDBot::SDBot( Contact3Registry& cr, - RegistryMessageModel& rmm, + RegistryMessageModelI& rmm, ConfigModelI& conf ) : _cr(cr), _rmm(rmm), _conf(conf) { _rng.seed(std::random_device{}()); diff --git a/src/sd_bot.hpp b/src/sd_bot.hpp index fd78902..f80eda4 100644 --- a/src/sd_bot.hpp +++ b/src/sd_bot.hpp @@ -20,7 +20,7 @@ struct ConfigModelI; class SDBot : public RegistryMessageModelEventI { Contact3Registry& _cr; - RegistryMessageModel& _rmm; + RegistryMessageModelI& _rmm; ConfigModelI& _conf; //TransferManager& _tm; @@ -38,9 +38,9 @@ class SDBot : public RegistryMessageModelEventI { public: struct EndpointI { - RegistryMessageModel& _rmm; + RegistryMessageModelI& _rmm; std::default_random_engine& _rng; - EndpointI(RegistryMessageModel& rmm, std::default_random_engine& rng) : _rmm(rmm), _rng(rng) {} + EndpointI(RegistryMessageModelI& rmm, std::default_random_engine& rng) : _rmm(rmm), _rng(rng) {} virtual ~EndpointI(void) {} virtual bool handleResponse(Contact3 contact, ByteSpan data) = 0; @@ -52,7 +52,7 @@ class SDBot : public RegistryMessageModelEventI { public: SDBot( Contact3Registry& cr, - RegistryMessageModel& rmm, + RegistryMessageModelI& rmm, ConfigModelI& conf ); ~SDBot(void);