wccresponse.h 768 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef WCCRESPONSE_H
  2. #define WCCRESPONSE_H
  3. #include "wccapi_export.h"
  4. #include <QString>
  5. #include <QNetworkReply>
  6. namespace WccNameSpace {
  7. namespace Internal {
  8. namespace Error {
  9. enum Code {
  10. No,
  11. NoProject,
  12. Zipping,
  13. FileSave,
  14. FileOpen,
  15. Network
  16. };
  17. }
  18. class WCCAPI_EXPORT WccResponse : public QObject
  19. {
  20. Q_OBJECT
  21. public:
  22. explicit WccResponse(QObject *parent);
  23. WccResponse(QObject *parent, int id, QString msg, Error::Code error = Error::No);
  24. void setMessage(const QString &reply);
  25. void setMessage(QNetworkReply *reply);
  26. QString message() const;
  27. int m_requestId;
  28. Error::Code m_errorCode;
  29. int m_code;
  30. private:
  31. QString m_message;
  32. };
  33. }
  34. }
  35. #endif // WCCRESPONSE_H