Struct xpcom::interfaces::nsIInterceptedChannel [] [src]

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

interface nsIInterceptedChannel : nsISupports

/**
 * Interface to allow implementors of nsINetworkInterceptController to control the behaviour
 * of intercepted channels without tying implementation details of the interception to
 * the actual channel. nsIInterceptedChannel is expected to be implemented by objects
 * which do not implement nsIChannel.
 */

Methods

impl nsIInterceptedChannel
[src]

[src]

Cast this nsIInterceptedChannel to one of its base interfaces.

impl nsIInterceptedChannel
[src]

[src]

/**
     * Instruct a channel that has been intercepted to continue with the original
     * network request.
     */

void resetInterception ();

[src]

/**
     * Set the status and reason for the forthcoming synthesized response.
     * Multiple calls overwrite existing values.
     */

void synthesizeStatus (in uint16_t status, in ACString reason);

[src]

/**
     * Attach a header name/value pair to the forthcoming synthesized response.
     * Overwrites any existing header value.
     */

void synthesizeHeader (in ACString name, in ACString value);

[src]

/**
     * Instruct a channel that has been intercepted that a response is
     * starting to be synthesized.  No further header modification is allowed
     * after this point.  There are a few parameters:
     * - A body stream may be optionally passed.  If nullptr, then an
     *   empty body is assumed.
     * - A callback may be optionally passed.  It will be invoked
     *   when the body is complete.  For a nullptr body this may be
     *   synchronously on the current thread.  Otherwise it will be invoked
     *   asynchronously on the current thread.
     * - A cacheInfoChannel may be optionally passed. If the body stream is
     *   from alternative data cache, this cacheInfoChannel provides needed
     *   cache information.
     * - The caller may optionally pass a spec for a URL that this response
     *   originates from; an empty string will cause the original
     *   intercepted request's URL to be used instead.
     * - The responseRedirected flag is false will cause the channel do an
     *   internal redirect when the original intercepted reauest's URL is
     *   different from the response's URL. The flag is true will cause the
     *   chaanel do a non-internal redirect when the URLs are different.
     */

void startSynthesizedResponse (in nsIInputStream body, in nsIInterceptedBodyCallback callback, in nsICacheInfoChannel channel, in ACString finalURLSpec, in bool responseRedirected);

[src]

/**
     * Instruct a channel that has been intercepted that response synthesis
     * has completed and all outstanding resources can be closed.
     */

void finishSynthesizedResponse ();

[src]

/**
     * Cancel the pending intercepted request.
     * @return NS_ERROR_FAILURE if the response has already been synthesized or
     *         the original request has been instructed to continue.
     */

void cancelInterception (in nsresult status);

[src]

/**
     * The underlying channel object that was intercepted.
     */

readonly attribute nsIChannel channel;

[src]

/**
     * The URL of the underlying channel object, corrected for a potential
     * secure upgrade.
     */

readonly attribute nsIURI secureUpgradedChannelURI;

[src]

/**
     * Get the internal load type from the underlying channel.
     */

[noscript] readonly attribute nsContentPolicyType internalContentPolicyType;

[src]

[noscript] readonly attribute nsIConsoleReportCollector consoleReportCollector;

[src]

[noscript] void SaveTimeStamps ();

[src]

/**
     * Allow the ServiceWorkerManager to set an RAII-style object on the
     * intercepted channel that should be released once the channel is
     * torn down.
     */

[noscript] void setReleaseHandle (in nsISupports aHandle);

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

IID: nsIID = nsID(4105709941, 27270, 19652, [135, 254, 154, 31, 212, 48, 200, 109])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIInterceptedChannel
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.