12345678910111213141516171819202122232425262728293031 |
- #include "mod_download.h"
- void DownloadSession::Handle_DownloadFile(SpReqAnsContext<DownloadService_DownloadFile_Req, DownloadService_DownloadFile_Ans>::Pointer ctx)
- {
- ErrorCodeEnum returnCode = ((CDownloadEntity*)m_pEntity)->DownloadFile(ctx);
- ctx->Answer(returnCode);
- }
- void DownloadSession::Handle_IsDownloading(SpReqAnsContext<DownloadService_IsDownloading_Req, DownloadService_IsDownloading_Ans>::Pointer ctx)
- {
- auto rc = ((CDownloadEntity*)m_pEntity)->IsDownloading(ctx->Ans.bDownloading);
- ctx->Answer(rc);
- }
- void DownloadSession::Handle_CancelDownloadFile(SpReqAnsContext<DownloadService_CancelDownloadFile_Req, DownloadService_CancelDownloadFile_Ans>::Pointer ctx)
- {
- ErrorCodeEnum returnCode = ((CDownloadEntity*)m_pEntity)->CancelDownloadFile(ctx);
- ctx->Answer(returnCode);
- }
- void DownloadSession::Handle_QueryDownloadState(SpReqAnsContext<DownloadService_QueryDownloadState_Req, DownloadService_QueryDownloadState_Ans>::Pointer ctx)
- {
- auto rc = ((CDownloadEntity*)m_pEntity)->QueryDownloadState(ctx);
- ctx->Answer(rc);
- }
- SP_BEGIN_ENTITY_MAP()
- SP_ENTITY(CDownloadEntity)
- SP_END_ENTITY_MAP()
|