Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Protected Attributes
nsAsyncStreamObserver Class Reference

#include <nsAsyncStreamListener.h>

Inheritance diagram for nsAsyncStreamObserver:
Inheritance graph
[legend]
Collaboration diagram for nsAsyncStreamObserver:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER 
nsAsyncStreamObserver ()
virtual ~nsAsyncStreamObserver ()
NS_METHOD Init (nsIRequestObserver *, nsIEventQueue *)
nsISupports * GetReceiver ()
void Clear ()
void onStartRequest (in nsIRequest aRequest, in nsISupports aContext)
 Called to signify the beginning of an asynchronous request.
void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode)
 Called to signify the end of an asynchronous request.

Static Public Member Functions

static NS_METHOD Create (nsISupports *aOuter, REFNSIID aIID, void **aResult)

Protected Attributes

nsCOMPtr< nsIEventQueuemEventQueue
nsCOMPtr< nsIRequestObservermReceiver

Detailed Description

Definition at line 50 of file nsAsyncStreamListener.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIREQUESTOBSERVER nsAsyncStreamObserver::nsAsyncStreamObserver ( ) [inline]

Definition at line 57 of file nsAsyncStreamListener.h.

    { 
    }

Here is the caller graph for this function:

virtual nsAsyncStreamObserver::~nsAsyncStreamObserver ( ) [inline, virtual]

Definition at line 61 of file nsAsyncStreamListener.h.

{}

Member Function Documentation

Definition at line 69 of file nsAsyncStreamListener.h.

Here is the caller graph for this function:

NS_METHOD nsAsyncStreamObserver::Create ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Reimplemented in nsAsyncStreamListener.

Definition at line 468 of file nsAsyncStreamListener.cpp.

{
    if (aOuter)
        return NS_ERROR_NO_AGGREGATION;
    nsAsyncStreamObserver* l = new nsAsyncStreamObserver();
    if (l == nsnull)
        return NS_ERROR_OUT_OF_MEMORY;
    NS_ADDREF(l);
    nsresult rv = l->QueryInterface(aIID, aResult);
    NS_RELEASE(l);
    return rv;
}

Here is the call graph for this function:

nsISupports* nsAsyncStreamObserver::GetReceiver ( ) [inline]

Definition at line 68 of file nsAsyncStreamListener.h.

{ return mReceiver.get(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 174 of file nsAsyncStreamListener.cpp.

{
    nsresult rv = NS_OK;
    NS_ASSERTION(aObserver, "null observer");
    mReceiver = aObserver;
        
    nsCOMPtr<nsIEventQueueService> eventQService = 
             do_GetService(kEventQueueService, &rv);
    if (NS_FAILED(rv)) 
    return rv;
        
    rv = eventQService->ResolveEventQueue(aEventQ, getter_AddRefs(mEventQueue));
    return rv;
}

Here is the call graph for this function:

void nsIRequestObserver::onStartRequest ( in nsIRequest  aRequest,
in nsISupports  aContext 
) [inherited]

Called to signify the beginning of an asynchronous request.

Parameters:
aRequestrequest being observed
aContextuser defined context

An exception thrown from onStartRequest has the side-effect of causing the request to be canceled.

Here is the caller graph for this function:

void nsIRequestObserver::onStopRequest ( in nsIRequest  aRequest,
in nsISupports  aContext,
in nsresult  aStatusCode 
) [inherited]

Called to signify the end of an asynchronous request.

This call is always preceded by a call to onStartRequest.

Parameters:
aRequestrequest being observed
aContextuser defined context
aStatusCodereason for stopping (NS_OK if completed successfully)

An exception thrown from onStopRequest is generally ignored.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 72 of file nsAsyncStreamListener.h.

Definition at line 73 of file nsAsyncStreamListener.h.


The documentation for this class was generated from the following files: