/***************************************************************************
- * Copyright (C) 2005-2015 by the Quassel Project *
+ * Copyright (C) 2005-2018 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef CORECONNECTION_H_
-#define CORECONNECTION_H_
+#pragma once
-#include "QPointer"
-#include "QTimer"
+#include <QNetworkConfigurationManager>
+#include <QPointer>
+#include <QTimer>
#ifdef HAVE_SSL
# include <QSslSocket>
# include <QTcpSocket>
#endif
-#ifdef HAVE_KDE4
-# include <Solid/Networking>
-#endif
-
#include "coreaccount.h"
#include "remotepeer.h"
#include "types.h"
//! Check if we consider the last connect as reconnect
bool wasReconnect() const { return _wasReconnect; }
+ QPointer<Peer> peer() const;
+
public slots:
bool connectToCore(AccountId = 0);
void reconnectToCore();
void progressValueChanged(int value);
void progressTextChanged(const QString &);
- void startCoreSetup(const QVariantList &backendInfo);
+ void startCoreSetup(const QVariantList &backendInfo, const QVariantList &authenticatorInfo);
void coreSetupSuccess();
void coreSetupFailed(const QString &error);
- void startInternalCore();
- void connectToInternalCore(InternalPeer *connection);
+ void connectToInternalCore(QPointer<InternalPeer> connection);
// These signals MUST be handled synchronously!
void userAuthenticationRequired(CoreAccount *, bool *valid, const QString &errorMessage = QString());
void reconnectIntervalChanged(const QVariant &interval);
void reconnectTimeout();
-#ifdef HAVE_KDE4
- void solidNetworkStatusChanged(Solid::Networking::Status status);
-#endif
+ void onlineStateChanged(bool isOnline);
private:
QPointer<ClientAuthHandler> _authHandler;
CoreAccount _account;
CoreAccountModel *accountModel() const;
+ QPointer<QNetworkConfigurationManager> _qNetworkConfigurationManager;
+
friend class CoreConfigWizard;
};
inline CoreConnection::ConnectionState CoreConnection::state() const { return _state; }
inline bool CoreConnection::isConnected() const { return state() >= Connected; }
inline CoreAccount CoreConnection::currentAccount() const { return _account; }
-
-#endif