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]
pub fn coerce<T: nsIInterceptedChannelCoerce>(&self) -> &T
[src]
Cast this nsIInterceptedChannel
to one of its base interfaces.
impl nsIInterceptedChannel
[src]
pub unsafe fn ResetInterception(&self) -> nsresult
[src]
/**
* Instruct a channel that has been intercepted to continue with the original
* network request.
*/
void resetInterception ();
pub unsafe fn SynthesizeStatus(
&self,
status: uint16_t,
reason: &nsACString
) -> nsresult
[src]
&self,
status: uint16_t,
reason: &nsACString
) -> nsresult
/**
* Set the status and reason for the forthcoming synthesized response.
* Multiple calls overwrite existing values.
*/
void synthesizeStatus (in uint16_t status, in ACString reason);
pub unsafe fn SynthesizeHeader(
&self,
name: &nsACString,
value: &nsACString
) -> nsresult
[src]
&self,
name: &nsACString,
value: &nsACString
) -> nsresult
/**
* Attach a header name/value pair to the forthcoming synthesized response.
* Overwrites any existing header value.
*/
void synthesizeHeader (in ACString name, in ACString value);
pub unsafe fn StartSynthesizedResponse(
&self,
body: *const nsIInputStream,
callback: *const nsIInterceptedBodyCallback,
channel: *const nsICacheInfoChannel,
finalURLSpec: &nsACString,
responseRedirected: bool
) -> nsresult
[src]
&self,
body: *const nsIInputStream,
callback: *const nsIInterceptedBodyCallback,
channel: *const nsICacheInfoChannel,
finalURLSpec: &nsACString,
responseRedirected: bool
) -> nsresult
/**
* 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);
pub unsafe fn FinishSynthesizedResponse(&self) -> nsresult
[src]
/**
* Instruct a channel that has been intercepted that response synthesis
* has completed and all outstanding resources can be closed.
*/
void finishSynthesizedResponse ();
pub unsafe fn CancelInterception(&self, status: nsresult) -> nsresult
[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);
pub unsafe fn GetChannel(&self, aChannel: *mut *const nsIChannel) -> nsresult
[src]
/**
* The underlying channel object that was intercepted.
*/
readonly attribute nsIChannel channel;
pub unsafe fn GetSecureUpgradedChannelURI(
&self,
aSecureUpgradedChannelURI: *mut *const nsIURI
) -> nsresult
[src]
&self,
aSecureUpgradedChannelURI: *mut *const nsIURI
) -> nsresult
/**
* The URL of the underlying channel object, corrected for a potential
* secure upgrade.
*/
readonly attribute nsIURI secureUpgradedChannelURI;
pub unsafe fn GetInternalContentPolicyType(
&self,
aInternalContentPolicyType: *mut nsContentPolicyType
) -> nsresult
[src]
&self,
aInternalContentPolicyType: *mut nsContentPolicyType
) -> nsresult
/**
* Get the internal load type from the underlying channel.
*/
[noscript] readonly attribute nsContentPolicyType internalContentPolicyType;
pub unsafe fn GetConsoleReportCollector(
&self,
aConsoleReportCollector: *mut *const nsIConsoleReportCollector
) -> nsresult
[src]
&self,
aConsoleReportCollector: *mut *const nsIConsoleReportCollector
) -> nsresult
[noscript] readonly attribute nsIConsoleReportCollector consoleReportCollector;
pub unsafe fn SaveTimeStamps(&self) -> nsresult
[src]
[noscript] void SaveTimeStamps ();
pub unsafe fn SetReleaseHandle(&self, aHandle: *const nsISupports) -> nsresult
[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>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIInterceptedChannel
[src]
const IID: nsIID
IID: nsIID = nsID(4105709941, 27270, 19652, [135, 254, 154, 31, 212, 48, 200, 109])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIInterceptedChannel
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.