Changeset 1383
- Timestamp:
- 01/24/07 19:26:18 (2 years ago)
- Files:
-
- trunk/patches/proposals/Pop3Client.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/patches/proposals/Pop3Client.d
r1382 r1383 1 module tango.net.pop3.Pop3 ;1 module tango.net.pop3.Pop3Client; 2 2 3 3 private import tango.net.ftp.Telnet; 4 4 private import tango.net.pop3.Exception; 5 5 private import tango.text.convert.Integer; 6 private import tango.text.Util; 7 6 8 debug ( Pop3Debug ) { private import tango.io.Stdout; } 7 9 … … 80 82 81 83 /// Delete a message on the server 82 POP3Response del (int messageNumber )84 POP3Response dele(int messageNumber ) 83 85 { 84 86 POP3Response r; … … 127 129 } 128 130 129 // Lists all messages on server and total size130 POP3Response stat(inout uint totalMessages, inout totalSize)131 /// Lists all messages on server and total size 132 POP3Response stat(inout uint totalMessages, inout uint totalSize) 131 133 { 132 134 POP3Response r; 133 135 r.resp = shortCmd("STAT"); 136 char [] [] totalAndSize = delimit(r.resp," " ); 137 138 assert(totalAndSize.length == 3 ); 139 140 totalMessages = Integer.parse(totalAndSize[1] ); 141 totalSize = Integer.parse(totalAndSize[2] ); 142 143 return r; 144 } 145 146 /// Unmark all messages for deletion 147 POP3Response rset() 148 { 149 POP3Response r; 150 r.resp = shortCmd("RSET"); 151 return r; 152 153 } 154 155 156 /// NOOP for keepalive 157 POP3Response noop() 158 { 159 POP3Response r; 160 r.resp = shortCmd("NOOP"); 161 return r; 134 162 135 163 }












