Back to index

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

#include <nsLDAPChannel.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIREQUEST
NS_DECL_NSICHANNEL
NS_DECL_NSILDAPMESSAGELISTENER 
nsLDAPChannel ()
virtual ~nsLDAPChannel ()
nsresult Init (nsIURI *uri)
nsIInputStream open ()
 Synchronously open the channel.
void asyncOpen (in nsIStreamListener aListener, in nsISupports aContext)
 Asynchronously open this channel.
boolean isPending ()
 Indicates whether the request is pending.
void cancel (in nsresult aStatus)
 Cancels the current request.
void suspend ()
 Suspends the current request.
void resume ()
 Resumes the current request.
void onLDAPMessage (in nsILDAPMessage aMessage)
 Messages received are passed back via this function.
void onLDAPInit (in nsILDAPConnection aConn, in nsresult aStatus)
 Notify the listener that the Init has completed, passing in the results from the connection initialization.

Static Public Member Functions

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

Public Attributes

attribute nsIURI originalURI
 The original URI used to construct the channel.
readonly attribute nsIURI URI
 The URI corresponding to the channel.
attribute nsISupports owner
 The owner, corresponding to the entity that is responsible for this channel.
attribute nsIInterfaceRequestor notificationCallbacks
 The notification callbacks for the channel.
readonly attribute nsISupports securityInfo
 Transport-level security information (if any) corresponding to the channel.
attribute ACString contentType
 The MIME type of the channel's content if available.
attribute ACString contentCharset
 The character set of the channel's content if available and if applicable.
attribute long contentLength
 The length of the data associated with the channel if available.
const unsigned long LOAD_DOCUMENT_URI = 1 << 16
 Set (e.g., by the docshell) to indicate whether or not the channel corresponds to a document URI.
const unsigned long LOAD_RETARGETED_DOCUMENT_URI = 1 << 17
 If the end consumer for this load has been retargeted after discovering it's content, this flag will be set:
const unsigned long LOAD_REPLACE = 1 << 18
 This flag is set to indicate that onStopRequest may be followed by another onStartRequest/onStopRequest pair.
const unsigned long LOAD_INITIAL_DOCUMENT_URI = 1 << 19
 Set (e.g., by the docshell) to indicate whether or not the channel corresponds to an initial document URI load (e.g., link click).
const unsigned long LOAD_TARGETED = 1 << 20
 Set (e.g., by the URILoader) to indicate whether or not the end consumer for this load has been determined.
const unsigned long LOAD_CALL_CONTENT_SNIFFERS = 1 << 21
 If this flag is set, the channel should call the content sniffers as described in nsNetCID.h about NS_CONTENT_SNIFFER_CATEGORY.
readonly attribute AUTF8String name
 The name of the request.
readonly attribute nsresult status
 The error status associated with the request.
attribute nsILoadGroup loadGroup
 The load group of this request.
attribute nsLoadFlags loadFlags
 The load flags of this request.
const unsigned long LOAD_NORMAL = 0
 No special load flags:
const unsigned long LOAD_BACKGROUND = 1 << 0
 Don't deliver status notifications to the nsIProgressEventSink, or keep this load from completing the nsILoadGroup it may belong to.
const unsigned long INHIBIT_CACHING = 1 << 7
 This flag prevents caching of any kind.
const unsigned long INHIBIT_PERSISTENT_CACHING = 1 << 8
 This flag prevents caching on disk (or other persistent media), which may be needed to preserve privacy.
const unsigned long LOAD_BYPASS_CACHE = 1 << 9
 Force an end-to-end download of content data from the origin server.
const unsigned long LOAD_FROM_CACHE = 1 << 10
 Load from the cache, bypassing protocol specific validation logic.
const unsigned long VALIDATE_ALWAYS = 1 << 11
 The following flags control the frequency of cached content validation when neither LOAD_BYPASS_CACHE or LOAD_FROM_CACHE are set.
const unsigned long VALIDATE_NEVER = 1 << 12
const unsigned long VALIDATE_ONCE_PER_SESSION = 1 << 13

Protected Member Functions

nsresult OnLDAPSearchResult (nsILDAPMessage *aMessage)
nsresult OnLDAPSearchEntry (nsILDAPMessage *aMessage)
nsresult OnLDAPBind (nsILDAPMessage *aMessage)

Protected Attributes

nsresult mStatus
nsCOMPtr< nsIURImURI
nsCOMPtr< nsILoadGroupmUnproxiedLoadGroup
nsCOMPtr< nsIInterfaceRequestormCallbacks
nsCOMPtr< nsIURImOriginalURI
nsLoadFlags mLoadFlags
nsCOMPtr< nsISupports > mOwner
nsCOMPtr< nsIStreamListenermUnproxiedListener
nsCOMPtr< nsILoadGroupmLoadGroup
nsCOMPtr< nsILDAPConnectionmConnection
nsCOMPtr< nsIStreamListenermListener
nsCOMPtr< nsISupports > mResponseContext
nsCOMPtr< nsIInputStreammReadPipeIn
nsCOMPtr< nsIOutputStreammReadPipeOut
nsCOMPtr< nsILDAPOperationmCurrentOperation
PRUint32 mReadPipeOffset
PRBool mReadPipeClosed
nsCOMPtr< nsILDAPMessageListenermCallback
nsCOMPtr< nsIProgressEventSinkmEventSink

Detailed Description

Definition at line 65 of file nsLDAPChannel.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIREQUEST NS_DECL_NSICHANNEL NS_DECL_NSILDAPMESSAGELISTENER nsLDAPChannel::nsLDAPChannel ( )

Here is the caller graph for this function:

Definition at line 73 of file nsLDAPChannel.cpp.

{
}

Member Function Documentation

void nsIChannel::asyncOpen ( in nsIStreamListener  aListener,
in nsISupports  aContext 
) [inherited]

Asynchronously open this channel.

Data is fed to the specified stream listener as it becomes available. The stream listener's methods are called on the thread that calls asyncOpen and are not called until after asyncOpen returns.

Parameters:
aListenerthe nsIStreamListener implementation
aContextan opaque parameter forwarded to aListener's methods
void nsIRequest::cancel ( in nsresult  aStatus) [inherited]

Cancels the current request.

This will close any open input or output streams and terminate any async requests. Users should normally pass NS_BINDING_ABORTED, although other errors may also be passed. The error passed in will become the value of the status attribute.

Parameters:
aStatusthe reason for canceling this request.

NOTE: most nsIRequest implementations expect aStatus to be a failure code; however, some implementations may allow aStatus to be a success code such as NS_OK. In general, aStatus should be a failure code.

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

Definition at line 142 of file nsLDAPChannel.cpp.

{
    nsresult rv;

    if (aOuter)
        return NS_ERROR_NO_AGGREGATION;

    nsLDAPChannel* ldapChannel = new nsLDAPChannel();
    if (!ldapChannel)
        return NS_ERROR_OUT_OF_MEMORY;

    NS_ADDREF(ldapChannel);
    rv = ldapChannel->QueryInterface(aIID, aResult);
    NS_RELEASE(ldapChannel);
    return rv;
}

Here is the call graph for this function:

Definition at line 80 of file nsLDAPChannel.cpp.

{
    nsresult rv;

    mStatus = NS_OK;
    mURI = uri;
    mLoadFlags = LOAD_NORMAL;
    mReadPipeOffset = 0;
    mReadPipeClosed = PR_FALSE;

    // create an LDAP connection
    //
    mConnection = do_CreateInstance("@mozilla.org/network/ldap-connection;1", 
                                    &rv);
    if (NS_FAILED(rv)) {
        NS_ERROR("nsLDAPChannel::Init(): could not create "
                 "@mozilla.org/network/ldap-connection;1");
        return NS_ERROR_FAILURE;
    }

    // i think that in the general case, it will be worthwhile to leave the
    // callbacks for this channel be invoked on the LDAP connection thread.
    // however, for the moment, I want to leave the code that invokes it on
    // the main thread here (though turned off), because it provides a 
    // useful demonstration of why PLEvents' lack of priorities hurts us 
    // (in this case in ldap: searches that return a lot of results).
    //
#if INVOKE_LDAP_CALLBACKS_ON_MAIN_THREAD

    // get the proxy object manager
    //
    nsCOMPtr<nsIProxyObjectManager> proxyObjMgr = 
        do_GetService("@mozilla.org/xpcomproxy;1", &rv);
    if (NS_FAILED(rv)) {
        NS_ERROR("nsLDAPChannel::Init(): could not create "
                 "proxy object manager");
        return NS_ERROR_FAILURE;
    }

    // and use it to get a proxy for this callback, saving it off in mCallback
    //
    rv = proxyObjMgr->GetProxyForObject(NS_UI_THREAD_EVENTQ,
                                        kILDAPMessageListenerIID,
                                        NS_STATIC_CAST(nsILDAPMessageListener *
                                                       , this),
                                        PROXY_ASYNC|PROXY_ALWAYS,
                                        getter_AddRefs(mCallback));
    if (NS_FAILED(rv)) {
        NS_ERROR("nsLDAPChannel::Init(): could not create proxy object");
        return NS_ERROR_FAILURE;
    }

#else   
    mCallback = this;
#endif
    
    return NS_OK;
}

Here is the call graph for this function:

boolean nsIRequest::isPending ( ) [inherited]

Indicates whether the request is pending.

nsIRequest::isPending is true when there is an outstanding asynchronous event that will make the request no longer be pending. Requests do not necessarily start out pending; in some cases, requests have to be explicitly initiated (e.g. nsIChannel implementations are only pending once asyncOpen returns successfully).

Requests can become pending multiple times during their lifetime.

Returns:
TRUE if the request has yet to reach completion.
FALSE if the request has reached completion (e.g., after OnStopRequest has fired).
Note:
Suspended requests are still considered pending.
nsresult nsLDAPChannel::OnLDAPBind ( nsILDAPMessage aMessage) [protected]

Definition at line 767 of file nsLDAPChannel.cpp.

{
    nsCOMPtr<nsILDAPURL> url;
    nsCAutoString baseDn;
    nsCAutoString filter;
    PRInt32 scope;
    nsresult rv;

    // XXX should call ldap_parse_result() here

    mCurrentOperation = 0;  // done with bind op; make nsCOMPtr release it

    // create and initialize an LDAP operation (to be used for the search
    //  
    mCurrentOperation = do_CreateInstance(
        "@mozilla.org/network/ldap-operation;1", &rv);
    if (NS_FAILED(rv)) {
        NS_ERROR("nsLDAPChannel::OnLDAPBind(): couldn't create "
                 "@mozilla.org/network/ldap-operation;1");
        // XXX abort entire asyncread
        return NS_ERROR_FAILURE;
    }

    rv = mCurrentOperation->Init(mConnection, mCallback, nsnull);
    NS_ENSURE_SUCCESS(rv, rv);

    // QI() the URI to an nsILDAPURL so we get can the LDAP specific portions
    //
    url = do_QueryInterface(mURI, &rv);
    NS_ENSURE_SUCCESS(rv, rv);

    // get a base DN.  
    // XXXdmose - is it reasonable to barf on an empty dn?
    //
    rv = url->GetDn(baseDn);
    NS_ENSURE_SUCCESS(rv, rv);
    if (baseDn.IsEmpty()) {
        return NS_ERROR_MALFORMED_URI;
    }

    // get the scope
    //
    rv = url->GetScope(&scope);
    NS_ENSURE_SUCCESS(rv, rv);

    // and the filter 
    //
    rv = url->GetFilter(filter);
    NS_ENSURE_SUCCESS(rv, rv);

    // time to kick off the search.
    //
    // XXX what about timeouts? 
    // XXX failure is a reasonable thing; don't assert
    //
    PR_LOG(gLDAPLogModule, PR_LOG_DEBUG, 
           ("bind completed; starting search\n"));
    rv = mCurrentOperation->SearchExt(baseDn, scope, filter, 0, 0, 0,
                                      LDAP_NO_LIMIT);
    NS_ENSURE_SUCCESS(rv,rv);
    
    return NS_OK;
}

Here is the call graph for this function:

Notify the listener that the Init has completed, passing in the results from the connection initialization.

The Reason for this is to allow us to do asynchronous DNS lookups, preresolving hostnames.

  • aConn The LDAP connection in question
  • aStatus The result from the LDAP connection init

Messages received are passed back via this function.

  • aMessage The message that was returned, NULL if none was.

XXX semantics of NULL?

Definition at line 909 of file nsLDAPChannel.cpp.

{
    nsresult rv;
    nsCAutoString dn;
    nsCString entry;

    PR_LOG(gLDAPLogModule, PR_LOG_DEBUG, ("entry returned!\n"));

    // get the DN
    // XXX better err handling
    //
    rv = aMessage->GetDn(dn);
    NS_ENSURE_SUCCESS(rv, rv);

    entry.SetCapacity(256);
    entry = NS_LITERAL_CSTRING("dn: ") + dn + NS_LITERAL_CSTRING("\n");

    char **attrs;
    PRUint32 attrCount;

    // get an array of all the attribute names
    // XXX better error-handling
    //
    rv = aMessage->GetAttributes(&attrCount, &attrs);
    NS_ENSURE_SUCCESS(rv, rv);

    // XXX is this an error?  should log in non-debug console too?
    //
    if (!attrCount) {
        NS_WARNING("Warning: entry received with no attributes");
    }

    // iterate through the attributes
    //
    for ( PRUint32 i=0 ; i < attrCount ; i++ ) {

        PRUnichar **vals;
        PRUint32 valueCount;

        // get the values of this attribute
        // XXX better failure handling
        //
        rv = aMessage->GetValues(attrs[i], &valueCount, &vals);
        if (NS_FAILED(rv)) {
            NS_WARNING("nsLDAPChannel:OnLDAPSearchEntry(): "
                       "aMessage->GetValues() failed\n");
            NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(attrCount, attrs);
            return rv;;
        }

        // print all values of this attribute
        //
        for ( PRUint32 j=0 ; j < valueCount; j++ ) {
            entry.Append(attrs[i]);
            entry.Append(": ");
            AppendUTF16toUTF8(vals[j], entry);
            entry.Append('\n');
        }
        NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(valueCount, vals);

    }
    NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(attrCount, attrs);

    // XXXdmose better error handling
    //
    if (NS_FAILED(rv)) {
        PR_LOG(gLDAPLogModule, PR_LOG_ERROR, 
               ("aMessage: error getting attribute\n"));
        return rv;
    }

    // separate this entry from the next
    //
    entry.Append('\n');

    // do the write
    // XXX better err handling
    //
    PRUint32 bytesWritten = 0;
    PRUint32 entryLength = entry.Length();

    rv = mReadPipeOut->Write(entry.get(), entryLength, &bytesWritten);
    NS_ENSURE_SUCCESS(rv, rv);

    // short writes shouldn't happen on blocking pipes!
    // XXX runtime error handling too
    //
    NS_ASSERTION(bytesWritten == entryLength, 
                 "nsLDAPChannel::OnLDAPSearchEntry(): "
                 "internal error: blocking pipe returned a short write");

    // XXXdmose deal more gracefully with an error here
    //
    rv = mListener->OnDataAvailable(this, mResponseContext, mReadPipeIn, 
                                    mReadPipeOffset, entryLength);
    NS_ENSURE_SUCCESS(rv, rv);

    mReadPipeOffset += entryLength;

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 842 of file nsLDAPChannel.cpp.

{
    PRInt32 errorCode;  // the LDAP error code
    nsresult rv;

    PR_LOG(gLDAPLogModule, PR_LOG_DEBUG, ("result returned\n"));

    // XXX should use GetErrorString here?
    //
    rv = aMessage->GetErrorCode(&errorCode);
    if ( NS_FAILED(rv) ) {
        NS_ERROR(ldap_err2string(errorCode));
        return NS_ERROR_FAILURE;
    }

    // we're done with the current operation.  cause nsCOMPtr to Release() it
    // so that if nsLDAPChannel::Cancel gets called, that doesn't try to call 
    // mCurrentOperation->Abandon().
    //
    mCurrentOperation = 0;

    // if the read pipe exists and hasn't already been closed, close it
    //
    if (mReadPipeOut != 0 && !mReadPipeClosed) {

        // if this fails in a non-debug build, there's not much we can do
        //
        rv = mReadPipeOut->Close();
        NS_ASSERTION(NS_SUCCEEDED(rv), "nsLDAPChannel::OnLDAPSearchResult(): "
                     "mReadPipeOut->Close() failed");
    }

    // remove self from loadgroup to stop the throbber
    //
    if (mLoadGroup) {
        rv = mLoadGroup->RemoveRequest(NS_STATIC_CAST(nsIRequest *, this), 
                                       mResponseContext, NS_OK);
        if (NS_FAILED(rv)) {
            NS_WARNING("nsLDAPChannel::OnSearchResult(): "
                       "mLoadGroup->RemoveChannel() failed");
            return rv;
        }
    }

    // call listener's onstoprequest
    //
    if (mListener) {
        rv = mListener->OnStopRequest(this, mResponseContext, NS_OK);
        if (NS_FAILED(rv)) {
            NS_WARNING("nsLDAPChannel::OnSearchResult(): "
                       "mListener->OnStopRequest failed\n");
            return rv;
        }
    }

    // Drop notification callbacks to prevent cycles.
    mCallbacks = nsnull;
    mEventSink = nsnull;

    return NS_OK;
}

Here is the call graph for this function:

Synchronously open the channel.

Returns:
blocking input stream to the channel's data.

NOTE: nsIChannel implementations are not required to implement this method. Moreover, since this method may block the calling thread, it should not be called on a thread that processes UI events.

void nsIRequest::resume ( ) [inherited]

Resumes the current request.

This may have the effect of re-opening any underlying transport and will resume the delivery of data to any open streams.

void nsIRequest::suspend ( ) [inherited]

Suspends the current request.

This may have the effect of closing any underlying transport (in order to free up resources), although any open streams remain logically opened and will continue delivering data when the transport is resumed.

NOTE: some implementations are unable to immediately suspend, and may continue to deliver events already posted to an event queue. In general, callers should be capable of handling events even after suspending a request.


Member Data Documentation

attribute ACString nsIChannel::contentCharset [inherited]

The character set of the channel's content if available and if applicable.

This attribute only applies to textual data.

The value of the contentCharset attribute is a mixedcase string.

Definition at line 148 of file nsIChannel.idl.

The length of the data associated with the channel if available.

A value of -1 indicates that the content length is unknown.

Callers should prefer getting the "content-length" property as 64-bit value by QIing the channel to nsIPropertyBag2, if that interface is exposed by the channel.

Definition at line 158 of file nsIChannel.idl.

attribute ACString nsIChannel::contentType [inherited]

The MIME type of the channel's content if available.

NOTE: the content type can often be wrongly specified (e.g., wrong file extension, wrong MIME type, wrong document type stored on a server, etc.), and the caller most likely wants to verify with the actual data.

Setting contentType before the channel has been opened provides a hint to the channel as to what the MIME type is. The channel may ignore this hint in deciding on the actual MIME type that it will report.

Setting contentType after onStartRequest has been fired or after open() is called will override the type determined by the channel.

Setting contentType between the time that asyncOpen() is called and the time when onStartRequest is fired has undefined behavior at this time.

The value of the contentType attribute is a lowercase string. A value assigned to this attribute will be parsed and normalized as follows: 1- any parameters (delimited with a ';') will be stripped. 2- if a charset parameter is given, then its value will replace the the contentCharset attribute of the channel. 3- the stripped contentType will be lowercased. Any implementation of nsIChannel must follow these rules.

Definition at line 140 of file nsIChannel.idl.

const unsigned long nsIRequest::INHIBIT_CACHING = 1 << 7 [inherited]

This flag prevents caching of any kind.

It does not, however, prevent cached content from being used to satisfy this request.

Definition at line 153 of file nsIRequest.idl.

const unsigned long nsIRequest::INHIBIT_PERSISTENT_CACHING = 1 << 8 [inherited]

This flag prevents caching on disk (or other persistent media), which may be needed to preserve privacy.

For HTTPS, this flag is set auto- matically.

Definition at line 160 of file nsIRequest.idl.

const unsigned long nsIRequest::LOAD_BACKGROUND = 1 << 0 [inherited]

Don't deliver status notifications to the nsIProgressEventSink, or keep this load from completing the nsILoadGroup it may belong to.

Definition at line 143 of file nsIRequest.idl.

const unsigned long nsIRequest::LOAD_BYPASS_CACHE = 1 << 9 [inherited]

Force an end-to-end download of content data from the origin server.

This flag is used for a shift-reload.

Definition at line 172 of file nsIRequest.idl.

const unsigned long nsIChannel::LOAD_CALL_CONTENT_SNIFFERS = 1 << 21 [inherited]

If this flag is set, the channel should call the content sniffers as described in nsNetCID.h about NS_CONTENT_SNIFFER_CATEGORY.

Note: Channels may ignore this flag; however, new channel implementations should only do so with good reason.

Definition at line 227 of file nsIChannel.idl.

const unsigned long nsIChannel::LOAD_DOCUMENT_URI = 1 << 16 [inherited]

Set (e.g., by the docshell) to indicate whether or not the channel corresponds to a document URI.

Definition at line 193 of file nsIChannel.idl.

const unsigned long nsIRequest::LOAD_FROM_CACHE = 1 << 10 [inherited]

Load from the cache, bypassing protocol specific validation logic.

This flag is used when browsing via history. It is not recommended for normal browsing as it may likely violate reasonable assumptions made by the server and confuse users.

Definition at line 180 of file nsIRequest.idl.

const unsigned long nsIChannel::LOAD_INITIAL_DOCUMENT_URI = 1 << 19 [inherited]

Set (e.g., by the docshell) to indicate whether or not the channel corresponds to an initial document URI load (e.g., link click).

Definition at line 212 of file nsIChannel.idl.

const unsigned long nsIRequest::LOAD_NORMAL = 0 [inherited]

No special load flags:

Definition at line 137 of file nsIRequest.idl.

const unsigned long nsIChannel::LOAD_REPLACE = 1 << 18 [inherited]

This flag is set to indicate that onStopRequest may be followed by another onStartRequest/onStopRequest pair.

This flag is, for example, used by the multipart/replace stream converter.

Definition at line 206 of file nsIChannel.idl.

const unsigned long nsIChannel::LOAD_RETARGETED_DOCUMENT_URI = 1 << 17 [inherited]

If the end consumer for this load has been retargeted after discovering it's content, this flag will be set:

Definition at line 199 of file nsIChannel.idl.

const unsigned long nsIChannel::LOAD_TARGETED = 1 << 20 [inherited]

Set (e.g., by the URILoader) to indicate whether or not the end consumer for this load has been determined.

Definition at line 218 of file nsIChannel.idl.

The load flags of this request.

Bits 0-15 are reserved.

When added to a load group, this request's load flags are merged with the load flags of the load group.

Definition at line 128 of file nsIRequest.idl.

The load group of this request.

While pending, the request is a member of the load group. It is the responsibility of the request to implement this policy.

Definition at line 120 of file nsIRequest.idl.

Definition at line 115 of file nsLDAPChannel.h.

Definition at line 97 of file nsLDAPChannel.h.

Definition at line 106 of file nsLDAPChannel.h.

Definition at line 112 of file nsLDAPChannel.h.

Definition at line 116 of file nsLDAPChannel.h.

Definition at line 107 of file nsLDAPChannel.h.

Definition at line 99 of file nsLDAPChannel.h.

Definition at line 105 of file nsLDAPChannel.h.

Definition at line 98 of file nsLDAPChannel.h.

nsCOMPtr<nsISupports> nsLDAPChannel::mOwner [protected]

Definition at line 100 of file nsLDAPChannel.h.

Definition at line 114 of file nsLDAPChannel.h.

Definition at line 110 of file nsLDAPChannel.h.

Definition at line 113 of file nsLDAPChannel.h.

Definition at line 111 of file nsLDAPChannel.h.

nsCOMPtr<nsISupports> nsLDAPChannel::mResponseContext [protected]

Definition at line 109 of file nsLDAPChannel.h.

Definition at line 94 of file nsLDAPChannel.h.

Definition at line 104 of file nsLDAPChannel.h.

Definition at line 96 of file nsLDAPChannel.h.

Definition at line 95 of file nsLDAPChannel.h.

readonly attribute AUTF8String nsIRequest::name [inherited]

The name of the request.

Often this is the URI of the request.

Definition at line 55 of file nsIRequest.idl.

The notification callbacks for the channel.

This is set by clients, who wish to provide a means to receive progress, status and protocol-specific notifications. If this value is NULL, the channel implementation may use the notification callbacks from its load group. The channel may also query the notification callbacks from its load group if its notification callbacks do not supply the requested interface.

Interfaces commonly requested include: nsIProgressEventSink, nsIPrompt, and nsIAuthPrompt.

When the channel is done, it must not continue holding references to this object.

NOTE: A channel implementation should take care when "caching" an interface pointer queried from its notification callbacks. If the notification callbacks are changed, then a cached interface pointer may become invalid and may therefore need to be re-queried.

Definition at line 108 of file nsIChannel.idl.

The original URI used to construct the channel.

This is used in the case of a redirect or URI "resolution" (e.g. resolving a resource: URI to a file: URI) so that the original pre-redirect URI can still be obtained.

NOTE: this is distinctly different from the http Referer (referring URI), which is typically the page that contained the original URI (accessible from nsIHttpChannel).

Definition at line 71 of file nsIChannel.idl.

attribute nsISupports nsIChannel::owner [inherited]

The owner, corresponding to the entity that is responsible for this channel.

Used by the security manager to grant or deny privileges to mobile code loaded from this channel.

NOTE: this is a strong reference to the owner, so if the owner is also holding a strong reference to the channel, care must be taken to explicitly drop its reference to the channel.

Definition at line 87 of file nsIChannel.idl.

readonly attribute nsISupports nsIChannel::securityInfo [inherited]

Transport-level security information (if any) corresponding to the channel.

Definition at line 113 of file nsIChannel.idl.

readonly attribute nsresult nsIRequest::status [inherited]

The error status associated with the request.

Definition at line 77 of file nsIRequest.idl.

readonly attribute nsIURI nsIChannel::URI [inherited]

The URI corresponding to the channel.

Its value is immutable.

Definition at line 76 of file nsIChannel.idl.

const unsigned long nsIRequest::VALIDATE_ALWAYS = 1 << 11 [inherited]

The following flags control the frequency of cached content validation when neither LOAD_BYPASS_CACHE or LOAD_FROM_CACHE are set.

By default, cached content is automatically validated if necessary before reuse.

VALIDATE_ALWAYS forces validation of any cached content independent of its expiration time.

VALIDATE_NEVER disables validation of expired content.

VALIDATE_ONCE_PER_SESSION disables validation of expired content, provided it has already been validated (at least once) since the start of this session.

NOTE TO IMPLEMENTORS: These flags are intended for normal browsing, and they should therefore not apply to content that must be validated before each use. Consider, for example, a HTTP response with a "Cache-control: no-cache" header. According to RFC2616, this response must be validated before it can be taken from a cache. Breaking this requirement could result in incorrect and potentially undesirable side-effects.

Definition at line 204 of file nsIRequest.idl.

const unsigned long nsIRequest::VALIDATE_NEVER = 1 << 12 [inherited]

Definition at line 205 of file nsIRequest.idl.

const unsigned long nsIRequest::VALIDATE_ONCE_PER_SESSION = 1 << 13 [inherited]

Definition at line 206 of file nsIRequest.idl.


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