1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- // mod_ContactlessCard.cpp : Defines the exported functions for the DLL application.
- //
- #include "stdafx.h"
- #include "mod_ContactlessCard.h"
- //oiltest
- #include "ContactlessCard_msg_g.h"
- bool bCard = false;
- void ContactlessCardServerSession::Handle_Insert(SpReqAnsContext<ContactlessCardService_Insert_Req, ContactlessCardService_Insert_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->Insert(ctx);
- }
- void ContactlessCardServerSession::Handle_CancelInsert(SpOnewayCallContext<ContactlessCardService_CancelInsert_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->CancelInsert(ctx);
- }
- void ContactlessCardServerSession::Handle_InsertWaitMore(SpOnewayCallContext<ContactlessCardService_InsertWaitMore_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->InsertWaitMore(ctx);
- }
- void ContactlessCardServerSession::Handle_PreOnline(SpReqAnsContext<ContactlessCardService_PreOnline_Req, ContactlessCardService_PreOnline_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- //ctx->Ans.result = "ACTION,|ATCCODE,000C|ARQCCODE,586EFDCCD5385856|MAC,07010103A0B000010A01000000000075EB2B20|ARQCSIZE,37|ARQCDATA,00000000000000000000000001560000000000015614102270046E69797C00000C03A0B000|EXPIREDATE,240731|T2ACCOUNT,6214838818741003|T2CARDSERIAL,0|T2CVC,838125|T2TRACK2,6214838818741003D24072202453300838125|CARDCAT,0";
- //ctx->Answer(Error_Succeed);
- m_pEntity->PreOnline(ctx);
- }
- void ContactlessCardServerSession::Handle_PostOnline(SpReqAnsContext<ContactlessCardService_PostOnline_Req, ContactlessCardService_PostOnline_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- //ctx->Ans.result = "";
- //ctx->Answer(Error_Succeed);
- m_pEntity->PostOnline(ctx);
- }
- void ContactlessCardServerSession::Handle_Eject(SpReqAnsContext<ContactlessCardService_Eject_Req, ContactlessCardService_Eject_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- //bCard = false;
- //ctx->Answer(Error_Succeed);
- //FetchCard evt;
- //evt.status = 0;
- //SpSendBroadcast(m_pEntity->GetFunction(),SP_MSG_OF(FetchCard),SP_MSG_SIG_OF(FetchCard),evt);
- //Dbg("客户取走卡片msg发送");
- m_pEntity->Eject(ctx);
- }
- void ContactlessCardServerSession::Handle_Exit(SpOnewayCallContext<ContactlessCardService_Exit_Info>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->Exit(ctx);
- }
- void ContactlessCardServerSession::Handle_QueryCardInfo(SpReqAnsContext<ContactlessCardService_QueryCardInfo_Req, ContactlessCardService_QueryCardInfo_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- //if (bCard)
- // ctx->Ans.position = 4;
- //else
- // ctx->Ans.position = 0;
- //ctx->Answer(Error_Succeed);
- m_pEntity->QueryCardInfo(ctx);
- }
- void ContactlessCardServerSession::Handle_GetDevInfo(SpReqAnsContext<ContactlessCardService_GetDevInfo_Req, ContactlessCardService_GetDevInfo_Ans>::Pointer ctx)
- {
- LOG_FUNCTION();
- m_pEntity->GetDevInfo(ctx);
- }
- SP_BEGIN_ENTITY_MAP()
- SP_ENTITY(CContactlessCardEntity)
- SP_END_ENTITY_MAP()
|