Leaked source code of windows server 2003
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.

120 lines
1.8 KiB

  1. class CBitsCommandRequest
  2. /*
  3. This class represents a particular HTTP "BITS_COMMAND" request.
  4. */
  5. {
  6. public:
  7. CBitsCommandRequest(
  8. URL_INFO * UrlInfo
  9. );
  10. ~CBitsCommandRequest();
  11. void AddPacketType( wchar_t type[] );
  12. void AddSessionId( StringHandle & id );
  13. void AddSupportedProtocols();
  14. void AddContentName( StringHandle name );
  15. void AddContentRange(
  16. UINT64 RangeStart,
  17. UINT64 RangeEnd,
  18. UINT64 Size
  19. );
  20. DWORD Send(
  21. CAbstractDataReader * Reader = 0
  22. );
  23. HRESULT
  24. CheckResponseProtocol(
  25. GUID * pId
  26. );
  27. HRESULT
  28. GetServerRange(
  29. UINT64 * RangeEnd
  30. );
  31. HRESULT
  32. GetContentLength(
  33. UINT64 * Length
  34. );
  35. HRESULT
  36. GetProtocol(
  37. GUID * id
  38. );
  39. HRESULT
  40. GetSessionId(
  41. StringHandle * id
  42. );
  43. HRESULT
  44. CheckReplyPacketType();
  45. HRESULT
  46. GetBitsError(
  47. HRESULT * phr
  48. );
  49. HRESULT
  50. GetBitsErrorContext(
  51. DWORD * pdw
  52. );
  53. HRESULT
  54. GetReplyUrl(
  55. CAutoString & ReplyUrl
  56. );
  57. HRESULT
  58. GetHostId(
  59. StringHandle * pstr
  60. );
  61. HRESULT
  62. GetHostIdFallbackTimeout(
  63. DWORD * pVal
  64. );
  65. void DrainReply();
  66. HINTERNET Query()
  67. {
  68. return m_hRequest;
  69. }
  70. HRESULT
  71. GetMandatoryHeaderCb(
  72. DWORD dwInfoLevel,
  73. LPCWSTR Name,
  74. LPWSTR Value,
  75. DWORD ValueBytes,
  76. DWORD Line
  77. );
  78. HRESULT
  79. GetOptionalHeaderCb(
  80. DWORD dwInfoLevel,
  81. LPCWSTR Name,
  82. LPWSTR Value,
  83. DWORD ValueBytes,
  84. DWORD Line
  85. );
  86. protected:
  87. HINTERNET m_hRequest;
  88. URL_INFO * m_UrlInfo;
  89. };