// SPDX-FileCopyrightText: 2024 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later #include "connection.h" Connection::Connection(const std::shared_ptr& config, const std::shared_ptr& client): config(config), client(client) { client->registerConnectionListener(this); } Connection::~Connection() { if (std::shared_ptr cl = client.lock()) cl->removeConnectionListener(this); } void Connection::onConnect() {} void Connection::onDisconnect(gloox::ConnectionError e) {} bool Connection::onTLSConnect(const gloox::CertInfo& info) { return true; }