+ //! The identity with the given ID has been newly created in core and client.
+ /** \param id The ID of the newly created identity.
+ */
+ void identityCreated(IdentityId id);
+
+ //! The identity with the given ID has been removed.
+ /** Upon emitting this signal, the identity is already gone from the core, and it will
+ * be deleted from the client immediately afterwards, so connected slots need to clean
+ * up their stuff.
+ * \param id The ID of the identity about to be removed.
+ */
+ void identityRemoved(IdentityId id);
+
+ //! Sent to the core when an identity shall be created. Should not be used elsewhere.
+ void requestCreateIdentity(const Identity &, const QVariantMap &);
+ //! Sent to the core when an identity shall be removed. Should not be used elsewhere.
+ void requestRemoveIdentity(IdentityId);
+
+ void networkCreated(NetworkId id);
+ void networkRemoved(NetworkId id);
+
+ void requestCreateNetwork(const NetworkInfo &info, const QStringList &persistentChannels = QStringList());
+ void requestRemoveNetwork(NetworkId);
+
+ void newClientSyncer(ClientSyncer *);
+
+ void logUpdated(const QString &msg);
+
+public slots:
+ void disconnectFromCore();
+
+ void bufferRemoved(BufferId bufferId);
+ void bufferRenamed(BufferId bufferId, const QString &newName);
+ void buffersPermanentlyMerged(BufferId bufferId1, BufferId bufferId2);
+
+private slots:
+ void disconnectedFromCore();
+
+ void recvMessage(const Message &message);
+ void recvStatusMsg(QString network, QString message);
+
+ void networkDestroyed();
+ void coreIdentityCreated(const Identity &);
+ void coreIdentityRemoved(IdentityId);
+ void coreNetworkCreated(NetworkId);
+ void coreNetworkRemoved(NetworkId);
+
+ void setConnectedToCore(AccountId id, QIODevice *socket = 0);
+ void setSyncedToCore();
+ void requestInitialBacklog();
+ void createDefaultBufferView();
+
+ void sendBufferedUserInput();
+
+private:
+ Client(QObject *parent = 0);
+ virtual ~Client();
+ void init();
+
+ static void addNetwork(Network *);
+ static void setCurrentCoreAccount(AccountId);
+ static inline BufferSyncer *bufferSyncer() { return instance()->_bufferSyncer; }
+
+ static QPointer<Client> instanceptr;
+
+ SignalProxy * _signalProxy;
+ AbstractUi * _mainUi;
+ NetworkModel * _networkModel;
+ BufferModel * _bufferModel;
+ BufferSyncer * _bufferSyncer;
+ ClientAliasManager *_aliasManager;
+ ClientBacklogManager *_backlogManager;
+ ClientBufferViewManager *_bufferViewManager;
+ BufferViewOverlay *_bufferViewOverlay;
+ ClientIrcListHelper *_ircListHelper;
+ ClientUserInputHandler *_inputHandler;
+ NetworkConfig *_networkConfig;
+ ClientIgnoreListManager *_ignoreListManager;
+
+ MessageModel *_messageModel;
+ AbstractMessageProcessor *_messageProcessor;
+
+ ClientMode clientMode;
+
+ bool _connectedToCore, _syncedToCore;
+ bool _internalCore;
+
+ QHash<NetworkId, Network *> _networks;
+ QHash<IdentityId, Identity *> _identities;
+
+ static AccountId _currentCoreAccount;
+
+ QString _debugLogBuffer;
+ QTextStream _debugLog;
+
+ QList<QPair<BufferInfo, QString> > _userInputBuffer;