#ifndef NEWHTTPSERVICE_H
#define NEWHTTPSERVICE_H
#include <QObject>
#include "HttpClient.h"
#include "VidesData.h"
#include "Common.h"
#include <list>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include <QUrlQuery>

const QString OPERATION_FAILED = "操作失败";
const QString OPERATION_SUCCESS = "操作成功";

class NewHttpService : public QObject {
    Q_OBJECT

public:
    static NewHttpService& getInstance() {
        static NewHttpService instance;
        return instance;
    }

    vides_data::response* httpPostDeviceStatus(vides_data::requestDeviceStatus & deviceStatus);

    vides_data::response *httpFindCameras(QString &serialNumber,std::list<vides_data::responseDeviceStatus*>&datas);

    void setHttpUrl(const QString& url);

public:
    NewHttpService();
    ~NewHttpService();

    HttpClient m_httpClient;

    QString httpUrl;
};


#endif // NEWHTTPSERVICE_H
