OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_FTP_FTP_TRANSACTION_H_ | 5 #ifndef NET_FTP_FTP_TRANSACTION_H_ |
6 #define NET_FTP_FTP_TRANSACTION_H_ | 6 #define NET_FTP_FTP_TRANSACTION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
11 #include "net/base/io_buffer.h" | 11 #include "net/base/io_buffer.h" |
12 #include "net/base/load_states.h" | 12 #include "net/base/load_states.h" |
13 #include "net/base/net_api.h" | 13 #include "net/base/net_export.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class FtpResponseInfo; | 17 class FtpResponseInfo; |
18 class FtpRequestInfo; | 18 class FtpRequestInfo; |
19 class BoundNetLog; | 19 class BoundNetLog; |
20 | 20 |
21 // Represents a single FTP transaction. | 21 // Represents a single FTP transaction. |
22 class NET_TEST FtpTransaction { | 22 class NET_EXPORT_PRIVATE FtpTransaction { |
23 public: | 23 public: |
24 // Stops any pending IO and destroys the transaction object. | 24 // Stops any pending IO and destroys the transaction object. |
25 virtual ~FtpTransaction() {} | 25 virtual ~FtpTransaction() {} |
26 | 26 |
27 // Starts the FTP transaction (i.e., sends the FTP request). | 27 // Starts the FTP transaction (i.e., sends the FTP request). |
28 // | 28 // |
29 // Returns OK if the transaction could be started synchronously, which means | 29 // Returns OK if the transaction could be started synchronously, which means |
30 // that the request was served from the cache (only supported for directory | 30 // that the request was served from the cache (only supported for directory |
31 // listings). ERR_IO_PENDING is returned to indicate that the | 31 // listings). ERR_IO_PENDING is returned to indicate that the |
32 // CompletionCallback will be notified once response info is available or if | 32 // CompletionCallback will be notified once response info is available or if |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 virtual LoadState GetLoadState() const = 0; | 73 virtual LoadState GetLoadState() const = 0; |
74 | 74 |
75 // Returns the upload progress in bytes. If there is no upload data, | 75 // Returns the upload progress in bytes. If there is no upload data, |
76 // zero will be returned. | 76 // zero will be returned. |
77 virtual uint64 GetUploadProgress() const = 0; | 77 virtual uint64 GetUploadProgress() const = 0; |
78 }; | 78 }; |
79 | 79 |
80 } // namespace net | 80 } // namespace net |
81 | 81 |
82 #endif // NET_FTP_FTP_TRANSACTION_H_ | 82 #endif // NET_FTP_FTP_TRANSACTION_H_ |
OLD | NEW |