Struct xpcom::interfaces::nsIRaceCacheWithNetwork [] [src]

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

interface nsIRaceCacheWithNetwork : nsISupports

/**
 * This holds methods used to race the cache with the network for a specific
 * channel. This interface is was designed with nsHttpChannel in mind, and it's
 * expected this will be the only class implementing it.
 */

Methods

impl nsIRaceCacheWithNetwork
[src]

[src]

Cast this nsIRaceCacheWithNetwork to one of its base interfaces.

impl nsIRaceCacheWithNetwork
[src]

[src]

/****************************************************************************
   * TEST ONLY: The following methods are for testing purposes only. Do not use
   * them to do anything important in your code.
   ****************************************************************************

  /**
   * Triggers network activity after given timeout. If timeout is 0, network
   * activity is triggered immediately. If the cache.asyncOpenURI callbacks
   * have already been called, the network activity may have already been triggered
   * or the content may have already been delivered from the cache, so this
   * operation will have no effect.
   *
   * @param timeout
   *        - the delay in milliseconds until the network will be triggered.
   */

void test_triggerNetwork (in long timeout);

[src]

/**
   * Normally a HTTP channel would immediately call AsyncOpenURI leading to the
   * cache storage to lookup the cache entry and return it. In order to
   * simmulate real life conditions where fetching a cache entry takes a long
   * time, we set a timer to delay the operation.
   * Can only be called on the main thread.
   *
   * @param timeout
   *        - the delay in milliseconds until the cache open will be triggered.
   */

void test_delayCacheEntryOpeningBy (in long timeout);

[src]

/**
   * Immediatelly triggers AsyncOpenURI if the timer hasn't fired.
   * Can only be called on the main thread.
   * This is only called in tests to reliably trigger the opening of the cache
   * entry.
   * @throws NS_ERROR_NOT_AVAILABLE if opening the cache wasn't delayed.
   */

void test_triggerDelayedOpenCacheEntry ();

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 nsIRaceCacheWithNetwork
[src]

IID: nsIID = nsID(1301689461, 35606, 19544, [184, 4, 138, 35, 212, 148, 54, 197])

[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 nsIRaceCacheWithNetwork
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIRaceCacheWithNetwork
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.