Struct xpcom::interfaces::nsIUploadChannel2
[−]
[src]
#[repr(C)]pub struct nsIUploadChannel2 { /* fields omitted */ }
interface nsIUploadChannel2 : nsISupports
Methods
impl nsIUploadChannel2
[src]
pub fn coerce<T: nsIUploadChannel2Coerce>(&self) -> &T
[src]
Cast this nsIUploadChannel2
to one of its base interfaces.
impl nsIUploadChannel2
[src]
pub unsafe fn ExplicitSetUploadStream(
&self,
aStream: *const nsIInputStream,
aContentType: &nsACString,
aContentLength: int64_t,
aMethod: &nsACString,
aStreamHasHeaders: bool
) -> nsresult
[src]
&self,
aStream: *const nsIInputStream,
aContentType: &nsACString,
aContentLength: int64_t,
aMethod: &nsACString,
aStreamHasHeaders: bool
) -> nsresult
/**
* Sets a stream to be uploaded by this channel with the specified
* Content-Type and Content-Length header values.
*
* Most implementations of this interface require that the stream:
* (1) implement threadsafe addRef and release
* (2) implement nsIInputStream::readSegments
* (3) implement nsISeekableStream::seek
*
* @param aStream
* The stream to be uploaded by this channel.
* @param aContentType
* This value will replace any existing Content-Type
* header on the HTTP request, regardless of whether
* or not its empty.
* @param aContentLength
* A value of -1 indicates that the length of the stream should be
* determined by calling the stream's |available| method.
* @param aMethod
* The HTTP request method to set on the stream.
* @param aStreamHasHeaders
* True if the stream already contains headers for the HTTP request.
*/
void explicitSetUploadStream (in nsIInputStream aStream, in ACString aContentType, in long long aContentLength, in ACString aMethod, in boolean aStreamHasHeaders);
pub unsafe fn GetUploadStreamHasHeaders(
&self,
aUploadStreamHasHeaders: *mut bool
) -> nsresult
[src]
&self,
aUploadStreamHasHeaders: *mut bool
) -> nsresult
/**
* Value of aStreamHasHeaders from the last successful call to
* explicitSetUploadStream. TRUE indicates the attached upload stream
* contians request headers.
*/
readonly attribute boolean uploadStreamHasHeaders;
pub unsafe fn EnsureUploadStreamIsCloneable(
&self,
aCallback: *const nsIRunnable
) -> nsresult
[src]
&self,
aCallback: *const nsIRunnable
) -> nsresult
/**
* Ensure the upload stream, if any, is cloneable. This may involve
* async copying, so a callback runnable must be provided. It will
* invoked on the current thread when the upload stream is ready
* for cloning. If the stream is already cloneable, then the callback
* will be invoked synchronously.
*/
[noscript] void ensureUploadStreamIsCloneable (in nsIRunnable aCallback);
pub unsafe fn CloneUploadStream(
&self,
aContentLength: *mut int64_t,
_retval: *mut *const nsIInputStream
) -> nsresult
[src]
&self,
aContentLength: *mut int64_t,
_retval: *mut *const nsIInputStream
) -> nsresult
/**
* Clones the upload stream. May return failure if the upload stream
* is not cloneable. If this is not acceptable, use the
* ensureUploadStreamIsCloneable() method first.
* aContentLength could be -1 in case the size of the stream is unknown,
* otherwise it will contain the known size of the stream.
*/
[noscript] nsIInputStream cloneUploadStream (out long long aContentLength);
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 nsIUploadChannel2
[src]
const IID: nsIID
IID: nsIID = nsID(795945810, 6597, 19980, [158, 143, 181, 199, 195, 182, 112, 73])
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 nsIUploadChannel2
[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 nsIUploadChannel2
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.