Introduce CoreAccount and CoreAccountModel
[quassel.git] / src / client / client.h
index 3f5f79d..ff6b4d8 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef CLIENT_H_
 #define CLIENT_H_
 
-#include <QAbstractSocket>
-#include <QTcpSocket>
 #include <QList>
 #include <QPointer>
 
@@ -42,14 +40,18 @@ class AbstractUiMsg;
 class NetworkModel;
 class BufferModel;
 class BufferSyncer;
+class BufferViewOverlay;
 class ClientAliasManager;
 class ClientBacklogManager;
 class ClientBufferViewManager;
+class ClientIgnoreListManager;
 class ClientIrcListHelper;
 class ClientSyncer;
 class ClientUserInputHandler;
+class CoreAccountModel;
 class IrcUser;
 class IrcChannel;
+class NetworkConfig;
 class SignalProxy;
 struct NetworkInfo;
 
@@ -62,6 +64,7 @@ public:
     RemoteCore
   };
 
+  static bool instanceExists();
   static Client *instance();
   static void destroy();
   static void init(AbstractUi *);
@@ -106,8 +109,12 @@ public:
   static inline ClientBacklogManager *backlogManager() { return instance()->_backlogManager; }
   static inline ClientIrcListHelper *ircListHelper() { return instance()->_ircListHelper; }
   static inline ClientBufferViewManager *bufferViewManager() { return instance()->_bufferViewManager; }
+  static inline BufferViewOverlay *bufferViewOverlay() { return instance()->_bufferViewOverlay; }
   static inline ClientUserInputHandler *inputHandler() { return instance()->_inputHandler; }
+  static inline NetworkConfig *networkConfig() { return instance()->_networkConfig; }
+  static inline ClientIgnoreListManager *ignoreListManager() { return instance()->_ignoreListManager; }
 
+  static inline CoreAccountModel *coreAccountModel() { return instance()->_coreAccountModel; }
   static AccountId currentCoreAccount();
 
   static bool isConnected();
@@ -196,7 +203,7 @@ private:
   void init();
 
   static void addNetwork(Network *);
-  static void setCurrentCoreAccount(AccountId);
+  static void setCurrentCoreAccount(const AccountId &);
   static inline BufferSyncer *bufferSyncer() { return instance()->_bufferSyncer; }
 
   static QPointer<Client> instanceptr;
@@ -209,12 +216,17 @@ private:
   ClientAliasManager *_aliasManager;
   ClientBacklogManager *_backlogManager;
   ClientBufferViewManager *_bufferViewManager;
+  BufferViewOverlay *_bufferViewOverlay;
   ClientIrcListHelper *_ircListHelper;
   ClientUserInputHandler *_inputHandler;
+  NetworkConfig *_networkConfig;
+  ClientIgnoreListManager *_ignoreListManager;
 
   MessageModel *_messageModel;
   AbstractMessageProcessor *_messageProcessor;
 
+  CoreAccountModel *_coreAccountModel;
+
   ClientMode clientMode;
 
   bool _connectedToCore, _syncedToCore;