OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_NETWORK_TRANSACTION_H_ | 5 #ifndef NET_FTP_FTP_NETWORK_TRANSACTION_H_ |
6 #define NET_FTP_FTP_NETWORK_TRANSACTION_H_ | 6 #define NET_FTP_FTP_NETWORK_TRANSACTION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 COMMAND_USER, | 51 COMMAND_USER, |
52 COMMAND_PASS, | 52 COMMAND_PASS, |
53 COMMAND_SYST, | 53 COMMAND_SYST, |
54 COMMAND_TYPE, | 54 COMMAND_TYPE, |
55 COMMAND_EPSV, | 55 COMMAND_EPSV, |
56 COMMAND_PASV, | 56 COMMAND_PASV, |
57 COMMAND_PWD, | 57 COMMAND_PWD, |
58 COMMAND_SIZE, | 58 COMMAND_SIZE, |
59 COMMAND_RETR, | 59 COMMAND_RETR, |
60 COMMAND_CWD, | 60 COMMAND_CWD, |
61 COMMAND_MLSD, | |
62 COMMAND_LIST, | 61 COMMAND_LIST, |
63 COMMAND_QUIT, | 62 COMMAND_QUIT, |
64 }; | 63 }; |
65 | 64 |
66 // Major categories of remote system types, as returned by SYST command. | 65 // Major categories of remote system types, as returned by SYST command. |
67 enum SystemType { | 66 enum SystemType { |
68 SYSTEM_TYPE_UNKNOWN, | 67 SYSTEM_TYPE_UNKNOWN, |
69 SYSTEM_TYPE_UNIX, | 68 SYSTEM_TYPE_UNIX, |
70 SYSTEM_TYPE_WINDOWS, | 69 SYSTEM_TYPE_WINDOWS, |
71 SYSTEM_TYPE_OS2, | 70 SYSTEM_TYPE_OS2, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 int DoCtrlWriteEPSV(); | 134 int DoCtrlWriteEPSV(); |
136 int ProcessResponseEPSV(const FtpCtrlResponse& response); | 135 int ProcessResponseEPSV(const FtpCtrlResponse& response); |
137 int DoCtrlWritePASV(); | 136 int DoCtrlWritePASV(); |
138 int ProcessResponsePASV(const FtpCtrlResponse& response); | 137 int ProcessResponsePASV(const FtpCtrlResponse& response); |
139 int DoCtrlWriteRETR(); | 138 int DoCtrlWriteRETR(); |
140 int ProcessResponseRETR(const FtpCtrlResponse& response); | 139 int ProcessResponseRETR(const FtpCtrlResponse& response); |
141 int DoCtrlWriteSIZE(); | 140 int DoCtrlWriteSIZE(); |
142 int ProcessResponseSIZE(const FtpCtrlResponse& response); | 141 int ProcessResponseSIZE(const FtpCtrlResponse& response); |
143 int DoCtrlWriteCWD(); | 142 int DoCtrlWriteCWD(); |
144 int ProcessResponseCWD(const FtpCtrlResponse& response); | 143 int ProcessResponseCWD(const FtpCtrlResponse& response); |
145 int DoCtrlWriteMLSD(); | |
146 int ProcessResponseMLSD(const FtpCtrlResponse& response); | |
147 int DoCtrlWriteLIST(); | 144 int DoCtrlWriteLIST(); |
148 int ProcessResponseLIST(const FtpCtrlResponse& response); | 145 int ProcessResponseLIST(const FtpCtrlResponse& response); |
149 int DoCtrlWriteQUIT(); | 146 int DoCtrlWriteQUIT(); |
150 int ProcessResponseQUIT(const FtpCtrlResponse& response); | 147 int ProcessResponseQUIT(const FtpCtrlResponse& response); |
151 | 148 |
152 int DoDataConnect(); | 149 int DoDataConnect(); |
153 int DoDataConnectComplete(int result); | 150 int DoDataConnectComplete(int result); |
154 int DoDataRead(); | 151 int DoDataRead(); |
155 int DoDataReadComplete(int result); | 152 int DoDataReadComplete(int result); |
156 | 153 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 STATE_CTRL_WRITE_USER, | 224 STATE_CTRL_WRITE_USER, |
228 STATE_CTRL_WRITE_PASS, | 225 STATE_CTRL_WRITE_PASS, |
229 STATE_CTRL_WRITE_SYST, | 226 STATE_CTRL_WRITE_SYST, |
230 STATE_CTRL_WRITE_TYPE, | 227 STATE_CTRL_WRITE_TYPE, |
231 STATE_CTRL_WRITE_EPSV, | 228 STATE_CTRL_WRITE_EPSV, |
232 STATE_CTRL_WRITE_PASV, | 229 STATE_CTRL_WRITE_PASV, |
233 STATE_CTRL_WRITE_PWD, | 230 STATE_CTRL_WRITE_PWD, |
234 STATE_CTRL_WRITE_RETR, | 231 STATE_CTRL_WRITE_RETR, |
235 STATE_CTRL_WRITE_SIZE, | 232 STATE_CTRL_WRITE_SIZE, |
236 STATE_CTRL_WRITE_CWD, | 233 STATE_CTRL_WRITE_CWD, |
237 STATE_CTRL_WRITE_MLSD, | |
238 STATE_CTRL_WRITE_LIST, | 234 STATE_CTRL_WRITE_LIST, |
239 STATE_CTRL_WRITE_QUIT, | 235 STATE_CTRL_WRITE_QUIT, |
240 // Data connection states: | 236 // Data connection states: |
241 STATE_DATA_CONNECT, | 237 STATE_DATA_CONNECT, |
242 STATE_DATA_CONNECT_COMPLETE, | 238 STATE_DATA_CONNECT_COMPLETE, |
243 STATE_DATA_READ, | 239 STATE_DATA_READ, |
244 STATE_DATA_READ_COMPLETE, | 240 STATE_DATA_READ_COMPLETE, |
245 STATE_NONE | 241 STATE_NONE |
246 }; | 242 }; |
247 State next_state_; | 243 State next_state_; |
248 }; | 244 }; |
249 | 245 |
250 } // namespace net | 246 } // namespace net |
251 | 247 |
252 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_ | 248 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_ |
OLD | NEW |