Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsDNSAsyncRequest Class Reference
Inheritance diagram for nsDNSAsyncRequest:
Inheritance graph
[legend]
Collaboration diagram for nsDNSAsyncRequest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSICANCELABLE 
nsDNSAsyncRequest (nsHostResolver *res, const nsACString &host, nsIDNSListener *listener, PRUint16 flags, PRUint16 af)
 ~nsDNSAsyncRequest ()
void OnLookupComplete (nsHostResolver *, nsHostRecord *, nsresult)
void cancel (in nsresult aReason)
 Call this method to request that this object abort whatever operation it may be performing.

Public Attributes

nsRefPtr< nsHostResolvermResolver
nsCString mHost
nsCOMPtr< nsIDNSListenermListener
PRUint16 mFlags
PRUint16 mAF

Detailed Description

Definition at line 181 of file nsDNSService2.cpp.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSICANCELABLE nsDNSAsyncRequest::nsDNSAsyncRequest ( nsHostResolver res,
const nsACString &  host,
nsIDNSListener listener,
PRUint16  flags,
PRUint16  af 
) [inline]

Definition at line 188 of file nsDNSService2.cpp.

        : mResolver(res)
        , mHost(host)
        , mListener(listener)
        , mFlags(flags)
        , mAF(af) {}

Definition at line 198 of file nsDNSService2.cpp.

{}

Member Function Documentation

void nsICancelable::cancel ( in nsresult  aReason) [inherited]

Call this method to request that this object abort whatever operation it may be performing.

Parameters:
aReasonPass a failure code to indicate the reason why this operation is being canceled. It is an error to pass a success code.
void nsDNSAsyncRequest::OnLookupComplete ( nsHostResolver resolver,
nsHostRecord hostRecord,
nsresult  status 
)

Definition at line 210 of file nsDNSService2.cpp.

{
    // need to have an owning ref when we issue the callback to enable
    // the caller to be able to addref/release multiple times without
    // destroying the record prematurely.
    nsCOMPtr<nsIDNSRecord> rec;
    if (NS_SUCCEEDED(status)) {
        NS_ASSERTION(hostRecord, "no host record");
        rec = new nsDNSRecord(hostRecord);
        if (!rec)
            status = NS_ERROR_OUT_OF_MEMORY;
    }

    mListener->OnLookupComplete(this, rec, status);
    mListener = nsnull;

    // release the reference to ourselves that was added before we were
    // handed off to the host resolver.
    NS_RELEASE_THIS();
}

Member Data Documentation

Definition at line 206 of file nsDNSService2.cpp.

Definition at line 205 of file nsDNSService2.cpp.

Definition at line 203 of file nsDNSService2.cpp.

Definition at line 204 of file nsDNSService2.cpp.

Definition at line 202 of file nsDNSService2.cpp.


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