#ifndef BILLSOCKET_H
#define BILLSOCKET_H

#include <QJsonObject>
#include <QJsonDocument>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>

class BillSocket : public QObject
{
    Q_OBJECT
public:
    explicit BillSocket(QObject *parent=0);
    ~BillSocket();

    bool Request(const QJsonObject& requestJson, QJsonObject& recvJson, QString& error);

private:
    int m_errorNum;
    QUrl m_alternateUrl;
    QNetworkAccessManager m_networkManger;
    QNetworkRequest m_networkRequest;
    int m_current_url;
};

#endif // BILLSOCKET_H
