2025-02-22 21:03:21 +02:00
|
|
|
// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
2025-03-03 21:36:02 +02:00
|
|
|
#include <map>
|
2025-02-22 21:03:21 +02:00
|
|
|
|
|
|
|
#include "gloox/gloox.h"
|
|
|
|
|
|
|
|
#include "yaml-cpp/yaml.h"
|
|
|
|
|
|
|
|
class Config {
|
|
|
|
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;
|
2025-03-03 21:36:02 +02:00
|
|
|
std::map<std::string, std::string> getOwners() const;
|
2025-02-22 21:03:21 +02:00
|
|
|
gloox::LogLevel getLogLevel() const;
|
|
|
|
gloox::TLSPolicy getTLSPolicy() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
YAML::Node root;
|
|
|
|
};
|