Closed Bug 393727 Opened 18 years ago Closed 18 years ago

Add ability to allow a listener listen to an |UpdateFolder()| call for IMAP folders

Categories

(MailNews Core :: Backend, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nick.kreeger, Assigned: nick.kreeger)

Details

Attachments

(1 file)

Currently, it is impossible to listen to a |UpdateFolder()| call to a |nsIMsgImapMailFolder|, making it difficult for callers to time any operations that require a fresh update of an imap folder other than the inbox. My proposal would be to define a new signature for the |UpdateFolder| in the |nsIMsgImapFolder| idl file. The new signature would take an additional param, an |nsIUrlListener| in-param. This can be easily setup, as the current |UpdateFolder| function nsnull's the |m_Listener| member listener.
Attached patch Patch V1Splinter Review
Here is patch go-round number one. This just adds a new signature for |UpdateFolder()| to allow callers to listen to the progress of the folder selection. This signature will allow callers to not have to worry about passing in a thread to |nsImapService::SelectFolder()|.
Attachment #278265 - Flags: review?(bienvenu)
Attachment #278265 - Flags: review?(bienvenu) → review+
Comment on attachment 278265 [details] [diff] [review] Patch V1 Scott, could you please take a look at this once you get a chance?
Attachment #278265 - Flags: superreview?(mscott)
Comment on attachment 278265 [details] [diff] [review] Patch V1 Nick, you'll need to bump the IID in nsIMsgImapMailFolder.idl David, does it make more sense to just add a nsIUrlListener to nsIMsgFolder::updateFolder?
(In reply to comment #3) > (From update of attachment 278265 [details] [diff] [review]) > Nick, you'll need to bump the IID in nsIMsgImapMailFolder.idl > No, I will do so. > David, does it make more sense to just add a nsIUrlListener to > nsIMsgFolder::updateFolder? > The IMAP mail folder is the only one that is really useful to listen to, since it will downloaded messages to a folder if they haven't been downloaded yet. Local mail doesn't add non-downloaded messages to the folder. I should also note that |GetMessages()| only downloads for the INBOX (or every folder) in the IMAP case.
> The IMAP mail folder is the only one that is really useful to listen to, since > it will downloaded messages to a folder if they haven't been downloaded yet. > Local mail doesn't add non-downloaded messages to the folder. I should also > note that |GetMessages()| only downloads for the INBOX (or every folder) in the > IMAP case. > My first statement applies to |UpdateFolder| calls for local folders and IMAP folders.
Comment on attachment 278265 [details] [diff] [review] Patch V1 Ok, David agrees with Nick that we shouldn't change nsIMsgFolder.
Attachment #278265 - Flags: superreview?(mscott) → superreview+
Checked into trunk. Thanks for the reviews!
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: