Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsIApplicationCacheContainer.idl" |
michael@0 | 8 | |
michael@0 | 9 | /** |
michael@0 | 10 | * Interface implemented by channels that support application caches. |
michael@0 | 11 | */ |
michael@0 | 12 | [scriptable, uuid(6FA816B1-6D5F-4380-9704-054D0908CFA3)] |
michael@0 | 13 | interface nsIApplicationCacheChannel : nsIApplicationCacheContainer |
michael@0 | 14 | { |
michael@0 | 15 | /** |
michael@0 | 16 | * TRUE when the resource came from the application cache. This |
michael@0 | 17 | * might be false even there is assigned an application cache |
michael@0 | 18 | * e.g. in case of fallback of load of an entry matching bypass |
michael@0 | 19 | * namespace. |
michael@0 | 20 | */ |
michael@0 | 21 | readonly attribute boolean loadedFromApplicationCache; |
michael@0 | 22 | |
michael@0 | 23 | /** |
michael@0 | 24 | * When true, the channel will ask its notification callbacks for |
michael@0 | 25 | * an application cache if one is not explicitly provided. Default |
michael@0 | 26 | * value is true. |
michael@0 | 27 | * |
michael@0 | 28 | * NS_ERROR_ALREADY_OPENED will be thrown if set after AsyncOpen() |
michael@0 | 29 | * is called. |
michael@0 | 30 | */ |
michael@0 | 31 | attribute boolean inheritApplicationCache; |
michael@0 | 32 | |
michael@0 | 33 | /** |
michael@0 | 34 | * When true, the channel will choose an application cache if one |
michael@0 | 35 | * was not explicitly provided and none is available from the |
michael@0 | 36 | * notification callbacks. Default value is false. |
michael@0 | 37 | * |
michael@0 | 38 | * This attribute will not be transferred through a redirect. |
michael@0 | 39 | * |
michael@0 | 40 | * NS_ERROR_ALREADY_OPENED will be thrown if set after AsyncOpen() |
michael@0 | 41 | * is called. |
michael@0 | 42 | */ |
michael@0 | 43 | attribute boolean chooseApplicationCache; |
michael@0 | 44 | |
michael@0 | 45 | /** |
michael@0 | 46 | * A shortcut method to mark the cache item of this channel as 'foreign'. |
michael@0 | 47 | * See the 'cache selection algorithm' and CACHE_SELECTION_RELOAD |
michael@0 | 48 | * action handling in nsContentSink. |
michael@0 | 49 | */ |
michael@0 | 50 | void markOfflineCacheEntryAsForeign(); |
michael@0 | 51 | |
michael@0 | 52 | /** |
michael@0 | 53 | * Set offline application cache object to instruct the channel |
michael@0 | 54 | * to cache for offline use using this application cache. |
michael@0 | 55 | */ |
michael@0 | 56 | attribute nsIApplicationCache applicationCacheForWrite; |
michael@0 | 57 | }; |