// SPDX-FileCopyrightText: 2024 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include #include "gloox/client.h" #include "component/actor.h" namespace Module { class Module { public: typedef std::vector Tokens; protected: Module(const std::shared_ptr& client); void sendMessage(const std::shared_ptr& actor, const std::string& body); public: virtual ~Module() noexcept; static Tokens split(const std::string& string, const std::string& delimiter = " "); virtual void message(const std::shared_ptr& actor, const Tokens& args) = 0; protected: std::shared_ptr client; }; }