summaryrefslogtreecommitdiff
path: root/chromium/net/ftp/ftp_response_info.h
blob: 576ef2501b465a71dbe88a1b4076fc5bee267c90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_FTP_FTP_RESPONSE_INFO_H_
#define NET_FTP_FTP_RESPONSE_INFO_H_

#include <stdint.h>

#include "base/time/time.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_export.h"

namespace net {

class NET_EXPORT_PRIVATE FtpResponseInfo {
 public:
  FtpResponseInfo();
  ~FtpResponseInfo();

  // True if authentication failed and valid authentication credentials are
  // needed.
  bool needs_auth;

  // The time at which the request was made that resulted in this response.
  // For cached responses, this time could be "far" in the past.
  base::Time request_time;

  // The time at which the response headers were received.  For cached
  // responses, this time could be "far" in the past.
  base::Time response_time;

  // Expected content size, in bytes, as reported by SIZE command. Only valid
  // for file downloads. -1 means unknown size.
  int64_t expected_content_size;

  // True if the response data is of a directory listing.
  bool is_directory_listing;

  // Remote address of the socket which fetched this resource.
  IPEndPoint remote_endpoint;
};

}  // namespace net

#endif  // NET_FTP_FTP_RESPONSE_INFO_H_