HIROSHIMA Naoki
Sat, 31 May 2003 06:30:28 -0700
Mailbox* foo = depot.get("INBOX/foo");
That line asks the depot to get a Mailbox * object that matches the type of INBOX/foo. What you would usually get is either a 0-object or a Maildir * object.
Mailbox* bar = depot.get("INBOX/bar"); bar->imapSelect(depot.mailboxToFilename("INBOX/bar")); Mailbox::iterator e2 = bar->end(); for (Mailbox::iterator i2 = bar->begin(); i2 != e2;++i2) { Message & message = *i2; logger << "INBOX/bar: " << message.getID() << endl; } }
That code is supposed to work ;-) although it's quite inefficient but I guess you know that. I'll take a look and see if I can make it work.
if you copy or move a read message to other folder, it will appear as unread.
Yes, that is a problem today. The easiest approach I can think of is that the COPY operator stores the flags on the messages as they are written to new/ in the Maildir. I have no idea wether this is allowed or not in Maildir, but if there is no direct indication of this _not_ being allowed I think we should post to [EMAIL PROTECTED] and see what the gurus say about it.
PS: The COPY, FETCH and APPEND operators suffer today from the incomplete Mailbox/Message design. Hacks to make the flags stuff work are fine, but
the code is likely to change. :-)
i see... how soon are you going to refactor those things? guess i should go easy for a while to see what will happen.