32 lines
683 B
C++
32 lines
683 B
C++
// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
#include <gloox/client.h>
|
|
#include <gloox/messagehandler.h>
|
|
#include <gloox/message.h>
|
|
|
|
#include "logger.h"
|
|
|
|
class Jay : public gloox::MessageHandler {
|
|
public:
|
|
Jay(const std::string& jid, const std::string& password);
|
|
~Jay();
|
|
|
|
void handleMessage(const gloox::Message& message, gloox::MessageSession* session = 0) override;
|
|
|
|
void run();
|
|
|
|
Logger* addLogger(gloox::LogLevel level);
|
|
|
|
private:
|
|
gloox::Client client;
|
|
std::vector<std::unique_ptr<Logger>> loggers;
|
|
};
|