From: Stig T. <jw...@us...> - 2005-03-20 17:43:42
|
Update of /cvsroot/mailsomething/mailsomething/src/net/sf/mailsomething/mail/parsers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24294/net/sf/mailsomething/mail/parsers Modified Files: ImapSession.java ImapController.java Log Message: Index: ImapController.java =================================================================== RCS file: /cvsroot/mailsomething/mailsomething/src/net/sf/mailsomething/mail/parsers/ImapController.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ImapController.java 20 Mar 2005 15:09:07 -0000 1.3 --- ImapController.java 20 Mar 2005 17:43:22 -0000 1.4 *************** *** 1626,1630 **** listCommand = mailboxPath; ! System.out.println("selectcommand" + listCommand); return listCommand; --- 1626,1630 ---- listCommand = mailboxPath; ! //System.out.println("selectcommand" + listCommand); return listCommand; Index: ImapSession.java =================================================================== RCS file: /cvsroot/mailsomething/mailsomething/src/net/sf/mailsomething/mail/parsers/ImapSession.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImapSession.java 3 Apr 2004 07:56:49 -0000 1.1 --- ImapSession.java 20 Mar 2005 17:43:22 -0000 1.2 *************** *** 3,6 **** --- 3,8 ---- import net.sf.mailsomething.util.*; import net.sf.mailsomething.mail.*; + import net.sf.mailsomething.mail.imap.ImapCommand; + import net.sf.mailsomething.mail.imap.ImapResponse; import java.io.*; *************** *** 117,120 **** --- 119,160 ---- } + + + protected synchronized ImapResponse doCommand(ImapCommand iCommand) throws IOException { + + Vector buffer = new Vector(); + + iCommand.setTag(getNextTag()); + + String command = iCommand.generateCommand(); + + notifyTo(command); + + writeLine(command); + + String line; + //String response; + + while ((line = reader.readLine()) != null) { + + buffer.add(line); + + notifyFrom(line); + + if (line.indexOf(tag) != -1) { + //response = line; + break; + } + + } + + ImapResponse response = iCommand.getResponseInstance(); + + response.buildResponse((String[])buffer.toArray(new String[]{})); + + return response; + } + + /** * Sets the mailbox attribute of the ImapSession object |