ImageUploadWorker.h 755 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. #include "scan_common.h"
  3. class CUploadTask{
  4. public:
  5. CUploadTask():task_state(TS_NONE),upload_result(FALSE){}
  6. CString url;
  7. CString file_name;
  8. CString schoolId;
  9. CString examId;
  10. CString examCourseId;
  11. CString student_id;
  12. CString bantch;
  13. int student_paper_id;
  14. BOOL upload_result;
  15. enum TASK_STATE{
  16. TS_NONE,
  17. TS_UPLOADING,
  18. TS_COMPLETE,
  19. }task_state;
  20. };
  21. class CImageUploadWorker:public IService
  22. {
  23. public:
  24. CImageUploadWorker(void);
  25. ~CImageUploadWorker(void);
  26. enum UPLOAD_STATE{
  27. US_WAITING,
  28. US_UPLOADING,
  29. };
  30. public:
  31. UPLOAD_STATE GetUploadState(){return m_Upload_Sate;}
  32. BOOL upload(CUploadTask * uploadTask);
  33. protected:
  34. virtual ServiceState OnRunning( void );
  35. CUploadTask * m_uploadTask;
  36. UPLOAD_STATE m_Upload_Sate;
  37. };