Struct xpcom::interfaces::nsIInputChannelThrottleQueue [] [src]

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

interface nsIInputChannelThrottleQueue : nsISupports

/**
 * An instance of this interface can be used to throttle the uploads
 * of a group of associated channels.
 */

Methods

impl nsIInputChannelThrottleQueue
[src]

[src]

Cast this nsIInputChannelThrottleQueue to one of its base interfaces.

impl nsIInputChannelThrottleQueue
[src]

[src]

/**
     * Initialize this object with the mean and maximum bytes per
     * second that will be allowed.  Neither value may be zero, and
     * the maximum must not be less than the mean.
     *
     * @param aMeanBytesPerSecond
     *        Mean number of bytes per second.
     * @param aMaxBytesPerSecond
     *        Maximum number of bytes per second.
     */

void init (in unsigned long aMeanBytesPerSecond, in unsigned long aMaxBytesPerSecond);

[src]

/**
     * Return the number of bytes that are available to the caller in
     * this time slice.
     *
     * @param aRemaining
     *        The number of bytes available to be processed
     * @return the number of bytes allowed to be processed during this
     *        time slice; this will never be greater than aRemaining.
     */

unsigned long available (in unsigned long aRemaining);

[src]

/**
     * Record a successful read.
     *
     * @param aBytesRead
     *        The number of bytes actually read.
     */

void recordRead (in unsigned long aBytesRead);

[src]

/**
     * Return the number of bytes allowed through this queue.  This is
     * the sum of all the values passed to recordRead.  This method is
     * primarily useful for testing.
     */

unsigned long long bytesProcessed ();

[src]

/**
     * Wrap the given input stream in a new input stream which
     * throttles the incoming data.
     *
     * @param aInputStream the input stream to wrap
     * @return a new input stream that throttles the data.
     */

nsIAsyncInputStream wrapStream (in nsIInputStream aInputStream);

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

IID: nsIID = nsID(1800115966, 15463, 17799, [175, 123, 88, 182, 177, 125, 164, 17])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIInputChannelThrottleQueue
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.