/***************************************************************************
- * Copyright (C) 2005-2016 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 CLIENT_H_
-#define CLIENT_H_
+#pragma once
#include <QList>
#include <QPointer>
-#include <highlightrulemanager.h>
#include "bufferinfo.h"
+#include "coreinfo.h"
#include "coreaccount.h"
#include "coreconnection.h"
+#include "highlightrulemanager.h"
#include "quassel.h"
#include "types.h"
static inline ClientAliasManager *aliasManager() { return instance()->_aliasManager; }
static inline ClientBacklogManager *backlogManager() { return instance()->_backlogManager; }
+ static inline CoreInfo *coreInfo() { return instance()->_coreInfo; }
static inline DccConfig *dccConfig() { return instance()->_dccConfig; }
static inline ClientIrcListHelper *ircListHelper() { return instance()->_ircListHelper; }
static inline ClientBufferViewManager *bufferViewManager() { return instance()->_bufferViewManager; }
static inline CoreAccountModel *coreAccountModel() { return instance()->_coreAccountModel; }
static inline CoreConnection *coreConnection() { return instance()->_coreConnection; }
static inline CoreAccount currentCoreAccount() { return coreConnection()->currentAccount(); }
- static inline Quassel::Features coreFeatures() { return _coreFeatures; }
-
- static void setCoreFeatures(Quassel::Features features);
+ static bool isCoreFeatureEnabled(Quassel::Feature feature);
static bool isConnected();
static bool internalCore();
static void changePassword(const QString &oldPassword, const QString &newPassword);
static void kickClient(int peerId);
+ void displayIgnoreList(QString ignoreRule) {
+ emit showIgnoreList(ignoreRule);
+ }
+
#if QT_VERSION < 0x050000
static void logMessage(QtMsgType type, const char *msg);
#else
#endif
static inline const QString &debugLog() { return instance()->_debugLogBuffer; }
+ void displayChannelList(NetworkId networkId) {
+ emit showChannelList(networkId);
+ }
+
signals:
void requestNetworkStates();
void showConfigWizard(const QVariantMap &coredata);
+ void showChannelList(NetworkId networkId);
+ void showIgnoreList(QString ignoreRule);
void connected();
void disconnected();
void requestKickClient(int peerId);
void passwordChanged(bool success);
+ //! Emitted when database schema upgrade starts or ends (only mono client)
+ void dbUpgradeInProgress(bool inProgress);
+
public slots:
void disconnectFromCore();
void markBufferAsRead(BufferId id);
+ void onDbUpgradeInProgress(bool inProgress);
+
private slots:
void setSyncedToCore();
void setDisconnectedFromCore();
ClientBacklogManager *_backlogManager;
ClientBufferViewManager *_bufferViewManager;
BufferViewOverlay *_bufferViewOverlay;
+ CoreInfo *_coreInfo;
DccConfig *_dccConfig;
ClientIrcListHelper *_ircListHelper;
ClientUserInputHandler *_inputHandler;
QHash<IdentityId, Identity *> _identities;
bool _connected;
- static Quassel::Features _coreFeatures;
QString _debugLogBuffer;
QTextStream _debugLog;
friend class CoreConnection;
};
-
-
-#endif