123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- // mod_FingerPrint.cpp : 定义 DLL 应用程序的导出函数。
- //
- #include "stdafx.h"
- #include "mod_FingerPrint.h"
- void FingerPrintServerSession::Handle_GetDevInfo(SpReqAnsContext<FingerPrintService_GetDevInfo_Req, FingerPrintService_GetDevInfo_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetDevInfo");
- m_pEntity->GetDevInfo(ctx);
- }
- void FingerPrintServerSession::Handle_GetDevStatus(SpReqAnsContext<FingerPrintService_GetDevStatus_Req, FingerPrintService_GetDevStatus_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetDevStatus");
- m_pEntity->GetDevStatus(ctx);
- }
- void FingerPrintServerSession::Handle_GetImageAndFeature(SpReqAnsContext<FingerPrintService_GetImageAndFeature_Req, FingerPrintService_GetImageAndFeature_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetImageAndFeature");
- m_pEntity->GetImageAndFeature(ctx);
- }
- void FingerPrintServerSession::Handle_GetImageAndFeatureEx(SpReqAnsContext<FingerPrintService_GetImageAndFeatureEx_Req, FingerPrintService_GetImageAndFeatureEx_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetImageAndFeatureEx");
- m_pEntity->GetImageAndFeatureEx(ctx);
- }
- //有用接口:加入交易记录日志扫描动作
- void FingerPrintServerSession::Handle_GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFingerPrint_Req, FingerPrintService_GetFingerPrint_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetFingerPrint , ctx->Req.times = %d", ctx->Req.times);
- m_pEntity->GetFingerPrint(ctx);
- }
- //有用接口:加入交易记录日志生成指纹模板
- void FingerPrintServerSession::Handle_GenerateTemplate(SpReqAnsContext<FingerPrintService_GenerateTemplate_Req, FingerPrintService_GenerateTemplate_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GenerateTemplate");
- m_pEntity->GenerateTemplate(ctx);
- }
- void FingerPrintServerSession::Handle_CancelRegister(SpOnewayCallContext<FingerPrintService_CancelRegister_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CancelRegister");
- m_pEntity->CancelRegister(ctx);
- }
- void FingerPrintServerSession::Handle_CancelMatch(SpOnewayCallContext<FingerPrintService_CancelMatch_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CancelMatch");
- m_pEntity->CancelMatch(ctx);
- }
- void FingerPrintServerSession::Handle_Match(SpReqAnsContext<FingerPrintService_Match_Req, FingerPrintService_Match_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CheckAndMatch");
- m_pEntity->CheckAndMatch(ctx);
- }
- void FingerPrintServerSession::Handle_Exit(SpOnewayCallContext<FingerPrintService_Exit_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke Exit");
- m_pEntity->Exit(ctx);
- }
- #pragma region JS接口实现
- void FingerPrintServerSession::Handle_GetFingerPrintJS(SpReqAnsContext<FingerPrintService_GetFingerPrintJS_Req, FingerPrintService_GetFingerPrintJS_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GetFingerPrintJS , fingerSN = %d, scanTimeOut = %d", ctx->Req.fingerSN,ctx->Req.scanTimeOut);
- m_pEntity->GetFingerPrintJS(ctx);
- }
- void FingerPrintServerSession::Handle_GenerateTemplateJS(SpReqAnsContext<FingerPrintService_GenerateTemplateJS_Req, FingerPrintService_GenerateTemplateJS_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke GenerateTemplateJS");
- m_pEntity->GenerateTemplateJS(ctx);
- }
- void FingerPrintServerSession::Handle_CancelScanJS(SpReqAnsContext<FingerPrintService_CancelScanJS_Req, FingerPrintService_CancelScanJS_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- DbgToBeidou(ctx->link, __FUNCTION__)();
- DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("Invoke CancelScanJS");
- m_pEntity->CancelScanJS(ctx);
- }
- #pragma endregion JS接口实现
- void CFingerPrintEntity::OnSysVarEvent(const char *pszKey,
- const char *pszValue, const char *pszOldValue, const char *pszEntityName)
- {
- if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
- { //增加页面位置判断
- m_fsm.OnUIState4SetWhatPage(pszValue);
- }
- }
- SP_BEGIN_ENTITY_MAP()
- SP_ENTITY(CFingerPrintEntity)
- SP_END_ENTITY_MAP()
|