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_DIRECTORY_LISTING_PARSER_MLSD_H_ | 5 #ifndef NET_FTP_FTP_DIRECTORY_LISTING_PARSER_MLSD_H_ |
6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_MLSD_H_ | 6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_MLSD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <queue> | 9 #include <queue> |
10 | 10 |
11 #include "net/ftp/ftp_directory_listing_parser.h" | 11 #include "net/ftp/ftp_directory_listing_parser.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // Parser for MLSD directory listing (RFC-3659). For more info see | 15 // Parser for MLSD directory listing (RFC-3659). For more info see |
16 // http://tools.ietf.org/html/rfc3659#page-23. | 16 // http://tools.ietf.org/html/rfc3659#page-23. |
17 class FtpDirectoryListingParserMlsd : public FtpDirectoryListingParser { | 17 class FtpDirectoryListingParserMlsd : public FtpDirectoryListingParser { |
18 public: | 18 public: |
19 FtpDirectoryListingParserMlsd(); | 19 FtpDirectoryListingParserMlsd(); |
20 virtual ~FtpDirectoryListingParserMlsd(); | 20 virtual ~FtpDirectoryListingParserMlsd(); |
21 | 21 |
22 // FtpDirectoryListingParser methods: | 22 // FtpDirectoryListingParser methods: |
23 virtual FtpServerType GetServerType() const { return SERVER_MLSD; } | 23 virtual FtpServerType GetServerType() const; |
24 virtual bool ConsumeLine(const string16& line); | 24 virtual bool ConsumeLine(const string16& line); |
25 virtual bool OnEndOfInput(); | 25 virtual bool OnEndOfInput(); |
26 virtual bool EntryAvailable() const; | 26 virtual bool EntryAvailable() const; |
27 virtual FtpDirectoryListingEntry PopEntry(); | 27 virtual FtpDirectoryListingEntry PopEntry(); |
28 | 28 |
29 private: | 29 private: |
30 std::queue<FtpDirectoryListingEntry> entries_; | 30 std::queue<FtpDirectoryListingEntry> entries_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserMlsd); | 32 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserMlsd); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace net | 35 } // namespace net |
36 | 36 |
37 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_MLSD_H_ | 37 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_MLSD_H_ |
OLD | NEW |