mod_upload.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "stdafx.h"
  2. #include "mod_upload.h"
  3. void UploadSession::Handle_UploadProgess(SpReqAnsContext<UploadService_UploadProgess_Req, UploadService_UploadProgess_Ans>::Pointer ctx)
  4. {
  5. DbgToBeidou(ctx->link, __FUNCTION__)();
  6. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("UploadProgessReq received!");
  7. ErrorCodeEnum returnCode = ((CUploadEntity*)m_pEntity)->UploadProgess(ctx);
  8. ctx->Answer(returnCode);
  9. }
  10. void UploadSession::Handle_UploadNumber(SpReqAnsContext<UploadService_UploadNumber_Req, UploadService_UploadNumber_Ans>::Pointer ctx)
  11. {
  12. DbgToBeidou(ctx->link, __FUNCTION__)();
  13. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("UploadNumberReq received!");
  14. ErrorCodeEnum returnCode = ((CUploadEntity*)m_pEntity)->UploadNumber(ctx);
  15. ctx->Answer(returnCode);
  16. }
  17. void UploadSession::Handle_UploadDateList(SpReqAnsContext<UploadService_UploadDateList_Req, UploadService_UploadDateList_Ans>::Pointer ctx)
  18. {
  19. DbgToBeidou(ctx->link, __FUNCTION__)();
  20. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("UploadDateList received!");
  21. ErrorCodeEnum returnCode = ((CUploadEntity*)m_pEntity)->UploadDateList(ctx);
  22. ctx->Answer(returnCode);
  23. }
  24. void UploadSession::Handle_ClearUploadDate(SpReqAnsContext<UploadService_ClearUploadDate_Req, UploadService_ClearUploadDate_Ans>::Pointer ctx)
  25. {
  26. DbgToBeidou(ctx->link, __FUNCTION__)();
  27. DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI(__FUNCTION__)("ClearUploadDate received!");
  28. ErrorCodeEnum returnCode = ((CUploadEntity*)m_pEntity)->ClearUploadDate(ctx);
  29. ctx->Answer(returnCode);
  30. }
  31. SP_BEGIN_ENTITY_MAP()
  32. SP_ENTITY(CUploadEntity)
  33. SP_END_ENTITY_MAP()