Closed Bug 209545 Opened 21 years ago Closed 20 years ago

use XPIDL for nsImapMiscellaneousSink and nsImapExtensionSink

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Bienvenu, Assigned: Bienvenu)

References

Details

Attachments

(4 files)

nsImapMiscellaneousSink and nsImapExtensionSink use a hand-rolled proxy
mechanism. We should get rid of this mechanism and just use xpidl.
this patch just gets rid of an unused method.
these structs where used by some of the hand-rolled stuff that has been
replaced by idl.
This requires that all the methods be scriptable, and that all methods be
synchronous or asynchronous. To make them all scriptable, we'd need to make the
following changes:

nsIImapExtensionSink::ClearFolderRights(nsIImapProtocol* aProtocol,
                               nsIMAPACLRightsInfo* aclRights);

change the nsIMAPACLRightsInfo struct into its four member strings.

nsIImapExtensionSink::SetCopyResponseUid(nsIImapProtocol* aProtocol,
                                nsMsgKeyArray* keyArray, 
                                const char *msgIdString,
                                nsIImapUrl * aUrl);

instead of nsMsgKeyArray, pass in a pointer to the key array, and the number of
keys.

nsIImapExtensionSink::GetMessageId(nsIImapProtocol* aProtocol,
                          nsCString* messageId,
                          nsIImapUrl * aUrl)

return messageId as a result.

nsIImapMiscellaneousSink::PercentProgress(nsIImapProtocol* aProtocol,
ProgressInfo* aInfo);

change the ProgressInfo into its 3 members.

I think the miscellaneous sink is/can be completely async. The extension sink
can't be. I think we should get rid of the extension sink, and make a second
folder sink for async folder methods.
Product: MailNews → Core
Attached patch proposed fixSplinter Review
Gets rid of the last uses of nsImapProxyEvent. To do this, I had to get rid of
a superfluous nsMsgKeyArray that we were passing around for imap undo, but
didn't need. I also coalesced several of the quota folder sink methods into 1,
to cut down on unneeded stuff.

This is all in preparation for adding some imap timeout code - that will
involve adding some idl methods, and I wanted to get rid of some deadwood
first, in the spirit of Brendan's plea for cutting down code size :-)
Attachment #170939 - Flags: superreview?(mscott)
Comment on attachment 170939 [details] [diff] [review]
proposed fix

1) bump the IID on nsIImapMailFolderSink
Attachment #170939 - Flags: superreview?(mscott) → superreview+
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attached patch follow on fixSplinter Review
get rid of more unused stuff, and remove bogus call to
WaitForEventCompletion...
Attachment #171047 - Flags: superreview?(sspitzer)
Attachment #171047 - Flags: superreview?(sspitzer) → superreview+
Ben, you might be interested in attachment 170939 [details] [diff] [review]...
> I also coalesced several of the quota folder sink methods into 1,
> to cut down on unneeded stuff.

Arg. bienvenu, the quota attribtues are all but unneeded, I need them for bug
278096. *sigh*
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Blocks: 278096
you shouldn't be using the imap mail folder sink interface - it's for doing
cross thread xpcom proxying between the imap threads and the ui thread. You want
to add a method to nsIImapMailFolder to get all the quota info in one fell
swoop. Re-resolving as fixed.
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
Did that, see the other bug (soon).
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: