1: <?php
2:
3: /*
4: * This file is part of SwiftMailer.
5: * (c) 2004-2009 Chris Corbyn
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: /**
12: * Wraps an IoBuffer to send/receive SMTP commands/responses.
13: * @package Swift
14: * @subpackage Transport
15: * @author Chris Corbyn
16: */
17: interface Swift_Transport_SmtpAgent
18: {
19: /**
20: * Get the IoBuffer where read/writes are occurring.
21: * @return Swift_Transport_IoBuffer
22: */
23: public function getBuffer();
24:
25: /**
26: * Run a command against the buffer, expecting the given response codes.
27: * If no response codes are given, the response will not be validated.
28: * If codes are given, an exception will be thrown on an invalid response.
29: * @param string $command
30: * @param int[] $codes
31: * @param string[] &$failures
32: */
33: public function executeCommand($command, $codes = array(), &$failures = null);
34: }
35: