// SPDX-FileCopyrightText: 2024 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include "gloox/gloox.h" #include "yaml-cpp/yaml.h" class Config { public: struct Module { typedef std::vector List; typedef std::map Permissions; bool enabled; std::string alias; Permissions permissions; }; public: Config(const std::string& path); bool isValid() const; std::string getBareJID() const; std::string getFullJID() const; std::string getPassword() const; std::string getResource() const; std::map getOwners() const; gloox::LogLevel getLogLevel() const; gloox::TLSPolicy getTLSPolicy() const; Module getModuleConfig(const std::string& name) const; private: YAML::Node root; };