downloaddefs.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef _DOWNLOADDEFS_H
  19. #define _DOWNLOADDEFS_H
  20. // CDownload statuses
  21. #define DOWNLOADSTATUS_NONE 0
  22. #define DOWNLOADSTATUS_GO 1
  23. #define DOWNLOADSTATUS_CONNECTING 2
  24. #define DOWNLOADSTATUS_LOGGINGIN 3
  25. #define DOWNLOADSTATUS_FINDINGFILE 4
  26. #define DOWNLOADSTATUS_QUERYINGRESUME 5
  27. #define DOWNLOADSTATUS_DOWNLOADING 6
  28. #define DOWNLOADSTATUS_DISCONNECTING 7
  29. #define DOWNLOADSTATUS_DONE 0
  30. // CDownload return codes
  31. #define DOWNLOAD_SUCCEEDED S_OK
  32. #define DOWNLOAD_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 1 )
  33. #define DOWNLOAD_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 2 )
  34. #define DOWNLOAD_NETWORKERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 3 )
  35. #define DOWNLOAD_FILEERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 4 )
  36. #define DOWNLOAD_REENTERERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 4 )
  37. // CDownloadEvent return codes.
  38. #define DOWNLOADEVENT_SUCCEEDED S_OK
  39. #define DOWNLOADEVENT_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 5 )
  40. #define DOWNLOADEVENT_RESUME S_OK
  41. #define DOWNLOADEVENT_DONOTRESUME MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 6 )
  42. // CDownloadEvent error codes for OnError()
  43. #define DOWNLOADEVENT_NOSUCHSERVER 1
  44. #define DOWNLOADEVENT_COULDNOTCONNECT 2
  45. #define DOWNLOADEVENT_LOGINFAILED 3
  46. #define DOWNLOADEVENT_NOSUCHFILE 4
  47. #define DOWNLOADEVENT_LOCALFILEOPENFAILED 5
  48. #define DOWNLOADEVENT_TCPERROR 6
  49. #define DOWNLOADEVENT_DISCONNECTERROR 7
  50. #endif