Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsStreamListenerProxy.cpp File Reference
#include "nsStreamListenerProxy.h"
#include "netCore.h"
#include "nsIGenericFactory.h"
#include "nsIPipe.h"
#include "nsAutoLock.h"
#include "prlog.h"
#include "nsIOService.h"

Go to the source code of this file.

Classes

class  nsOnDataAvailableEvent

Defines

#define LOG(args)   PR_LOG(gStreamListenerProxyLog, PR_LOG_DEBUG, args)
#define DEFAULT_BUFFER_SEGMENT_SIZE   4096
#define DEFAULT_BUFFER_MAX_SIZE   (4*4096)

Functions

 NS_IMPL_THREADSAFE_ISUPPORTS4 (nsStreamListenerProxy, nsIStreamListener, nsIRequestObserver, nsIStreamListenerProxy, nsIInputStreamObserver) NS_IMETHODIMP nsStreamListenerProxy

Define Documentation

Definition at line 54 of file nsStreamListenerProxy.cpp.

Definition at line 53 of file nsStreamListenerProxy.cpp.

#define LOG (   args)    PR_LOG(gStreamListenerProxyLog, PR_LOG_DEBUG, args)

Definition at line 51 of file nsStreamListenerProxy.cpp.


Function Documentation

Definition at line 223 of file nsStreamListenerProxy.cpp.

{
    NS_ENSURE_TRUE(mObserverProxy, NS_ERROR_NOT_INITIALIZED);

    nsresult rv;
    nsCOMPtr<nsIObservableInputStream> obs(do_QueryInterface(mPipeIn, &rv));
    if (NS_FAILED(rv)) return rv;

    // This will create a cyclic reference between the pipe and |this|, which
    // will be broken when onStopRequest is called.
    rv = obs->SetObserver(this);
    if (NS_FAILED(rv)) return rv;

    return mObserverProxy->OnStartRequest(request, context);
}

Here is the call graph for this function: