port to contact4, still needs contact model interface impls

This commit is contained in:
Green Sky
2025-03-10 20:35:27 +01:00
parent 4d74826a95
commit 54bda18e7c
5 changed files with 202 additions and 121 deletions

View File

@ -34,15 +34,15 @@ SOLANA_PLUGIN_EXPORT uint32_t solana_plugin_start(struct SolanaAPI* solana_api)
}
try {
auto* cr = PLUG_RESOLVE_INSTANCE_VERSIONED(Contact3Registry, "1");
auto* cs = PLUG_RESOLVE_INSTANCE(ContactStore4I);
auto* rmm = PLUG_RESOLVE_INSTANCE(RegistryMessageModelI);
auto* conf = PLUG_RESOLVE_INSTANCE(ConfigModelI);
// static store, could be anywhere tho
// construct with fetched dependencies
g_ircc = std::make_unique<IRCClient1>(*conf);
g_ircccm = std::make_unique<IRCClientContactModel>(*cr, *conf, *g_ircc);
g_irccmm = std::make_unique<IRCClientMessageManager>(*rmm, *cr, *conf, *g_ircc, *g_ircccm);
g_ircccm = std::make_unique<IRCClientContactModel>(*cs, *conf, *g_ircc);
g_irccmm = std::make_unique<IRCClientMessageManager>(*rmm, *cs, *conf, *g_ircc, *g_ircccm);
// register types
PLUG_PROVIDE_INSTANCE(IRCClient1, plugin_name, g_ircc.get());