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