KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21571/root/usr/lib64/xulrunner-devel-17.0.10/idl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21571/root/usr/lib64/xulrunner-devel-17.0.10/idl/nsIStreamLoader.idl
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIStreamListener.idl"

interface nsIRequest;
interface nsIStreamLoader;

[scriptable, uuid(359F7990-D4E9-11d3-A1A5-0050041CAF44)]
interface nsIStreamLoaderObserver : nsISupports
{
    /**
     * Called when the entire stream has been loaded.
     *
     * @param loader the stream loader that loaded the stream.
     * @param ctxt the context parameter of the underlying channel
     * @param status the status of the underlying channel
     * @param resultLength the length of the data loaded
     * @param result the data
     *
     * This method will always be called asynchronously by the
     * nsIStreamLoader involved, on the thread that called the
     * loader's init() method.
     *
     * If the observer wants to take over responsibility for the
     * data buffer (result), it returns NS_SUCCESS_ADOPTED_DATA
     * in place of NS_OK as its success code. The loader will then
     * "forget" about the data, and not NS_Free() it in its own
     * destructor; observer must call NS_Free() when the data is
     * no longer required.
     */
    void onStreamComplete(in nsIStreamLoader loader,
                          in nsISupports ctxt,
                          in nsresult status,
                          in unsigned long resultLength,
                          [const,array,size_is(resultLength)] in octet result);
};

/**
 * Asynchronously loads a channel into a memory buffer.
 *
 * To use this interface, first call init() with a nsIStreamLoaderObserver
 * that will be notified when the data has been loaded. Then call asyncOpen()
 * on the channel with the nsIStreamLoader as the listener. The context
 * argument in the asyncOpen() call will be passed to the onStreamComplete()
 * callback.
 *
 * XXX define behaviour for sizes >4 GB
 */
[scriptable, uuid(8ea7e890-8211-11d9-8bde-f66bad1e3f3a)]
interface nsIStreamLoader : nsIStreamListener
{
    /**
     * Initialize this stream loader, and start loading the data.
     *
     * @param aObserver
     *        An observer that will be notified when the data is complete.
     */
    void init(in nsIStreamLoaderObserver aObserver);

    /**
     * Gets the number of bytes read so far.
     */
    readonly attribute unsigned long numBytesRead;

    /**
     * Gets the request that loaded this file.
     * null after the request has finished loading.
     */
    readonly attribute nsIRequest request;
};

Anon7 - 2021