13345a6884c488ff3a535c2c9acdd33d74b37e311Iain Merrick// Copyright (c) 2010 The Chromium Authors. All rights reserved. 23345a6884c488ff3a535c2c9acdd33d74b37e311Iain Merrick// Use of this source code is governed by a BSD-style license that can be 33345a6884c488ff3a535c2c9acdd33d74b37e311Iain Merrick// found in the LICENSE file. 4c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 5c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#ifndef NET_FTP_FTP_TRANSACTION_FACTORY_H_ 6c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#define NET_FTP_FTP_TRANSACTION_FACTORY_H_ 73345a6884c488ff3a535c2c9acdd33d74b37e311Iain Merrick#pragma once 8c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 9c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottnamespace net { 10c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 11c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottclass FtpTransaction; 12c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 13c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott// An interface to a class that can create FtpTransaction objects. 14c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scottclass FtpTransactionFactory { 15c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott public: 16c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott virtual ~FtpTransactionFactory() {} 17c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 18c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott // Creates a FtpTransaction object. 19c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott virtual FtpTransaction* CreateTransaction() = 0; 20c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 21c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott // Suspends the creation of new transactions. If |suspend| is false, creation 22c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott // of new transactions is resumed. 23c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott virtual void Suspend(bool suspend) = 0; 24c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott}; 25c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 26c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott} // namespace net 27c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott 28c7f5f8508d98d5952d42ed7648c2a8f30a4da156Patrick Scott#endif // NET_FTP_FTP_TRANSACTION_FACTORY_H_ 29