Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.6 KiB

  1. //========= Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #ifndef HTTP_H
  5. #define HTTP_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. //--------------------------------------------------------------------------------------------------------------
  10. /**
  11. * Status of the download thread, as set in RequestContext::status.
  12. */
  13. enum HTTPStatus_t
  14. {
  15. HTTP_CONNECTING = 0,///< This is set in the main thread before the download thread starts.
  16. HTTP_FETCH, ///< The download thread sets this when it starts reading data.
  17. HTTP_DONE, ///< The download thread sets this if it has read all the data successfully.
  18. HTTP_ABORTED, ///< The download thread sets this if it aborts because it's RequestContext::shouldStop has been set.
  19. HTTP_ERROR ///< The download thread sets this if there is an error connecting or downloading. Partial data may be present, so the main thread can check.
  20. };
  21. //--------------------------------------------------------------------------------------------------------------
  22. /**
  23. * Error encountered in the download thread, as set in RequestContext::error.
  24. */
  25. enum HTTPError_t
  26. {
  27. HTTP_ERROR_NONE = 0,
  28. HTTP_ERROR_ZERO_LENGTH_FILE,
  29. HTTP_ERROR_CONNECTION_CLOSED,
  30. HTTP_ERROR_INVALID_URL, ///< InternetCrackUrl failed
  31. HTTP_ERROR_INVALID_PROTOCOL, ///< URL didn't start with http:// or https://
  32. HTTP_ERROR_CANT_BIND_SOCKET,
  33. HTTP_ERROR_CANT_CONNECT,
  34. HTTP_ERROR_NO_HEADERS, ///< Cannot read HTTP headers
  35. HTTP_ERROR_FILE_NONEXISTENT,
  36. HTTP_ERROR_MAX
  37. };
  38. #endif // HTTP_H