Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIStreamListener; |
michael@0 | 9 | |
michael@0 | 10 | [scriptable, uuid(4ad136fa-83af-4a22-a76e-503642c0f4a8)] |
michael@0 | 11 | interface nsIResumableChannel : nsISupports { |
michael@0 | 12 | /** |
michael@0 | 13 | * Prepare this channel for resuming. The request will not start until |
michael@0 | 14 | * asyncOpen or open is called. Calling resumeAt after open or asyncOpen |
michael@0 | 15 | * has been called has undefined behaviour. |
michael@0 | 16 | * |
michael@0 | 17 | * @param startPos the starting offset, in bytes, to use to download |
michael@0 | 18 | * @param entityID information about the file, to match before obtaining |
michael@0 | 19 | * the file. Pass an empty string to use anything. |
michael@0 | 20 | * |
michael@0 | 21 | * During OnStartRequest, this channel will have a status of |
michael@0 | 22 | * NS_ERROR_NOT_RESUMABLE if the file cannot be resumed, eg because the |
michael@0 | 23 | * server doesn't support this. This error may occur even if startPos |
michael@0 | 24 | * is 0, so that the front end can warn the user. |
michael@0 | 25 | * Similarly, the status of this channel during OnStartRequest may be |
michael@0 | 26 | * NS_ERROR_ENTITY_CHANGED, which indicates that the entity has changed, |
michael@0 | 27 | * as indicated by a changed entityID. |
michael@0 | 28 | * In both of these cases, no OnDataAvailable will be called, and |
michael@0 | 29 | * OnStopRequest will immediately follow with the same status code. |
michael@0 | 30 | */ |
michael@0 | 31 | void resumeAt(in unsigned long long startPos, |
michael@0 | 32 | in ACString entityID); |
michael@0 | 33 | |
michael@0 | 34 | /** |
michael@0 | 35 | * The entity id for this URI. Available after OnStartRequest. |
michael@0 | 36 | * @throw NS_ERROR_NOT_RESUMABLE if this load is not resumable. |
michael@0 | 37 | */ |
michael@0 | 38 | readonly attribute ACString entityID; |
michael@0 | 39 | }; |