mod_cardissuer.cpp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. // mod_cardissuer.cpp : Defines the exported functions for the DLL application.
  2. //
  3. #include "stdafx.h"
  4. #pragma once
  5. #include "SpBase.h"
  6. #include "mod_cardissuer.h"
  7. #include "CardIssuerClass.h"
  8. void CardIssuerServerSession::Handle_Insert(SpReqAnsContext<CardIssuerService_Insert_Req, CardIssuerService_Insert_Ans>::Pointer ctx)
  9. {
  10. LOG_FUNCTION();
  11. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Insert")("Insert");
  12. m_pEntity->Insert(ctx);
  13. }
  14. void CardIssuerServerSession::Handle_Read(SpReqAnsContext<CardIssuerService_Read_Req, CardIssuerService_Read_Ans>::Pointer ctx)
  15. {
  16. LOG_FUNCTION();
  17. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Read")("Read");
  18. m_pEntity->Read(ctx);
  19. }
  20. void CardIssuerServerSession::Handle_Capture(SpReqAnsContext<CardIssuerService_Capture_Req, CardIssuerService_Capture_Ans>::Pointer ctx)
  21. {
  22. LOG_FUNCTION();
  23. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Capture")("Capture");
  24. m_pEntity->Capture(ctx);
  25. }
  26. void CardIssuerServerSession::Handle_Eject(SpReqAnsContext<CardIssuerService_Eject_Req, CardIssuerService_Eject_Ans>::Pointer ctx)
  27. {
  28. LOG_FUNCTION();
  29. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Eject")("Eject");
  30. m_pEntity->Eject(ctx);
  31. }
  32. void CardIssuerServerSession::Handle_CancelInsert(SpOnewayCallContext<CardIssuerService_CancelInsert_Info>::Pointer ctx)
  33. {
  34. LOG_FUNCTION();
  35. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("CancelInsert")("CancelInsert");
  36. m_pEntity->CancelInsert(ctx);
  37. }
  38. void CardIssuerServerSession::Handle_InsertWaitMore(SpOnewayCallContext<CardIssuerService_InsertWaitMore_Info>::Pointer ctx)
  39. {
  40. LOG_FUNCTION();
  41. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("InsertWaitMore")("InsertWaitMore");
  42. m_pEntity->InsertWaitMore(ctx);
  43. }
  44. void CardIssuerServerSession::Handle_PreOnline(SpReqAnsContext<CardIssuerService_PreOnline_Req, CardIssuerService_PreOnline_Ans>::Pointer ctx)
  45. {
  46. LOG_FUNCTION();
  47. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("PreOnline")("PreOnline");
  48. m_pEntity->PreOnline(ctx);
  49. }
  50. void CardIssuerServerSession::Handle_PostOnline(SpReqAnsContext<CardIssuerService_PostOnline_Req, CardIssuerService_PostOnline_Ans>::Pointer ctx)
  51. {
  52. LOG_FUNCTION();
  53. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("PostOnline")("PostOnline");
  54. m_pEntity->PostOnline(ctx);
  55. }
  56. void CardIssuerServerSession::Handle_Exit(SpOnewayCallContext<CardIssuerService_Exit_Info>::Pointer ctx)
  57. {
  58. LOG_FUNCTION();
  59. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("Exit")("Exit");
  60. m_pEntity->Exit(ctx);
  61. }
  62. void CardIssuerServerSession::Handle_SetIssueFlag(SpOnewayCallContext<CardIssuerService_SetIssueFlag_Info>::Pointer ctx)
  63. {
  64. LOG_FUNCTION();
  65. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("SetIssueFlag")("SetIssueFlag");
  66. m_pEntity->SetIssueFlag(ctx);
  67. }
  68. void CardIssuerServerSession::Handle_QueryCardInfo(SpReqAnsContext<CardIssuerService_QueryCardInfo_Req, CardIssuerService_QueryCardInfo_Ans>::Pointer ctx)
  69. {
  70. LOG_FUNCTION();
  71. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("QueryCardInfo")("QueryCardInfo");
  72. m_pEntity->QueryCardInfo(ctx);
  73. }
  74. void CardIssuerServerSession::Handle_WriteTrack(SpReqAnsContext<CardIssuerService_WriteTrack_Req, CardIssuerService_WriteTrack_Ans>::Pointer ctx)
  75. {
  76. LOG_FUNCTION();
  77. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("WriteTrack")("WriteTrack");
  78. m_pEntity->WriteTrack(ctx);
  79. }
  80. void CardIssuerServerSession::Handle_GetMaterialCountEx(SpReqAnsContext<CardIssuerService_GetMaterialCountEx_Req, CardIssuerService_GetMaterialCountEx_Ans>::Pointer ctx)
  81. {
  82. LOG_FUNCTION();
  83. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetMaterialCountEx")("GetMaterialCountEx");
  84. m_pEntity->GetMaterialCountEx(ctx);
  85. }
  86. void CardIssuerServerSession::Handle_SetMaterialCountEx(SpReqAnsContext<CardIssuerService_SetMaterialCountEx_Req, CardIssuerService_SetMaterialCountEx_Ans>::Pointer ctx)
  87. {
  88. LOG_FUNCTION();
  89. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("SetMaterialCountEx")("SetMaterialCountEx");
  90. m_pEntity->SetMaterialCountEx(ctx);
  91. }
  92. void CardIssuerServerSession::Handle_SetSomeFlag(SpReqAnsContext<CardIssuerService_SetSomeFlag_Req, CardIssuerService_SetSomeFlag_Ans>::Pointer ctx)
  93. {
  94. LOG_FUNCTION();
  95. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("SetSomeFlag")("SetSomeFlag");
  96. m_pEntity->SetSomeFlag(ctx);
  97. }
  98. void CardIssuerServerSession::Handle_IssueEx(SpReqAnsContext<CardIssuerService_IssueEx_Req, CardIssuerService_IssueEx_Ans>::Pointer ctx)
  99. {
  100. LOG_FUNCTION();
  101. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("IssueEx")("IssueEx");
  102. m_pEntity->IssueEx(ctx);
  103. }
  104. void CardIssuerServerSession::Handle_SAMICCommand(SpReqAnsContext<CardIssuerService_SAMICCommand_Req, CardIssuerService_SAMICCommand_Ans>::Pointer ctx)
  105. {
  106. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("SAMICCommand")("SAMICCommand");
  107. m_pEntity->SAMICCommand(ctx);
  108. }
  109. void CardIssuerServerSession::Handle_QueryCIStatus(SpReqAnsContext<CardIssuerService_QueryCIStatus_Req, CardIssuerService_QueryCIStatus_Ans>::Pointer ctx)
  110. {
  111. LOG_FUNCTION();
  112. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("QueryCIStatus")("QueryCIStatus");
  113. m_pEntity->QueryCIStatus(ctx);
  114. }
  115. void CardIssuerServerSession::Handle_GetDevInfo(SpReqAnsContext<CardIssuerService_GetDevInfo_Req, CardIssuerService_GetDevInfo_Ans>::Pointer ctx)
  116. {
  117. LOG_FUNCTION();
  118. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetDevInfo")("GetDevInfo");
  119. m_pEntity->GetDevInfo(ctx);
  120. }
  121. void CCardIssuerEntity::OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName)
  122. {
  123. if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
  124. {
  125. if (_strnicmp(pszValue, "M", strlen("M")) == 0)
  126. m_fsm.SetInWhatPage(PageType_MainPage);
  127. else if (_strnicmp(pszValue, "U", strlen("U")) == 0)
  128. m_fsm.SetInWhatPage(PageType_UserDesktop);
  129. else
  130. m_fsm.SetInWhatPage(PageType_Other);
  131. }
  132. }
  133. SP_BEGIN_ENTITY_MAP()
  134. SP_ENTITY(CCardIssuerEntity)
  135. SP_END_ENTITY_MAP()