X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=core%2Fcore.h;h=459c6847594f9f05a6b0538c82f49098cd38f9b6;hp=23ba3c6f7bc6ba5ffb7ff96eb4f809589b7b56d7;hb=2c9184c37fc54adb7670ea261a8e34c99a82a285;hpb=82403b8a8777d44cbc35619e3bbd4feabfad5dc4 diff --git a/core/core.h b/core/core.h index 23ba3c6f..459c6847 100644 --- a/core/core.h +++ b/core/core.h @@ -24,8 +24,11 @@ #include #include #include +#include #include "server.h" +#include "backlog.h" +#include "global.h" class Core : public QObject { Q_OBJECT @@ -33,28 +36,55 @@ class Core : public QObject { public: Core(); - //~Core(); + ~Core(); + QHash > getBackLog() { return QHash >()/*backLog*/; }; // FIXME + QList getBuffers(); public slots: - void inputLine(QString); // temp void connectToIrc(QStringList); + void sendBacklog(BufferId, QVariant, QVariant); + void msgFromGUI(BufferId, QString message); signals: - void outputLine(const QString &); // temp - void msgFromGUI(QString network, QString channel, QString message); - void sendMessage(QString network, QString channel, QString message); - void sendStatusMsg(QString, QString); + void msgFromGUI(QString net, QString buf, QString message); + void displayMsg(Message message); + void displayStatusMsg(QString, QString); void connectToIrc(QString net); void disconnectFromIrc(QString net); + void serverStateRequested(); + + void backlogData(BufferId, QList, bool done); + + void bufferIdUpdated(BufferId); private slots: + //void serverStatesRequested(); void globalDataUpdated(QString); void recvStatusMsgFromServer(QString msg); - void recvMessageFromServer(QString buffer, QString msg); + //void recvMessageFromServer(Message msg); + void recvMessageFromServer(Message::Type, QString target, QString text, QString sender = "", quint8 flags = Message::None); + void serverDisconnected(QString net); private: + Backlog backlog; + QDir backLogDir; + bool backLogEnabled; QHash servers; + //QHash > backLog; + //QHash netIdx; + //QHash logFiles; + //QHash logStreams; + //QHash logFileDates; + //QHash logFileDirs; + + //QSqlDatabase logDb; + + //uint getNetIdx(QString net); + //void initBackLog(); + //void initBackLogOld(); + //void logMessage(QString, Message); + //void logMessageOld(QString, Message); };