Back to index

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

#include <nsHTTPSOAPTransport.h>

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

List of all members.

Public Member Functions

 nsHTTPSOAPTransportCompletion ()
 nsHTTPSOAPTransportCompletion (nsISOAPCall *call, nsISOAPResponse *response, nsIXMLHttpRequest *request, nsISOAPResponseListener *listener)
virtual ~nsHTTPSOAPTransportCompletion ()
NS_DECL_ISUPPORTS
NS_DECL_NSISOAPCALLCOMPLETION
NS_IMETHOD 
HandleEvent (nsIDOMEvent *aEvent)
void handleEvent (in nsIDOMEvent event)
 This method is called whenever an event occurs of the type for which the EventListener interface was registered.
boolean abort ()
 Cause the invoked method to abort, if it is not already complete.

Public Attributes

readonly attribute nsISOAPCall call
 The call which was invoked (may have changed since the call was made).
readonly attribute nsISOAPResponse response
 The response, if any, to the call.
readonly attribute
nsISOAPResponseListener 
listener
 The listener to the call.
readonly attribute boolean isComplete
 Whether the call is complete.

Protected Attributes

nsCOMPtr< nsISOAPCallmCall
nsCOMPtr< nsISOAPResponsemResponse
nsCOMPtr< nsIXMLHttpRequestmRequest
nsCOMPtr< nsISOAPResponseListenermListener

Detailed Description

Definition at line 72 of file nsHTTPSOAPTransport.h.


Constructor & Destructor Documentation

Definition at line 439 of file nsHTTPSOAPTransport.cpp.

                                                                                                                                                                            :
mCall(call), mResponse(response), mRequest(request), mListener(listener)
{
}

Definition at line 444 of file nsHTTPSOAPTransport.cpp.

{
}

Member Function Documentation

Cause the invoked method to abort, if it is not already complete.

Returns:
true if the state of isComplete became true as a result. False if it was already true or reamined false.

This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Parameters:
evtThe Event contains contextual information about the event. It also contains the stopPropagation and preventDefault methods which are used in determining the event's flow and default action.

Definition at line 505 of file nsHTTPSOAPTransport.cpp.

{
  NS_ENSURE_ARG(aEvent);
//  PRUint32 status;
  nsresult rv = NS_OK;
  if (mRequest) {                //  Avoid if it has been aborted.
#if 0
    rv = mRequest->GetStatus(&status);
    if (NS_SUCCEEDED(rv) && (status < 200 || status >= 300))
      rv = NS_ERROR_FAILURE;
#endif
    if (mResponse) { // && NS_SUCCEEDED(rv)) {
      nsCOMPtr<nsIDOMDocument> document;
      rv = mRequest->GetResponseXML(getter_AddRefs(document));
      if (NS_SUCCEEDED(rv) && document) {
        rv = mResponse->SetMessage(document);
        ChangePrincipal(document);
        DEBUG_DUMP_DOCUMENT("Asynchronous Response", document)
      } 
      else {
        mResponse = nsnull;
      }
    } else {
      mResponse = nsnull;
    }
    nsCOMPtr<nsISOAPCallCompletion> kungFuDeathGrip = this;
    mRequest = nsnull;                //  Break cycle of references by releasing the request.
    PRBool c;                        //  In other transports, this may signal to stop returning if multiple returns
    mListener->HandleResponse(mResponse, mCall, rv, PR_TRUE, &c);
  }
  return NS_OK;
}

Here is the call graph for this function:


Member Data Documentation

The call which was invoked (may have changed since the call was made).

Definition at line 57 of file nsISOAPCallCompletion.idl.

Whether the call is complete.

Definition at line 69 of file nsISOAPCallCompletion.idl.

The listener to the call.

Definition at line 65 of file nsISOAPCallCompletion.idl.

Definition at line 90 of file nsHTTPSOAPTransport.h.

Definition at line 93 of file nsHTTPSOAPTransport.h.

Definition at line 92 of file nsHTTPSOAPTransport.h.

Definition at line 91 of file nsHTTPSOAPTransport.h.

The response, if any, to the call.

Definition at line 61 of file nsISOAPCallCompletion.idl.


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