a932a310f63c8b5f443835f7c9ab55575e766a18.svn-base 749 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef DATASENDER_H
  2. #define DATASENDER_H
  3. #include <QObject>
  4. #include <QUrl>
  5. #include <QNetworkAccessManager>
  6. #include <QNetworkRequest>
  7. #include <QNetworkReply>
  8. #include <QTimer>
  9. #include <json-c/json.h>
  10. #include "../ytCore/yt_unit_shm.h"
  11. #include "QReplyTimeout.h"
  12. class DataSender : public QObject
  13. {
  14. Q_OBJECT
  15. public:
  16. explicit DataSender(QObject *parent = 0,QString serverPath="", QString id="");
  17. signals:
  18. public slots:
  19. void time_out();
  20. void query_finishedSlot(QNetworkReply *reply);
  21. void beep_finishedSlot(QNetworkReply *reply);
  22. void reply_timeout();
  23. private:
  24. bool waitting;
  25. QString ServerPath;
  26. QString SelfId;
  27. QTimer *timer;
  28. QNetworkAccessManager *queryManager;
  29. };
  30. #endif // DATASENDER_H