30 lines
605 B
C
30 lines
605 B
C
|
// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
|
||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <string>
|
||
|
#include <set>
|
||
|
|
||
|
#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;
|
||
|
std::set<std::string> getOwners() const;
|
||
|
gloox::LogLevel getLogLevel() const;
|
||
|
gloox::TLSPolicy getTLSPolicy() const;
|
||
|
|
||
|
private:
|
||
|
YAML::Node root;
|
||
|
};
|