WebJsonRpc.h 571 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <utils/Logger.h>
  3. #include <QJsonObject>
  4. class QtHttpServer;
  5. class QtHttpRequest;
  6. class QtHttpClientWrapper;
  7. class JsonAPI;
  8. class WebJsonRpc : public QObject {
  9. Q_OBJECT
  10. public:
  11. WebJsonRpc(QtHttpRequest* request, QtHttpServer* server, bool localConnection, QtHttpClientWrapper* parent);
  12. void handleMessage(QtHttpRequest* request);
  13. private:
  14. QtHttpServer* _server;
  15. QtHttpClientWrapper* _wrapper;
  16. Logger* _log;
  17. JsonAPI* _jsonAPI;
  18. bool _stopHandle = false;
  19. bool _unlocked = false;
  20. private slots:
  21. void handleCallback(QJsonObject obj);
  22. };