Download resuming

Revision as of 09:00, 24 February 2006 by Steffen (talk | contribs) (Bug 298842 is fixed.)

Download resuming

My general idea is that frontend code, upon pressing pause, calls Suspend() on the channel, and if that fails, calls Cancel() (in a way that does not delete the file).

In all cases it saves the entity id from nsIResumableChannel.

On resume, if it has a channel (browser not exited in the meantime + the suspend call succeeded), it calls Resume(). if that fails, it creates a new channel, sets the entity id using nsIResumableChannel, and opens the channel, saving the stream to the file.

Issues:

  • Should that stuff live more in core?
  • What about cancel-deleting-the-file vs cancel-not-deleting-it?
  • Should the temp file be an init arg to nsITransfer?

--Biesi 15:23, 26 Jun 2005 (PDT)