lower cmake version and start drafting mcd

This commit is contained in:
Green Sky 2023-12-03 11:43:16 +01:00
parent 0e27cf4476
commit 317bd5bb52
No known key found for this signature in database
4 changed files with 64 additions and 2 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
include(FetchContent)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
if (NOT TARGET toxcore)

View File

@ -0,0 +1,27 @@
#include "./message_command_dispatcher.hpp"
#include <solanaceae/util/config_model.hpp>
MessageCommandDispatcher::MessageCommandDispatcher(
Contact3Registry& cr,
RegistryMessageModel& rmm,
ConfigModelI& conf
) :
_cr(cr), _rmm(rmm), _conf(conf)
{
}
MessageCommandDispatcher::~MessageCommandDispatcher(void) {
}
void MessageCommandDispatcher::iterate(float time_delta) {
}
bool MessageCommandDispatcher::onEvent(const Message::Events::MessageConstruct& e) {
return false;
}
bool MessageCommandDispatcher::onEvent(const Message::Events::MessageUpdated& e) {
return false;
}

View File

@ -0,0 +1,35 @@
#pragma once
#include <solanaceae/message3/registry_message_model.hpp>
// fwd
struct ConfigModelI;
class MessageCommandDispatcher : public RegistryMessageModelEventI {
Contact3Registry& _cr;
RegistryMessageModel& _rmm;
ConfigModelI& _conf;
public:
MessageCommandDispatcher(Contact3Registry& cr, RegistryMessageModel& rmm, ConfigModelI& conf);
~MessageCommandDispatcher(void);
void iterate(float time_delta); // do we?
// module command/command <param type(s)>
// permissions?
// - user(s)
// - group(s)
// - everyone else?
// callable
// help text?
void registerCommand(
std::string_view module,
std::string_view command
);
protected: // mm
bool onEvent(const Message::Events::MessageConstruct& e) override;
bool onEvent(const Message::Events::MessageUpdated& e) override;
};