Struct xpcom::interfaces::nsICacheInfoChannel [] [src]

#[repr(C)]
pub struct nsICacheInfoChannel { /* fields omitted */ }

interface nsICacheInfoChannel : nsISupports

Methods

impl nsICacheInfoChannel
[src]

[src]

Cast this nsICacheInfoChannel to one of its base interfaces.

impl nsICacheInfoChannel
[src]

[src]

/**
   * Get the number of times the cache entry has been opened. This attribute is
   * equivalent to nsICachingChannel.cacheToken.fetchCount.
   *
   * @throws NS_ERROR_NOT_AVAILABLE if the cache entry or the alternate data
   *         cache entry cannot be read.
   */

readonly attribute int32_t cacheTokenFetchCount;

[src]

/**
   * Get expiration time from cache token. This attribute is equivalent to
   * nsICachingChannel.cacheToken.expirationTime.
   */

readonly attribute uint32_t cacheTokenExpirationTime;

[src]

/**
   * Set/get charset of cache entry. Accessing this attribute is equivalent to
   * calling nsICachingChannel.cacheToken.getMetaDataElement("charset") and
   * nsICachingChannel.cacheToken.setMetaDataElement("charset").
   */

attribute ACString cacheTokenCachedCharset;

[src]

/**
   * Set/get charset of cache entry. Accessing this attribute is equivalent to
   * calling nsICachingChannel.cacheToken.getMetaDataElement("charset") and
   * nsICachingChannel.cacheToken.setMetaDataElement("charset").
   */

attribute ACString cacheTokenCachedCharset;

[src]

/**
   * TRUE if this channel's data is being loaded from the cache.  This value
   * is undefined before the channel fires its OnStartRequest notification
   * and after the channel fires its OnStopRequest notification.
   */

boolean isFromCache ();

[src]

/**
   * The unique ID of the corresponding nsICacheEntry from which the response is
   * retrieved. By comparing the returned value, we can judge whether the data
   * of two distinct nsICacheInfoChannels is from the same nsICacheEntry. This
   * scenario could be useful when verifying whether the alternative data from
   * one nsICacheInfochannel matches the main data from another one.
   *
   * Note: NS_ERROR_NOT_AVAILABLE is thrown when a nsICacheInfoChannel has no
   * valid corresponding nsICacheEntry.
   */

uint64_t getCacheEntryId ();

[src]

/**
   * Set/get the cache key... uniquely identifies the data in the cache
   * for this channel.  Holding a reference to this key does NOT prevent
   * the cached data from being removed.
   *
   * A cache key retrieved from a particular instance of nsICacheInfoChannel
   * could be set on another instance of nsICacheInfoChannel provided the
   * underlying implementations are compatible and provided the new
   * channel instance was created with the same URI.  The implementation of
   * nsICacheInfoChannel would be expected to use the cache entry identified
   * by the cache token.  Depending on the value of nsIRequest::loadFlags,
   * the cache entry may be validated, overwritten, or simply read.
   *
   * The cache key may be NULL indicating that the URI of the channel is
   * sufficient to locate the same cache entry.  Setting a NULL cache key
   * is likewise valid.
   */

attribute nsISupports cacheKey;

[src]

/**
   * Set/get the cache key... uniquely identifies the data in the cache
   * for this channel.  Holding a reference to this key does NOT prevent
   * the cached data from being removed.
   *
   * A cache key retrieved from a particular instance of nsICacheInfoChannel
   * could be set on another instance of nsICacheInfoChannel provided the
   * underlying implementations are compatible and provided the new
   * channel instance was created with the same URI.  The implementation of
   * nsICacheInfoChannel would be expected to use the cache entry identified
   * by the cache token.  Depending on the value of nsIRequest::loadFlags,
   * the cache entry may be validated, overwritten, or simply read.
   *
   * The cache key may be NULL indicating that the URI of the channel is
   * sufficient to locate the same cache entry.  Setting a NULL cache key
   * is likewise valid.
   */

attribute nsISupports cacheKey;

[src]

/**
   * Tells the channel to behave as if the LOAD_FROM_CACHE flag has been set,
   * but without affecting the loads for the entire loadGroup in case of this
   * channel being the default load group's channel.
   */

attribute boolean allowStaleCacheContent;

[src]

/**
   * Tells the channel to behave as if the LOAD_FROM_CACHE flag has been set,
   * but without affecting the loads for the entire loadGroup in case of this
   * channel being the default load group's channel.
   */

attribute boolean allowStaleCacheContent;

[src]

/**
   * Calling this method instructs the channel to serve the alternative data
   * if that was previously saved in the cache, otherwise it will serve the
   * real data.
   * Must be called before AsyncOpen.
   */

void preferAlternativeDataType (in ACString type);

[src]

/**
   * Get the preferred alternative data type set by preferAlternativeDataType().
   * This attribute stands for the desired data type instead of the type of the
   * information retrieved from the network stack.
   */

readonly attribute ACString preferredAlternativeDataType;

[src]

/**
   * Holds the type of the alternative data representation that the channel
   * is returning.
   * Is empty string if no alternative data representation was requested, or
   * if the requested representation wasn't found in the cache.
   * Can only be called during or after OnStartRequest.
   */

readonly attribute ACString alternativeDataType;

[src]

/**
   * Opens and returns an output stream that a consumer may use to save an
   * alternate representation of the data.
   * Must be called after the OnStopRequest that delivered the real data.
   * The consumer may choose to replace the saved alt representation.
   * Opening the output stream will fail if there are any open input streams
   * reading the already saved alt representation.
   */

nsIOutputStream openAlternativeOutputStream (in ACString type);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsICacheInfoChannel
[src]

IID: nsIID = nsID(1925399573, 50923, 18607, [133, 31, 119, 47, 169, 238, 89, 114])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsICacheInfoChannel
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsICacheInfoChannel
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.