Struct xpcom::interfaces::nsIHttpChannelInternal
[−]
[src]
#[repr(C)]pub struct nsIHttpChannelInternal { /* fields omitted */ }
interface nsIHttpChannelInternal : nsISupports
/**
* Dumping ground for http. This interface will never be frozen. If you are
* using any feature exposed by this interface, be aware that this interface
* will change and you will be broken. You have been warned.
*/
Methods
impl nsIHttpChannelInternal
[src]
pub fn coerce<T: nsIHttpChannelInternalCoerce>(&self) -> &T
[src]
Cast this nsIHttpChannelInternal
to one of its base interfaces.
impl nsIHttpChannelInternal
[src]
pub const THIRD_PARTY_FORCE_ALLOW: i64
THIRD_PARTY_FORCE_ALLOW: i64 = 1
/**
* This flag is set to force relevant cookies to be sent with this load
* even if normally they wouldn't be.
*/
pub const CORS_MODE_SAME_ORIGIN: i64
CORS_MODE_SAME_ORIGIN: i64 = 0
pub const CORS_MODE_NO_CORS: i64
CORS_MODE_NO_CORS: i64 = 1
pub const CORS_MODE_CORS: i64
CORS_MODE_CORS: i64 = 2
pub const CORS_MODE_NAVIGATE: i64
CORS_MODE_NAVIGATE: i64 = 3
pub const REDIRECT_MODE_FOLLOW: i64
REDIRECT_MODE_FOLLOW: i64 = 0
pub const REDIRECT_MODE_ERROR: i64
REDIRECT_MODE_ERROR: i64 = 1
pub const REDIRECT_MODE_MANUAL: i64
REDIRECT_MODE_MANUAL: i64 = 2
pub const FETCH_CACHE_MODE_DEFAULT: i64
FETCH_CACHE_MODE_DEFAULT: i64 = 0
pub const FETCH_CACHE_MODE_NO_STORE: i64
FETCH_CACHE_MODE_NO_STORE: i64 = 1
pub const FETCH_CACHE_MODE_RELOAD: i64
FETCH_CACHE_MODE_RELOAD: i64 = 2
pub const FETCH_CACHE_MODE_NO_CACHE: i64
FETCH_CACHE_MODE_NO_CACHE: i64 = 3
pub const FETCH_CACHE_MODE_FORCE_CACHE: i64
FETCH_CACHE_MODE_FORCE_CACHE: i64 = 4
pub const FETCH_CACHE_MODE_ONLY_IF_CACHED: i64
FETCH_CACHE_MODE_ONLY_IF_CACHED: i64 = 5
pub unsafe fn GetDocumentURI(
&self,
aDocumentURI: *mut *const nsIURI
) -> nsresult
[src]
&self,
aDocumentURI: *mut *const nsIURI
) -> nsresult
/**
* An http channel can own a reference to the document URI
*/
[must_use] attribute nsIURI documentURI;
pub unsafe fn SetDocumentURI(&self, aDocumentURI: *const nsIURI) -> nsresult
[src]
/**
* An http channel can own a reference to the document URI
*/
[must_use] attribute nsIURI documentURI;
pub unsafe fn GetRequestVersion(
&self,
major: *mut uint32_t,
minor: *mut uint32_t
) -> nsresult
[src]
&self,
major: *mut uint32_t,
minor: *mut uint32_t
) -> nsresult
/**
* Get the major/minor version numbers for the request
*/
[must_use] void getRequestVersion (out unsigned long major, out unsigned long minor);
pub unsafe fn GetResponseVersion(
&self,
major: *mut uint32_t,
minor: *mut uint32_t
) -> nsresult
[src]
&self,
major: *mut uint32_t,
minor: *mut uint32_t
) -> nsresult
/**
* Get the major/minor version numbers for the response
*/
[must_use] void getResponseVersion (out unsigned long major, out unsigned long minor);
pub unsafe fn SetCookie(&self, aCookieHeader: *const c_char) -> nsresult
[src]
/**
* Helper method to set a cookie with a consumer-provided
* cookie header, _but_ using the channel's other information
* (URI's, prompters, date headers etc).
*
* @param aCookieHeader
* The cookie header to be parsed.
*/
[must_use] void setCookie (in string aCookieHeader);
pub unsafe fn SetupFallbackChannel(
&self,
aFallbackKey: *const c_char
) -> nsresult
[src]
&self,
aFallbackKey: *const c_char
) -> nsresult
/**
* Setup this channel as an application cache fallback channel.
*/
[must_use] void setupFallbackChannel (in string aFallbackKey);
pub unsafe fn GetThirdPartyFlags(
&self,
aThirdPartyFlags: *mut uint32_t
) -> nsresult
[src]
&self,
aThirdPartyFlags: *mut uint32_t
) -> nsresult
/**
* When set, these flags modify the algorithm used to decide whether to
* send 3rd party cookies for a given channel.
*/
[must_use] attribute unsigned long thirdPartyFlags;
pub unsafe fn SetThirdPartyFlags(&self, aThirdPartyFlags: uint32_t) -> nsresult
[src]
/**
* When set, these flags modify the algorithm used to decide whether to
* send 3rd party cookies for a given channel.
*/
[must_use] attribute unsigned long thirdPartyFlags;
pub unsafe fn GetForceAllowThirdPartyCookie(
&self,
aForceAllowThirdPartyCookie: *mut bool
) -> nsresult
[src]
&self,
aForceAllowThirdPartyCookie: *mut bool
) -> nsresult
/**
* This attribute was added before the "flags" above and is retained here
* for compatibility. When set to true, has the same effect as
* THIRD_PARTY_FORCE_ALLOW, described above.
*/
[must_use] attribute boolean forceAllowThirdPartyCookie;
pub unsafe fn SetForceAllowThirdPartyCookie(
&self,
aForceAllowThirdPartyCookie: bool
) -> nsresult
[src]
&self,
aForceAllowThirdPartyCookie: bool
) -> nsresult
/**
* This attribute was added before the "flags" above and is retained here
* for compatibility. When set to true, has the same effect as
* THIRD_PARTY_FORCE_ALLOW, described above.
*/
[must_use] attribute boolean forceAllowThirdPartyCookie;
pub unsafe fn GetCanceled(&self, aCanceled: *mut bool) -> nsresult
[src]
/**
* True iff the channel has been canceled.
*/
[must_use] readonly attribute boolean canceled;
pub unsafe fn GetChannelIsForDownload(
&self,
aChannelIsForDownload: *mut bool
) -> nsresult
[src]
&self,
aChannelIsForDownload: *mut bool
) -> nsresult
/**
* External handlers may set this to true to notify the channel
* that it is open on behalf of a download.
*/
[must_use] attribute boolean channelIsForDownload;
pub unsafe fn SetChannelIsForDownload(
&self,
aChannelIsForDownload: bool
) -> nsresult
[src]
&self,
aChannelIsForDownload: bool
) -> nsresult
/**
* External handlers may set this to true to notify the channel
* that it is open on behalf of a download.
*/
[must_use] attribute boolean channelIsForDownload;
pub unsafe fn GetLocalAddress(&self, aLocalAddress: &mut nsACString) -> nsresult
[src]
/**
* The local IP address to which this channel is bound, in the
* format produced by PR_NetAddrToString. May be IPv4 or IPv6.
* Note: in the presence of NAT, this may not be the same as the
* address that the remote host thinks it's talking to.
*
* May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
* endpoints are not yet determined, or in any case when
* nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
*/
[must_use] readonly attribute AUTF8String localAddress;
pub unsafe fn GetLocalPort(&self, aLocalPort: *mut int32_t) -> nsresult
[src]
/**
* The local port number to which this channel is bound.
*
* May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
* endpoints are not yet determined, or in any case when
* nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
*/
[must_use] readonly attribute int32_t localPort;
pub unsafe fn GetRemoteAddress(
&self,
aRemoteAddress: &mut nsACString
) -> nsresult
[src]
&self,
aRemoteAddress: &mut nsACString
) -> nsresult
/**
* The IP address of the remote host that this channel is
* connected to, in the format produced by PR_NetAddrToString.
*
* May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
* endpoints are not yet determined, or in any case when
* nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
*/
[must_use] readonly attribute AUTF8String remoteAddress;
pub unsafe fn GetRemotePort(&self, aRemotePort: *mut int32_t) -> nsresult
[src]
/**
* The remote port number that this channel is connected to.
*
* May throw NS_ERROR_NOT_AVAILABLE if accessed when the channel's
* endpoints are not yet determined, or in any case when
* nsIHttpActivityObserver.isActive is false. See bugs 534698 and 526207.
*/
[must_use] readonly attribute int32_t remotePort;
pub unsafe fn HTTPUpgrade(
&self,
aProtocolName: &nsACString,
aListener: *const nsIHttpUpgradeListener
) -> nsresult
[src]
&self,
aProtocolName: &nsACString,
aListener: *const nsIHttpUpgradeListener
) -> nsresult
/**
* HTTPUpgrade allows for the use of HTTP to bootstrap another protocol
* via the RFC 2616 Upgrade request header in conjunction with a 101 level
* response. The nsIHttpUpgradeListener will have its
* onTransportAvailable() method invoked if a matching 101 is processed.
* The arguments to onTransportAvailable provide the new protocol the low
* level tranport streams that are no longer used by HTTP.
*
* The onStartRequest and onStopRequest events are still delivered and the
* listener gets full control over the socket if and when onTransportAvailable
* is delievered.
*
* @param aProtocolName
* The value of the HTTP Upgrade request header
* @param aListener
* The callback object used to handle a successful upgrade
*/
[must_use] void HTTPUpgrade (in ACString aProtocolName, in nsIHttpUpgradeListener aListener);
pub unsafe fn GetAllowSpdy(&self, aAllowSpdy: *mut bool) -> nsresult
[src]
/**
* Enable/Disable Spdy negotiation on per channel basis.
* The network.http.spdy.enabled preference is still a pre-requisite
* for starting spdy.
*/
[must_use] attribute boolean allowSpdy;
pub unsafe fn SetAllowSpdy(&self, aAllowSpdy: bool) -> nsresult
[src]
/**
* Enable/Disable Spdy negotiation on per channel basis.
* The network.http.spdy.enabled preference is still a pre-requisite
* for starting spdy.
*/
[must_use] attribute boolean allowSpdy;
pub unsafe fn GetResponseTimeoutEnabled(
&self,
aResponseTimeoutEnabled: *mut bool
) -> nsresult
[src]
&self,
aResponseTimeoutEnabled: *mut bool
) -> nsresult
/**
* This attribute en/disables the timeout for the first byte of an HTTP
* response. Enabled by default.
*/
[must_use] attribute boolean responseTimeoutEnabled;
pub unsafe fn SetResponseTimeoutEnabled(
&self,
aResponseTimeoutEnabled: bool
) -> nsresult
[src]
&self,
aResponseTimeoutEnabled: bool
) -> nsresult
/**
* This attribute en/disables the timeout for the first byte of an HTTP
* response. Enabled by default.
*/
[must_use] attribute boolean responseTimeoutEnabled;
pub unsafe fn GetInitialRwin(&self, aInitialRwin: *mut uint32_t) -> nsresult
[src]
/**
* If the underlying transport supports RWIN manipulation, this is the
* intiial window value for the channel. HTTP/2 implements this.
* 0 means no override from system default. Set before opening channel.
*/
[must_use] attribute unsigned long initialRwin;
pub unsafe fn SetInitialRwin(&self, aInitialRwin: uint32_t) -> nsresult
[src]
/**
* If the underlying transport supports RWIN manipulation, this is the
* intiial window value for the channel. HTTP/2 implements this.
* 0 means no override from system default. Set before opening channel.
*/
[must_use] attribute unsigned long initialRwin;
pub unsafe fn GetApiRedirectToURI(
&self,
aApiRedirectToURI: *mut *const nsIURI
) -> nsresult
[src]
&self,
aApiRedirectToURI: *mut *const nsIURI
) -> nsresult
/**
* Get value of the URI passed to nsIHttpChannel.redirectTo() if any.
* May return null when redirectTo() has not been called.
*/
[must_use] readonly attribute nsIURI apiRedirectToURI;
pub unsafe fn GetAllowAltSvc(&self, aAllowAltSvc: *mut bool) -> nsresult
[src]
/**
* Enable/Disable use of Alternate Services with this channel.
* The network.http.altsvc.enabled preference is still a pre-requisite.
*/
[must_use] attribute boolean allowAltSvc;
pub unsafe fn SetAllowAltSvc(&self, aAllowAltSvc: bool) -> nsresult
[src]
/**
* Enable/Disable use of Alternate Services with this channel.
* The network.http.altsvc.enabled preference is still a pre-requisite.
*/
[must_use] attribute boolean allowAltSvc;
pub unsafe fn GetBeConservative(&self, aBeConservative: *mut bool) -> nsresult
[src]
/**
* If true, do not use newer protocol features that might have interop problems
* on the Internet. Intended only for use with critical infra like the updater.
* default is false.
*/
[must_use] attribute boolean beConservative;
pub unsafe fn SetBeConservative(&self, aBeConservative: bool) -> nsresult
[src]
/**
* If true, do not use newer protocol features that might have interop problems
* on the Internet. Intended only for use with critical infra like the updater.
* default is false.
*/
[must_use] attribute boolean beConservative;
pub unsafe fn GetTlsFlags(&self, aTlsFlags: *mut uint32_t) -> nsresult
[src]
/**
* An opaque flags for non-standard behavior of the TLS system.
* It is unlikely this will need to be set outside of telemetry studies
* relating to the TLS implementation.
*/
[must_use] attribute unsigned long tlsFlags;
pub unsafe fn SetTlsFlags(&self, aTlsFlags: uint32_t) -> nsresult
[src]
/**
* An opaque flags for non-standard behavior of the TLS system.
* It is unlikely this will need to be set outside of telemetry studies
* relating to the TLS implementation.
*/
[must_use] attribute unsigned long tlsFlags;
pub unsafe fn GetLastModifiedTime(
&self,
aLastModifiedTime: *mut PRTime
) -> nsresult
[src]
&self,
aLastModifiedTime: *mut PRTime
) -> nsresult
[must_use] readonly attribute PRTime lastModifiedTime;
pub unsafe fn GetResponseSynthesized(
&self,
aResponseSynthesized: *mut bool
) -> nsresult
[src]
&self,
aResponseSynthesized: *mut bool
) -> nsresult
[must_use] readonly attribute boolean responseSynthesized;
pub unsafe fn GetCorsIncludeCredentials(
&self,
aCorsIncludeCredentials: *mut bool
) -> nsresult
[src]
&self,
aCorsIncludeCredentials: *mut bool
) -> nsresult
/**
* Set by nsCORSListenerProxy if credentials should be included in
* cross-origin requests. false indicates "same-origin", users should still
* check flag LOAD_ANONYMOUS!
*/
[must_use] attribute boolean corsIncludeCredentials;
pub unsafe fn SetCorsIncludeCredentials(
&self,
aCorsIncludeCredentials: bool
) -> nsresult
[src]
&self,
aCorsIncludeCredentials: bool
) -> nsresult
/**
* Set by nsCORSListenerProxy if credentials should be included in
* cross-origin requests. false indicates "same-origin", users should still
* check flag LOAD_ANONYMOUS!
*/
[must_use] attribute boolean corsIncludeCredentials;
pub unsafe fn GetCorsMode(&self, aCorsMode: *mut uint32_t) -> nsresult
[src]
/**
* Set by nsCORSListenerProxy to indicate CORS load type. Defaults to CORS_MODE_NO_CORS.
*/
[must_use] attribute unsigned long corsMode;
pub unsafe fn SetCorsMode(&self, aCorsMode: uint32_t) -> nsresult
[src]
/**
* Set by nsCORSListenerProxy to indicate CORS load type. Defaults to CORS_MODE_NO_CORS.
*/
[must_use] attribute unsigned long corsMode;
pub unsafe fn GetRedirectMode(&self, aRedirectMode: *mut uint32_t) -> nsresult
[src]
/**
* Set to indicate Request.redirect mode exposed during ServiceWorker
* interception. No policy enforcement is performed by the channel for this
* value.
*/
[must_use] attribute unsigned long redirectMode;
pub unsafe fn SetRedirectMode(&self, aRedirectMode: uint32_t) -> nsresult
[src]
/**
* Set to indicate Request.redirect mode exposed during ServiceWorker
* interception. No policy enforcement is performed by the channel for this
* value.
*/
[must_use] attribute unsigned long redirectMode;
pub unsafe fn GetFetchCacheMode(
&self,
aFetchCacheMode: *mut uint32_t
) -> nsresult
[src]
&self,
aFetchCacheMode: *mut uint32_t
) -> nsresult
/**
* Set to indicate Request.cache mode, which simulates the fetch API
* semantics, and is also used for exposing this value to the Web page
* during service worker interception.
*/
[must_use] attribute unsigned long fetchCacheMode;
pub unsafe fn SetFetchCacheMode(&self, aFetchCacheMode: uint32_t) -> nsresult
[src]
/**
* Set to indicate Request.cache mode, which simulates the fetch API
* semantics, and is also used for exposing this value to the Web page
* during service worker interception.
*/
[must_use] attribute unsigned long fetchCacheMode;
pub unsafe fn GetTopWindowURI(
&self,
aTopWindowURI: *mut *const nsIURI
) -> nsresult
[src]
&self,
aTopWindowURI: *mut *const nsIURI
) -> nsresult
/**
* The URI of the top-level window that's associated with this channel.
*/
[must_use] readonly attribute nsIURI topWindowURI;
pub unsafe fn SetTopWindowURIIfUnknown(
&self,
topWindowURI: *const nsIURI
) -> nsresult
[src]
&self,
topWindowURI: *const nsIURI
) -> nsresult
/**
* Set top-level window URI to this channel only when the topWindowURI
* is null and there is no window associated to this channel.
* Note that the current usage of this method is only for xpcshell test.
*/
[must_use] void setTopWindowURIIfUnknown (in nsIURI topWindowURI);
pub unsafe fn GetNetworkInterfaceId(
&self,
aNetworkInterfaceId: &mut nsACString
) -> nsresult
[src]
&self,
aNetworkInterfaceId: &mut nsACString
) -> nsresult
/**
* The network interface id that's associated with this channel.
*/
[must_use] attribute ACString networkInterfaceId;
pub unsafe fn SetNetworkInterfaceId(
&self,
aNetworkInterfaceId: &nsACString
) -> nsresult
[src]
&self,
aNetworkInterfaceId: &nsACString
) -> nsresult
/**
* The network interface id that's associated with this channel.
*/
[must_use] attribute ACString networkInterfaceId;
pub unsafe fn GetProxyURI(&self, aProxyURI: *mut *const nsIURI) -> nsresult
[src]
/**
* Read the proxy URI, which, if non-null, will be used to resolve
* proxies for this channel.
*/
[must_use] readonly attribute nsIURI proxyURI;
pub unsafe fn GetBlockAuthPrompt(&self) -> bool
[src]
/**
* When set to true, the channel will not pop any authentication prompts up
* to the user. When provided or cached credentials lead to an
* authentication failure, that failure will be propagated to the channel
* listener. Must be called before opening the channel, otherwise throws.
*/
[infallible] attribute boolean blockAuthPrompt;
pub unsafe fn SetBlockAuthPrompt(&self, aBlockAuthPrompt: bool) -> nsresult
[src]
/**
* When set to true, the channel will not pop any authentication prompts up
* to the user. When provided or cached credentials lead to an
* authentication failure, that failure will be propagated to the channel
* listener. Must be called before opening the channel, otherwise throws.
*/
[infallible] attribute boolean blockAuthPrompt;
pub unsafe fn GetIntegrityMetadata(
&self,
aIntegrityMetadata: &mut nsAString
) -> nsresult
[src]
&self,
aIntegrityMetadata: &mut nsAString
) -> nsresult
/**
* Set to indicate Request.integrity.
*/
[must_use] attribute AString integrityMetadata;
pub unsafe fn SetIntegrityMetadata(
&self,
aIntegrityMetadata: &nsAString
) -> nsresult
[src]
&self,
aIntegrityMetadata: &nsAString
) -> nsresult
/**
* Set to indicate Request.integrity.
*/
[must_use] attribute AString integrityMetadata;
pub unsafe fn GetConnectionInfoHashKey(
&self,
aConnectionInfoHashKey: &mut nsACString
) -> nsresult
[src]
&self,
aConnectionInfoHashKey: &mut nsACString
) -> nsresult
/**
* The connection info's hash key. We use it to test connection separation.
*/
[must_use] readonly attribute ACString connectionInfoHashKey;
pub unsafe fn GetLastRedirectFlags(&self) -> uint32_t
[src]
/**
* If this channel was created as the result of a redirect, then this
* value will reflect the redirect flags passed to the
* SetupReplacementChannel() method.
*/
[infallible,noscript] attribute unsigned long lastRedirectFlags;
pub unsafe fn SetLastRedirectFlags(
&self,
aLastRedirectFlags: uint32_t
) -> nsresult
[src]
&self,
aLastRedirectFlags: uint32_t
) -> nsresult
/**
* If this channel was created as the result of a redirect, then this
* value will reflect the redirect flags passed to the
* SetupReplacementChannel() method.
*/
[infallible,noscript] attribute unsigned long lastRedirectFlags;
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 nsIHttpChannelInternal
[src]
const IID: nsIID
IID: nsIID = nsID(1311254077, 7683, 18164, [170, 92, 149, 18, 249, 25, 87, 249])
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 nsIHttpChannelInternal
[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 nsIHttpChannelInternal
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.