bodydata.h 576 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "qhttpserverfwd.h"
  2. #include <QObject>
  3. #include <QScopedPointer>
  4. /// BodyData
  5. class BodyData : public QObject
  6. {
  7. Q_OBJECT
  8. public:
  9. BodyData();
  10. private slots:
  11. void handleRequest(QHttpRequest *req, QHttpResponse *resp);
  12. };
  13. /// Responder
  14. class Responder : public QObject
  15. {
  16. Q_OBJECT
  17. public:
  18. Responder(QHttpRequest *req, QHttpResponse *resp);
  19. ~Responder();
  20. signals:
  21. void done();
  22. private slots:
  23. void accumulate(const QByteArray &data);
  24. void reply();
  25. private:
  26. QScopedPointer<QHttpRequest> m_req;
  27. QHttpResponse *m_resp;
  28. };