12345678910111213141516171819202122232425262728293031323334353637383940 |
- #ifndef MAINCLASS_H
- #define MAINCLASS_H
-
- #include <QObject>
- #include <ptsocket/ptserver.h>
- #include "netsoul.h"
- #include "epimafia.h"
- #include "../defs.h"
-
- class MainClass : public QObject
- {
- Q_OBJECT
- public:
- explicit MainClass(QObject *parent = 0);
-
- public slots:
- void setPidFile(QString f);
- bool start();
- void execute(PacketType type, QByteArray queryData, PTSocket* sock);
-
- private slots:
- void newClient(PTSocket* client);
- void packetReceived(int type, QByteArray data);
- void clientStateChanged(PTSocket::State s);
- void netsoulStateChanged(NetSoul::State s);
- void netsoulNewMessage(NetSoul::Message msg);
- void netsoulUserDataChanged(NetSoul::User usr);
-
- private:
- bool isConnected();
- PTServer* m_serv;
- NetSoul* m_ns;
- QList<QList<PTSocket*>*> m_eventsList;
- QList<PTSocket*> m_nsEvents;
- QList<PTSocket*> m_chatEvents;
- QList<PTSocket*> m_watchlistEvents;
- QString m_pidFile;
- };
-
- #endif // MAINCLASS_H
|