StudentMatcher.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include "scan_common.h"
  3. #include "DataBaseHolder.h"
  4. #include "ResultHandler.h"
  5. class CStudentMatcher:public IService,public CDataBaseHolder
  6. {
  7. public:
  8. CStudentMatcher(void);
  9. ~CStudentMatcher(void);
  10. virtual ServiceState OnStarting( void );
  11. virtual ServiceState OnRunning( void );
  12. virtual ServiceState OnStoping( void );
  13. void SetResultHandler( CResultHandler* result_handler );
  14. void setExamId( long examId );
  15. int SetHandlerWnd( HWND hwnd )
  16. {
  17. m_hwnd = hwnd;
  18. return TRUE;
  19. }
  20. void SetImgDir( CString norimg_dir, CString excimg_dir )
  21. {
  22. m_norimg_dir =CT2A(norimg_dir);
  23. m_excimg_dir =CT2A(excimg_dir);
  24. }
  25. protected:
  26. CString url_str;
  27. CString url_str_dxk;
  28. CString url_str_zxk;
  29. CResultHandler * m_resultHandler;
  30. std::string m_excimg_dir;
  31. std::string m_norimg_dir;
  32. long m_examId;
  33. HWND m_hwnd;
  34. bool m_bUseQr;
  35. std::string m_strQr;
  36. bool m_bErrorHandle;
  37. int cur_student_paper_id;
  38. public:
  39. void SetErrorHandle(bool bErrorHandle){ m_bErrorHandle = bErrorHandle; }
  40. CString MarkHttpHeaderData();
  41. bool readPaperId(CString& strPaperId);
  42. void SetUseQr(int student_paper_id, bool bUseQr, const std::string&strQr){ cur_student_paper_id = student_paper_id; m_strQr = strQr; m_bUseQr = bUseQr; }
  43. bool readBarcodeFlag(CString& strBarcodeFlag);
  44. int m_nOnlineScanType;//参数说明:-1 代表原理的在线答题卡扫描 0:代表英语魔法词汇宝扫描
  45. };