1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- // mod_pinpad.cpp : Defines the exported functions for the DLL application.
- //
- #include "stdafx.h"
- #include "mod_PinPad.h"
- void PinPadServerSession::Handle_GetInput(SpReqAnsContext<PinPadService_GetInput_Req, PinPadService_GetInput_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->GetInput(ctx);
- }
- void PinPadServerSession::Handle_InputWaitMore(SpOnewayCallContext<PinPadService_InputWaitMore_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->InputWaitMore(ctx);
- }
- void PinPadServerSession::Handle_InputCancel(SpOnewayCallContext<PinPadService_InputCancel_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->InputCancel(ctx);
- Dbg("handle front cancel");
- }
- void PinPadServerSession::Handle_Exit(SpOnewayCallContext<PinPadService_Exit_Info>::Pointer ctx)
- {
- //LOG_FUNCTION();
- m_pEntity->Exit(ctx);
- }
- void PinPadServerSession::Handle_LoadKeys(SpReqAnsContext<PinPadService_LoadKeys_Req, PinPadService_LoadKeys_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->LoadKeys(ctx);
- }
- void PinPadServerSession::Handle_EncryptData(SpReqAnsContext<PinPadService_EncryptData_Req, PinPadService_EncryptData_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->EncryptData(ctx);
- }
- void PinPadServerSession::Handle_GetInputSM(SpReqAnsContext<PinPadService_GetInputSM_Req, PinPadService_GetInputSM_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->GetInputSM(ctx);
- }
- void PinPadServerSession::Handle_LoadKeysSM(SpReqAnsContext<PinPadService_LoadKeysSM_Req, PinPadService_LoadKeysSM_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->LoadKeysSM(ctx);
- }
- void PinPadServerSession::Handle_EncryptDataSM(SpReqAnsContext<PinPadService_EncryptDataSM_Req, PinPadService_EncryptDataSM_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->EncryptDataSM(ctx);
- }
- void PinPadServerSession::Handle_QueryFunc(SpReqAnsContext<PinPadService_QueryFunc_Req, PinPadService_QueryFunc_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->QueryFunc(ctx);
- }
- void PinPadServerSession::Handle_GetCheckCode(SpReqAnsContext<PinPadService_GetCheckCode_Req, PinPadService_GetCheckCode_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->GetCheckCode(ctx);
- }
- void PinPadServerSession::Handle_CrossTermCall(SpReqAnsContext<PinPadService_CrossTermCall_Req, PinPadService_CrossTermCall_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->CrossTermCall(ctx);
- }
- void PinPadServerSession::Handle_CrossTermInvokeInfo(SpOnewayCallContext<PinPadService_CrossTermInvokeInfo_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->CrossTermInvokeInfo(ctx);
- }
- void PinPadServerSession::Handle_GetDevInfo(SpReqAnsContext<PinPadService_GetDevInfo_Req, PinPadService_GetDevInfo_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->GetDevInfo(ctx);
- }
- void CPinPadEntity::OnSysVarEvent(const char *pszKey,
- const char *pszValue, const char *pszOldValue, const char *pszEntityName)
- {
- if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
- {
- if (_strnicmp(pszValue, "M", strlen("M")) == 0)
- {
- Dbg("enter main page");
- m_fsm.SetEnterMainPage(true);
- }
- else
- {
- Dbg("not main page[%s]", pszValue);
- m_fsm.SetEnterMainPage(false);
- }
- }
- }
- SP_BEGIN_ENTITY_MAP()
- SP_ENTITY(CPinPadEntity)
- SP_END_ENTITY_MAP()
|