jay/handlers/connection.cpp

28 lines
640 B
C++
Raw Normal View History

2025-02-22 21:03:21 +02:00
// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "connection.h"
Connection::Connection(const std::shared_ptr<Config>& config, const std::shared_ptr<gloox::Client>& client):
config(config),
client(client)
{
client->registerConnectionListener(this);
}
Connection::~Connection() {
if (std::shared_ptr<gloox::Client> cl = client.lock())
cl->removeConnectionListener(this);
}
void Connection::onConnect() {}
void Connection::onDisconnect(gloox::ConnectionError e) {}
2025-02-23 18:35:13 +02:00
bool Connection::onTLSConnect(const gloox::CertInfo& info) {
2025-02-22 21:03:21 +02:00
return true;
}