videocore.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef VIDEOCORE_H
  2. #define VIDEOCORE_H
  3. #include <QObject>
  4. #include <qmqtt.h>
  5. #include <QSqlDatabase>
  6. #include <QSqlQuery>
  7. #include "logthread.h"
  8. #include "httpthread.h"
  9. #include "tcpserver.h"
  10. #include "tcpserver1.h"
  11. #include "devinfotcpserver.h"
  12. #include "databasethread.h"
  13. class VideoCore : public QObject
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit VideoCore(QObject *parent = nullptr);
  18. ~VideoCore();
  19. void start();
  20. void shm_init();
  21. bool shm_load();
  22. signals:
  23. public slots:
  24. void onConnected();
  25. void dataLog(QString log);
  26. void mqtt_data(QString mqtt_msg);
  27. void appendSql(QString sql);
  28. private:
  29. LogThread *logthread;
  30. HttpThread *httpthread;
  31. TcpServer *tcpserver;
  32. TcpServer1 *tcpserver1;
  33. DevInfoTcpServer *devinfoserver;
  34. DatabaseThread *dbthread;
  35. QMQTT::Client *m_client;
  36. QSqlDatabase db;
  37. quint16 mqttIdx;
  38. QString ip,port,username,password;
  39. QString devinfourl,devinfokey,devinfosignature;
  40. QString httpurl,httpkey,httpsignature;
  41. QString tcpserverurl,tcpserverkey,tcpserversignature;
  42. QString tcpserver1url,tcpserver1key,tcpserver1signature;
  43. };
  44. #endif // VIDEOCORE_H