[email protected] | 0da3fea3 | 2008-12-17 23:08:24 | [diff] [blame^] | 1 | // Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this |
| 2 | // source code is governed by a BSD-style license that can be found in the |
| 3 | // LICENSE file. |
| 4 | |
| 5 | #ifndef NET_FTP_FTP_TRANSACTION_FACTORY_H_ |
| 6 | #define NET_FTP_FTP_TRANSACTION_FACTORY_H_ |
| 7 | |
| 8 | namespace net { |
| 9 | |
| 10 | class AuthCache; |
| 11 | class FtpTransaction; |
| 12 | |
| 13 | // An interface to a class that can create FtpTransaction objects. |
| 14 | class FtpTransactionFactory { |
| 15 | public: |
| 16 | virtual ~FtpTransactionFactory() {} |
| 17 | |
| 18 | // Creates a FtpTransaction object. |
| 19 | virtual FtpTransaction* CreateTransaction() = 0; |
| 20 | |
| 21 | // Returns the associated FTP auth cache if any (may be NULL). |
| 22 | virtual AuthCache* GetAuthCache() = 0; |
| 23 | |
| 24 | // Suspends the creation of new transactions. If |suspend| is false, creation |
| 25 | // of new transactions is resumed. |
| 26 | virtual void Suspend(bool suspend) = 0; |
| 27 | }; |
| 28 | |
| 29 | } // namespace net |
| 30 | |
| 31 | #endif // NET_FTP_FTP_TRANSACTION_FACTORY_H_ |