netwerk/base/public/nsIApplicationCacheChannel.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIApplicationCacheChannel.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,57 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#include "nsIApplicationCacheContainer.idl"
    1.11 +
    1.12 +/**
    1.13 + * Interface implemented by channels that support application caches.
    1.14 + */
    1.15 +[scriptable, uuid(6FA816B1-6D5F-4380-9704-054D0908CFA3)]
    1.16 +interface nsIApplicationCacheChannel : nsIApplicationCacheContainer
    1.17 +{
    1.18 +    /**
    1.19 +     * TRUE when the resource came from the application cache. This
    1.20 +     * might be false even there is assigned an application cache
    1.21 +     * e.g. in case of fallback of load of an entry matching bypass
    1.22 +     * namespace.
    1.23 +     */
    1.24 +    readonly attribute boolean loadedFromApplicationCache;
    1.25 +
    1.26 +    /**
    1.27 +     * When true, the channel will ask its notification callbacks for
    1.28 +     * an application cache if one is not explicitly provided.  Default
    1.29 +     * value is true.
    1.30 +     *
    1.31 +     * NS_ERROR_ALREADY_OPENED will be thrown if set after AsyncOpen()
    1.32 +     * is called.
    1.33 +     */
    1.34 +    attribute boolean inheritApplicationCache;
    1.35 +
    1.36 +    /**
    1.37 +     * When true, the channel will choose an application cache if one
    1.38 +     * was not explicitly provided and none is available from the
    1.39 +     * notification callbacks.  Default value is false.
    1.40 +     *
    1.41 +     * This attribute will not be transferred through a redirect.
    1.42 +     *
    1.43 +     * NS_ERROR_ALREADY_OPENED will be thrown if set after AsyncOpen()
    1.44 +     * is called.
    1.45 +     */
    1.46 +    attribute boolean chooseApplicationCache;
    1.47 +
    1.48 +    /**
    1.49 +     * A shortcut method to mark the cache item of this channel as 'foreign'.
    1.50 +     * See the 'cache selection algorithm' and CACHE_SELECTION_RELOAD
    1.51 +     * action handling in nsContentSink.
    1.52 +     */
    1.53 +    void markOfflineCacheEntryAsForeign();
    1.54 +
    1.55 +    /**
    1.56 +     * Set offline application cache object to instruct the channel
    1.57 +     * to cache for offline use using this application cache.
    1.58 +     */
    1.59 +    attribute nsIApplicationCache applicationCacheForWrite;
    1.60 +};

mercurial