You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mainclass.h 917B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef MAINCLASS_H
  2. #define MAINCLASS_H
  3. #include <QObject>
  4. #include <ptsocket/ptserver.h>
  5. #include "netsoul.h"
  6. #include "epimafia.h"
  7. #include "../defs.h"
  8. class MainClass : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit MainClass(QObject *parent = 0);
  13. public slots:
  14. void setPidFile(QString f);
  15. bool start();
  16. void execute(PacketType type, QByteArray queryData, PTSocket* sock);
  17. private slots:
  18. void newClient(PTSocket* client);
  19. void packetReceived(int type, QByteArray data);
  20. void clientStateChanged(PTSocket::State s);
  21. void netsoulStateChanged(NetSoul::State s);
  22. void netsoulNewMessage(NetSoul::Message msg);
  23. void netsoulUserDataChanged(NetSoul::User usr);
  24. private:
  25. bool isConnected();
  26. PTServer* m_serv;
  27. NetSoul* m_ns;
  28. QList<QList<PTSocket*>*> m_eventsList;
  29. QList<PTSocket*> m_nsEvents;
  30. QList<PTSocket*> m_chatEvents;
  31. QList<PTSocket*> m_watchlistEvents;
  32. QString m_pidFile;
  33. };
  34. #endif // MAINCLASS_H