#include "stdafx.h" #include "mod_IDCertificate.h" void IDCertServerSession::Handle_CancelRead(SpOnewayCallContext::Pointer ctx) { DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("CancelRead")("Handle_CancelRead"); m_pEntity->CancelRead(ctx); } void IDCertServerSession::Handle_ReadWaitMore(SpOnewayCallContext::Pointer ctx) { DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("ReadWaitMore")("Handle_ReadWaitMore"); m_pEntity->ReadWaitMore(ctx); } void IDCertServerSession::Handle_GetDevInfo(SpReqAnsContext::Pointer ctx) { DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetDevInfo")("Handle_GetDevInfo"); m_pEntity->GetDevInfo(ctx); } void IDCertServerSession::Handle_Exit(SpOnewayCallContext::Pointer ctx) { DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Exit")("Handle_Exit"); m_pEntity->Exit(ctx); } void IDCertServerSession::Handle_Eject(SpReqAnsContext::Pointer ctx) { DbgToBeidou(ctx->link, __FUNCTION__)(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Eject")("Handle_Eject"); m_pEntity->Eject(ctx); } void IDCertServerSession::Handle_ReadAndScan(SpReqAnsContext::Pointer ctx) { DbgToBeidou(ctx->link, __FUNCTION__)(); LOG_FUNCTION(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("ReadAndScan")("Handle_ReadAndScan"); m_pEntity->ReadAndScan(ctx); } void IDCertServerSession::Handle_ReadAndScanUTF8(SpReqAnsContext::Pointer ctx) //ex1 { DbgToBeidou(ctx->link, __FUNCTION__)(); LOG_FUNCTION(); DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("ReadAndScanUTF8")("Handle_ReadAndScanUTF8"); m_pEntity->ReadAndScanUTF8(ctx); } #ifdef RVC_OS_WIN void CIDCertEntity::OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName) { if ((_strnicmp(pszKey, "FWBReConn", strlen("FWBReConn")) == 0)) { DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("OnSysVarEvent FWBReConn:%s", pszValue); //"Y":open suc "U":unbind if (_strnicmp(pszValue, "Y", strlen("Y")) == 0 || _strnicmp(pszValue, "U", strlen("U")) == 0) { FSMEvent* e = new FSMEvent(USER_EVT_TODO_INIT); m_fsm.PostEventFIFO(e); } else if (_strnicmp(pszValue, "D", strlen("D")) == 0) { if (m_fsm.GetReadFlag()) { DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setLogCode("QLR040220106").setResultCode("RTA2103")("FWB disconnected while reading IDCard."); CSimpleStringA xTmpDevNo(""); GetFunction()->GetSysVar("FWBDevSN", xTmpDevNo); LogError(Severity_Middle, Error_Unexpect, IDCertificate_UserErrorCode_Reading_Disconnected, CSimpleStringA::Format("%s disconnected while reading IDCard.",xTmpDevNo.GetData())); } m_fsm.ResetDevInitFlag(); } } } #endif // !RVC_OS_WIN SP_BEGIN_ENTITY_MAP() SP_ENTITY(CIDCertEntity) SP_END_ENTITY_MAP()