mod_FingerPrint.cpp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // mod_FingerPrint.cpp : 定义 DLL 应用程序的导出函数。
  2. //
  3. #include "stdafx.h"
  4. #include "mod_FingerPrint.h"
  5. void FingerPrintServerSession::Handle_GetDevInfo(SpReqAnsContext<FingerPrintService_GetDevInfo_Req, FingerPrintService_GetDevInfo_Ans>::Pointer ctx)
  6. {
  7. LOG_FUNCTION();
  8. DbgToBeidou(ctx->link, __FUNCTION__)();
  9. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetDevInfo");
  10. m_pEntity->GetDevInfo(ctx);
  11. }
  12. void FingerPrintServerSession::Handle_GetDevStatus(SpReqAnsContext<FingerPrintService_GetDevStatus_Req, FingerPrintService_GetDevStatus_Ans>::Pointer ctx)
  13. {
  14. LOG_FUNCTION();
  15. DbgToBeidou(ctx->link, __FUNCTION__)();
  16. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetDevStatus");
  17. m_pEntity->GetDevStatus(ctx);
  18. }
  19. void FingerPrintServerSession::Handle_GetImageAndFeature(SpReqAnsContext<FingerPrintService_GetImageAndFeature_Req, FingerPrintService_GetImageAndFeature_Ans>::Pointer ctx)
  20. {
  21. LOG_FUNCTION();
  22. DbgToBeidou(ctx->link, __FUNCTION__)();
  23. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetImageAndFeature");
  24. m_pEntity->GetImageAndFeature(ctx);
  25. }
  26. void FingerPrintServerSession::Handle_GetImageAndFeatureEx(SpReqAnsContext<FingerPrintService_GetImageAndFeatureEx_Req, FingerPrintService_GetImageAndFeatureEx_Ans>::Pointer ctx)
  27. {
  28. LOG_FUNCTION();
  29. DbgToBeidou(ctx->link, __FUNCTION__)();
  30. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetImageAndFeatureEx");
  31. m_pEntity->GetImageAndFeatureEx(ctx);
  32. }
  33. //有用接口:加入交易记录日志扫描动作
  34. void FingerPrintServerSession::Handle_GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFingerPrint_Req, FingerPrintService_GetFingerPrint_Ans>::Pointer ctx)
  35. {
  36. LOG_FUNCTION();
  37. DbgToBeidou(ctx->link, __FUNCTION__)();
  38. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetFingerPrint");
  39. m_pEntity->GetFingerPrint(ctx);
  40. }
  41. //有用接口:加入交易记录日志生成指纹模板
  42. void FingerPrintServerSession::Handle_GenerateTemplate(SpReqAnsContext<FingerPrintService_GenerateTemplate_Req, FingerPrintService_GenerateTemplate_Ans>::Pointer ctx)
  43. {
  44. LOG_FUNCTION();
  45. DbgToBeidou(ctx->link, __FUNCTION__)();
  46. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GenerateTemplate");
  47. m_pEntity->GenerateTemplate(ctx);
  48. }
  49. void FingerPrintServerSession::Handle_CancelRegister(SpOnewayCallContext<FingerPrintService_CancelRegister_Info>::Pointer ctx)
  50. {
  51. LOG_FUNCTION();
  52. DbgToBeidou(ctx->link, __FUNCTION__)();
  53. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CancelRegister");
  54. m_pEntity->CancelRegister(ctx);
  55. }
  56. void FingerPrintServerSession::Handle_CancelMatch(SpOnewayCallContext<FingerPrintService_CancelMatch_Info>::Pointer ctx)
  57. {
  58. LOG_FUNCTION();
  59. DbgToBeidou(ctx->link, __FUNCTION__)();
  60. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CancelMatch");
  61. m_pEntity->CancelMatch(ctx);
  62. }
  63. void FingerPrintServerSession::Handle_Match(SpReqAnsContext<FingerPrintService_Match_Req, FingerPrintService_Match_Ans>::Pointer ctx)
  64. {
  65. LOG_FUNCTION();
  66. DbgToBeidou(ctx->link, __FUNCTION__)();
  67. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CheckAndMatch");
  68. m_pEntity->CheckAndMatch(ctx);
  69. }
  70. void FingerPrintServerSession::Handle_Exit(SpOnewayCallContext<FingerPrintService_Exit_Info>::Pointer ctx)
  71. {
  72. LOG_FUNCTION();
  73. DbgToBeidou(ctx->link, __FUNCTION__)();
  74. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke Exit");
  75. m_pEntity->Exit(ctx);
  76. }
  77. void CFingerPrintEntity::OnSysVarEvent(const char *pszKey,
  78. const char *pszValue, const char *pszOldValue, const char *pszEntityName)
  79. {
  80. if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
  81. { //增加页面位置判断
  82. m_fsm.OnUIState4SetWhatPage(pszValue);
  83. }
  84. }
  85. SP_BEGIN_ENTITY_MAP()
  86. SP_ENTITY(CFingerPrintEntity)
  87. SP_END_ENTITY_MAP()