private Article article(Query q, boolean head, boolean body) {
Mailbox.Iterator it = current.iterator(q);
if (!it.next()) return null;
- Message m = body ? it.cur() : it.head();
+ //Message m = body ? it.cur() : it.head();
+ Message m = it.cur(); // FIXME
return new Article(m.messageid, it.num(), m);
}
public Group[] list() { return list(root, ""); }
for(Mailbox.Iterator it = iterator(q);it.next();) { dest.add(it.cur()); it.delete(); }
}
public static abstract class Iterator implements Mailbox.Iterator {
+ public boolean seen() { return false; }
+ public boolean deleted() { return false; }
+ public boolean flagged() { return false; }
+ public boolean draft() { return false; }
+ public boolean answered() { return false; }
+ public boolean recent() { return false; }
+ public void seen(boolean on) { }
+ public void deleted(boolean on) { }
+ public void flagged(boolean on) { }
+ public void draft(boolean on) { }
+ public void answered(boolean on) { }
+ public void recent(boolean on) { }
+ public void set(String key, String val) { throw new MailException("not supported"); }
+ public String get(String key) { throw new MailException("not supported"); }
public int flags() {
return
(deleted() ? Flag.DELETED : 0) |
public static interface Iterator {
public abstract Message cur();
- public abstract Message head();
+ public abstract MIME.Headers head();
public abstract boolean next();
public abstract int uid();
public abstract int num();
private Iterator it;
public Wrapper(Iterator it) { this.it = it; }
public Message cur() { return it.cur(); }
- public Message head() { return it.head(); }
+ public MIME.Headers head() { return it.head(); }
public boolean next() { return it.next(); }
public int uid() { return it.uid(); }
public int flags() { return it.flags(); }
public static class NullIterator extends Mailbox.Default.Iterator {
public NullIterator() { }
public Message cur() { return null; }
- public Message head() { return null; }
+ public MIME.Headers head() { return null; }
public boolean next() { return false; }
public int uid() { return 0; }
public int flags() { return 0; }