CAppInfo.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. #ifndef CAPPINFO_H
  2. #define CAPPINFO_H
  3. #include <memory>
  4. #include <QString>
  5. #include <QWidget>
  6. #include "json/json.h"
  7. namespace EXAM_TYPES
  8. {
  9. const QString ONLINE = "ONLINE";
  10. const QString PRACTICE = "PRACTICE";
  11. const QString OFFLINE = "OFFLINE";
  12. }
  13. class ExamInfo
  14. {
  15. public:
  16. bool bIsExamInProgress;//是否断点续考
  17. QString sExamType;
  18. QString sPracticeType;
  19. __int64 nExamId;
  20. __int64 nExamStudentId;
  21. __int64 nExamRecordDataId;
  22. QString sCourseCode;
  23. QString sCourseName;
  24. int nFaceVerifyMinute;
  25. int nDuration;
  26. bool bFaceCheck;
  27. bool bLivenessCheck;
  28. int nFaceThreshold;//人脸比对阈值
  29. bool bIsFaceCheck;//进入考试是否验证人脸识别(强制、非强制)
  30. bool bIsLivenessBefore;//考前活体检测
  31. int nSnapshotInterval;//抓拍间隔时间
  32. int nFaceVerifyStartMinute;//活体检测开始分钟数
  33. int nFaceVerifyEndMinute;//活体检测结束分钟数
  34. bool bIsStrangerEnable;//是否启用陌生人检测
  35. __int64 nFaceLiveVerifyId;//活体检测id
  36. int nFaceVerifyTimes;//活体检测次数
  37. int nFaceVerifyDoMinute;//活体检测时间后台随机
  38. int nActionNum;
  39. QString sActionOptions;//SHAKE,BLINK,NOD
  40. QString sActionOrder;//FIXED
  41. int nActionDuration;//单个动作最大时长
  42. int nActionAlert;//指定动作检测提醒N秒后开始检测
  43. int nAllActionDuration;//整体动作最大时长
  44. ExamInfo()
  45. {
  46. bIsExamInProgress = false;
  47. sExamType = "";
  48. sPracticeType = "";
  49. nExamId = 0;
  50. nExamStudentId = 0;
  51. nExamRecordDataId = 0;
  52. sCourseCode = "";
  53. sCourseName = "";
  54. nFaceVerifyMinute = 0;
  55. nDuration = 0;
  56. bFaceCheck = false;
  57. bLivenessCheck = false;
  58. nFaceThreshold = 50;
  59. bIsFaceCheck = false;
  60. nSnapshotInterval = 0;
  61. nFaceVerifyStartMinute = 0;
  62. nFaceVerifyEndMinute = 0;
  63. bIsStrangerEnable = false;
  64. nActionNum = 0;
  65. sActionOptions = "";
  66. sActionOrder = "";
  67. nActionDuration = 0;
  68. nAllActionDuration = 0;
  69. nActionAlert = 0;
  70. nFaceLiveVerifyId = 0;
  71. nFaceVerifyDoMinute = 0;
  72. nFaceVerifyTimes = 0;
  73. }
  74. };
  75. class CAppInfo
  76. {
  77. public:
  78. CAppInfo();
  79. double m_fRate;
  80. QString m_sQssStr;
  81. QString m_sEscDomain;//ecs域名
  82. QString m_sOrgPrefix;//org域名前缀
  83. QString m_sHttpServer;
  84. QString m_sHttpPort;
  85. bool m_bDisableMutiScreen;//禁止全屏
  86. bool m_bDisableRemoteAssistance;//远程协助
  87. bool m_bInprogressCheckRemoteAssistance;//过程中检测远程协助
  88. bool m_bFullScreenTop;//屏幕前置
  89. bool m_bDisableVirtualCamera;//虚拟摄像头
  90. QString m_sRootOrgId;
  91. QString m_sRootOrgName;
  92. bool m_bShowQmthLogo;
  93. QString m_sMenuLogoUrl;
  94. bool m_bShowStudentClientAppQrcode;
  95. bool m_bWeiXinAnswerEnabled;//是否开启微信作答
  96. Json::Value m_jAudioPlayedCount;
  97. bool m_bShowStudentName;
  98. bool m_bShowStudentCode;
  99. bool m_bShowStudentIdentity;
  100. bool m_bMutipleAnserCountTips;
  101. __int64 m_nStudentId;
  102. QString m_sStudentName;
  103. __int64 m_nOrgId;
  104. QString m_sOrgCode;
  105. QString m_sOrgName;
  106. QString m_sStudentCode;
  107. QString m_sStudentIdentityNumber;
  108. QString m_sStudentPhotoPath;
  109. bool m_bStudentEnable;
  110. QString m_sSpecialtyName;
  111. QString m_sAppDownLoadUrl;//app下载地址
  112. ExamInfo m_oExamInfo;
  113. QWidget* m_pAnsBgWidget;
  114. //过程中活体检测失败是否退出考试
  115. bool m_bInprogressFaceLivenessFailedForceExit;
  116. //检查当前考生是否跳过人脸识别接口
  117. bool m_bSkipFaceCheck;
  118. int m_nVersionId;
  119. QString m_sVersionCode;
  120. QString m_sMachineId;
  121. QString m_sUpgradeUrl;//升级文件url
  122. QString m_sCacheFileDir;
  123. __int64 m_nRecordId;
  124. bool m_bShowDebugInfo;//是否显示debug日志
  125. __int64 serverMTime();
  126. std::map<QString, QString> m_FileCacheMap ;
  127. };
  128. extern std::shared_ptr<CAppInfo> g_appInfoPtr;
  129. #endif // CAPPINFO_H