Class ImapUrlFetcher.

This class takes a list of ImapUrls and retrieves the corresponding text from the database, subject to validation and access control. It is the basis for our CATENATE/URLFETCH/BURL support.

For each submitted URL, this class does the following:

1. Verify that the ImapUrl::user() is valid. 2. Verify that the ImapUrl::mailboxName() refers to an existing mailbox in the relevant user's namespace; and, if the URL has a UIDVALIDITY, check that it's the same as that of the mailbox. 3. Verify that the user has read access to that mailbox. 4. Fetch the access key for that (user,mailbox). 5. Verify that the URLAUTH token matches the URL. (We assume that the caller has checked ImapUrl::access() already.) 6. Verify that the URL has not EXPIREd. 7. Fetch and set the text corresponding to the URL. 8. Notify the caller of completion.

bool ImapUrlFetcher::done() const

Returns a message describing why this object failed(), or an empty string if it's still working, or completed successfully.

bool ImapUrlFetcher::failed() const

Returns true only if this object encountered an error in trying to retrieve the text for the ImapUrls it was given, and false if the attempt is still in progress, or completed successfully. If this function returns true, badUrl() and error() describe the problem.