X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclient.h;h=9f881d117f2d322ae9e247a352474c5317f80497;hp=8b991bdaaae7cf0afb7e9cdf927d9a3ee2cf6b70;hb=167ef57a636052f8e18a206e84c3447552e84d2b;hpb=c0c8cea57282c56951562e427bc1acb3ee2028a3 diff --git a/src/client/client.h b/src/client/client.h index 8b991bda..9f881d11 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -18,17 +18,17 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _CLIENT_H_ -#define _CLIENT_H_ +#ifndef CLIENT_H_ +#define CLIENT_H_ #include #include #include #include -#include "buffer.h" // needed for activity lvl +#include "bufferinfo.h" +#include "types.h" -class BufferInfo; class Message; class MessageModel; class AbstractMessageProcessor; @@ -43,6 +43,7 @@ class BufferModel; class BufferSyncer; class ClientBacklogManager; class ClientIrcListHelper; +class ClientSyncer; class BufferViewManager; class IrcUser; class IrcChannel; @@ -62,11 +63,6 @@ public: static void destroy(); static void init(AbstractUi *); - static QList allBufferInfos(); - static QList buffers(); - // static Buffer *buffer(BufferId bufferUid); - static Buffer *buffer(BufferInfo); - static QList networkIds(); static const Network * network(NetworkId); @@ -116,12 +112,11 @@ public: static void setBufferLastSeenMsg(BufferId id, const MsgId &msgId); // this is synced to core and other clients static void removeBuffer(BufferId id); + static void logMessage(QtMsgType type, const char *msg); + static inline const QString &debugLog() { return instance()->_debugLogBuffer; } + signals: void sendInput(BufferInfo, QString message); - void showBuffer(Buffer *); - void bufferUpdated(BufferInfo bufferInfo); - void backlogReceived(Buffer *, QList); - void requestBacklog(BufferInfo, QVariant, QVariant); void requestNetworkStates(); void showConfigWizard(const QVariantMap &coredata); @@ -153,31 +148,26 @@ signals: void networkRemoved(NetworkId id); void requestCreateNetwork(const NetworkInfo &info); - void requestUpdateNetwork(const NetworkInfo &info); void requestRemoveNetwork(NetworkId); + void newClientSyncer(ClientSyncer *); + + void logUpdated(const QString &msg); + public slots: //void selectBuffer(Buffer *); void disconnectFromCore(); - void setCoreConfiguration(const QVariantMap &settings); - void bufferRemoved(BufferId bufferId); void bufferRenamed(BufferId bufferId, const QString &newName); private slots: - //void coreSocketError(QAbstractSocket::SocketError); - - //void networkConnected(NetworkId); - //void networkDisconnected(NetworkId); + void disconnectedFromCore(); void recvMessage(const Message &message); void recvStatusMsg(QString network, QString message); - void receiveBacklog(BufferId bufferId, const QVariantList &msgs); - void updateBufferInfo(BufferInfo); - void bufferDestroyed(); void networkDestroyed(); void coreIdentityCreated(const Identity &); void coreIdentityRemoved(IdentityId); @@ -185,6 +175,7 @@ private slots: void coreNetworkRemoved(NetworkId); void setConnectedToCore(QIODevice *socket, AccountId id); + void setConnectedToInternalCore(); void setSyncedToCore(); void setSecuredConnection(); @@ -198,12 +189,8 @@ private: static void setCurrentCoreAccount(AccountId); static inline BufferSyncer *bufferSyncer() { return instance()->_bufferSyncer; } - Buffer *statusBuffer(const NetworkId &networkid) const; - static QPointer instanceptr; - QPointer socket; - SignalProxy * _signalProxy; AbstractUi * mainUi; NetworkModel * _networkModel; @@ -220,13 +207,14 @@ private: bool _connectedToCore, _syncedToCore; - QHash _buffers; - QHash _statusBuffers; // fast lookup QHash _networks; QHash _identities; static AccountId _currentCoreAccount; + QString _debugLogBuffer; + QTextStream _debugLog; + friend class ClientSyncer; };