User:Brahmana/Design Proposal 1

From MozillaWiki
< User:Brahmana
Revision as of 21:41, 25 April 2007 by Brahmana (talk | contribs) (design proposal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The current DM provides the [Pause], [Resume] and [Cancel] links and they are sufficient. The only addition that I would like to make is a small image will tell whether there is server side support for download resume.

Whenever a download begins an entry is made in the downloads.rdf file with its entity ID and other related details as to where it is being saved and so on. Each entry will also contain two flags:

1) One stating whether the download is still alive or dead.

A download is alive if it is active or it is paused. If it is completed or canceled then it is dead. It is true by default.

2) Another stating whether this download has to be auto-restored in the next session (if it is still alive), provided that the user chooses to restore the previous session or restore the downloads, as the case may be. This same flag can be suitably used to state whether there is server side support for resume.


     Flag Meaning	       Value
     
     Auto-Restore	         1
     Manual Restore	         0
     No server side support    -1

This flag is by default set to 1 when the download begins if there is server side support else it is set to -1.

When the user pauses a download the auto-restore flag is set to 0.


There can be two ways in which a session can end.

1) The user ends it manually by closing all the browser windows.

There can be two types of downloads going on at this time. The ones that are active and the ones that were manually paused by the user.

If there were any active downloads going on then the user is alerted about it and asked to take necessary action. In the current DM provides the user with options to cancel those downloads or cancel the session termination. Here I plan to provide another option stating "Pause and Save download for resume later". If the user choses this option then download is paused with the auto-restore flag remaining 1 itself.

The next time the browser is restarted, then the user is alerted about the downloads that were stored when the previous session ended(may be popping a dialog with a simple list of the auto-restore downloads) and he may choose to continue or cancel them.

The paused downloads remain paused until they are restarted by the user. We can have a toolbarbutton which will be animated to intimate the user about such downloads which are yet to be completed. With this button being clicked the DM window is shown and the user can take necessary action.

2) The browser quits unconditionally (may be because of power failure or the process is killed or a similar reason)

Here again we will have the same two types of downloads, the active ones and the paused ones. The active ones will be having their auto-restore flag set to 1 or -1.

When the browser is restarted the user is asked whether to restore the session or start a new session. If the user chooses to restore the previous session, all the live downloads with auto-restore flag set to 1 will be automatically restored without any extra action from the user.

The action is same as said before for the manually paused downloads.


Using Preferences:

We can also decide upon the actions and the corresponding values to be set to the flags or the way they are to be interpreted from a few user preferences. I have not yet studied about the ways and restrictions to add new preferences and also how to use them. I will add more things about this ASAP.