#ifndef VIDEOCORE_H
#define VIDEOCORE_H

#include <QObject>
#include <qmqtt.h>
#include <QSqlDatabase>
#include <QSqlQuery>
#include "logthread.h"
#include "httpthread.h"
#include "tcpserver.h"
#include "tcpserver1.h"

class VideoCore : public QObject
{
    Q_OBJECT
public:
    explicit VideoCore(QObject *parent = nullptr);
    ~VideoCore();
    void start();
    void shm_init();
    bool shm_load();

signals:

public slots:
    void onConnected();
    void dataLog(QString log);
    void mqtt_data(QString mqtt_msg);

private:
    LogThread *logthread;
    HttpThread *httpthread;
    TcpServer *tcpserver;
    TcpServer1 *tcpserver1;

    QMQTT::Client *m_client;
    QSqlDatabase db;
    quint16 mqttIdx;
    QString ip,port,username,password;
};

#endif // VIDEOCORE_H
