Back to index

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

#include <nsLDAPMessage.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSILDAPMESSAGE 
nsLDAPMessage ()
virtual ~nsLDAPMessage ()
void getAttributes (out unsigned long count,[retval, array, size_is(count)] out string aAttributes)
 Get all the attributes in this message.
void getValues (in string attr, out unsigned long count,[retval, array, size_is(count)] out wstring values)
 Get an array of all the attribute values in this message.
wstring toUnicode ()
 get an LDIF-like string representation of this message
void getBinaryValues (in string attr, out unsigned long count,[retval, array, size_is(count)] out nsILDAPBERValue values)
 Get an array of all the attribute values in this message (a wrapper around the LDAP C SDK's get_values_len()).

Public Attributes

readonly attribute AUTF8String dn
 The Distinguished Name of the entry associated with this message.
readonly attribute nsILDAPOperation operation
 The operation this message originated from.
readonly attribute long errorCode
 The result code (aka lderrno) for this message.
readonly attribute long type
 The result type of this message.
const long RES_BIND = 0x61
 Result of a bind operation.
const long RES_SEARCH_ENTRY = 0x64
 An entry found in an search operation.
const long RES_SEARCH_REFERENCE = 0x73
 An LDAPv3 search reference (a referral to another server)
const long RES_SEARCH_RESULT = 0x65
 The result of a search operation (i.e.
const long RES_MODIFY = 0x67
 The result of a modify operation.
const long RES_ADD = 0x69
 The result of an add operation.
const long RES_DELETE = 0x6B
 The result of a delete operation.
const long RES_MODDN = 0x6D
 The result of an modify DN operation.
const long RES_COMPARE = 0x6F
 The result of a compare operation.
const long RES_EXTENDED = 0x78
 The result of an LDAPv3 extended operation.
readonly attribute AUTF8String errorMessage
 Additional error information optionally sent by the server.
readonly attribute AUTF8String matchedDn
 In LDAPv3, when the server returns any of the following errors: NO_SUCH_OBJECT, ALIAS_PROBLEM, INVALID_DN_SYNTAX, ALIAS_DEREF_PROBLEM, it also returns the closest existing DN to the entry requested.

Protected Member Functions

nsresult IterateAttrErrHandler (PRInt32 aLderrno, PRUint32 *aAttrCount, char ***aAttributes, BerElement *position)
nsresult IterateAttributes (PRUint32 *aAttrCount, char ***aAttributes, PRBool getP)
nsresult Init (nsILDAPConnection *aConnection, LDAPMessage *aMsgHandle)
 Initializes a message.

Protected Attributes

LDAPMessage * mMsgHandle
nsCOMPtr< nsILDAPOperationmOperation
LDAP * mConnectionHandle
nsCOMPtr< nsILDAPConnectionmConnection
int mErrorCode
char * mMatchedDn
char * mErrorMessage
char ** mReferrals
LDAPControl ** mServerControls

Friends

class nsLDAPOperation
class nsLDAPConnection
class nsLDAPConnectionLoop
PRBool PR_CALLBACK CheckLDAPOperationResult (nsHashKey *aKey, void *aData, void *aClosure)

Detailed Description

Definition at line 55 of file nsLDAPMessage.h.


Constructor & Destructor Documentation

Definition at line 75 of file nsLDAPMessage.cpp.

{
    if (mMsgHandle) {
        int rc = ldap_msgfree(mMsgHandle);

// If you are having problems compiling the following code on a Solaris
// machine with the Forte 6 Update 1 compilers, then you need to make 
// sure you have applied all the required patches. See:
// http://www.mozilla.org/unix/solaris-build.html for more details.

        switch(rc) {
        case LDAP_RES_BIND:
        case LDAP_RES_SEARCH_ENTRY:
        case LDAP_RES_SEARCH_RESULT:
        case LDAP_RES_MODIFY:
        case LDAP_RES_ADD:
        case LDAP_RES_DELETE:
        case LDAP_RES_MODRDN:
        case LDAP_RES_COMPARE:
        case LDAP_RES_SEARCH_REFERENCE:
        case LDAP_RES_EXTENDED:
        case LDAP_RES_ANY:
            // success
            break;

        case LDAP_SUCCESS:
            // timed out (dunno why LDAP_SUCCESS is used to indicate this) 
            PR_LOG(gLDAPLogModule, PR_LOG_WARNING, 
                   ("nsLDAPMessage::~nsLDAPMessage: ldap_msgfree() "
                    "timed out\n"));
            break;

        default:
            // other failure
            PR_LOG(gLDAPLogModule, PR_LOG_WARNING, 
                   ("nsLDAPMessage::~nsLDAPMessage: ldap_msgfree() "
                    "failed: %s\n", ldap_err2string(rc)));
            break;
        }
    }

    if (mMatchedDn) {
        ldap_memfree(mMatchedDn);
    }

    if (mErrorMessage) {
        ldap_memfree(mErrorMessage);
    }

    if (mReferrals) {
        ldap_value_free(mReferrals);
    }

    if (mServerControls) {
        ldap_controls_free(mServerControls);
    }

}

Here is the call graph for this function:


Member Function Documentation

void nsILDAPMessage::getAttributes ( out unsigned long  count,
[retval, array, size_is(count)] out string  aAttributes 
) [inherited]

Get all the attributes in this message.

Exceptions:
NS_ERROR_OUT_OF_MEMORY
NS_ERROR_ILLEGAL_VALUEnull pointer passed in
NS_ERROR_UNEXPECTEDbug or memory corruption
NS_ERROR_LDAP_DECODING_ERRORproblem during BER decoding
Returns:
array of all attributes in the current message
void nsILDAPMessage::getBinaryValues ( in string  attr,
out unsigned long  count,
[retval, array, size_is(count)] out nsILDAPBERValue  values 
) [inherited]

Get an array of all the attribute values in this message (a wrapper around the LDAP C SDK's get_values_len()).

Parameters:
attrThe attribute whose values are to be returned
countNumber of values in the outbound array.
valuesArray of nsILDAPBERValue objects
Exceptions:
NS_ERROR_UNEXPECTEDBug or memory corruption
NS_ERROR_LDAP_DECODING_ERRORAttribute not found or other decoding error.
NS_ERROR_OUT_OF_MEMORY
void nsILDAPMessage::getValues ( in string  attr,
out unsigned long  count,
[retval, array, size_is(count)] out wstring  values 
) [inherited]

Get an array of all the attribute values in this message.

Parameters:
attrThe attribute whose values are to be returned
countNumber of values in the outbound array.
valuesArray of values
Exceptions:
NS_ERROR_UNEXPECTEDBug or memory corruption
NS_ERROR_LDAP_DECODING_ERRORAttribute not found or other decoding error.
NS_ERROR_OUT_OF_MEMORY
nsresult nsLDAPMessage::Init ( nsILDAPConnection aConnection,
LDAPMessage *  aMsgHandle 
) [protected]

Initializes a message.

Parameters:
aConnectionThe nsLDAPConnection this message is on
aMsgHandleThe native LDAPMessage to be wrapped.
Exceptions:
NS_ERROR_ILLEGAL_VALUEnull pointer passed in
NS_ERROR_UNEXPECTEDinternal err; shouldn't happen
NS_ERROR_LDAP_DECODING_ERRORproblem during BER decoding
NS_ERROR_OUT_OF_MEMORYran out of memory

Definition at line 146 of file nsLDAPMessage.cpp.

{
    int parseResult; 

    if (!aConnection || !aMsgHandle) {
        NS_WARNING("Null pointer passed in to nsLDAPMessage::Init()");
        return NS_ERROR_ILLEGAL_VALUE;
    }

    // initialize the appropriate member vars
    //
    mConnection = aConnection;
    mMsgHandle = aMsgHandle;

    // cache the connection handle.  we're violating the XPCOM type-system
    // here since we're a friend of the connection class and in the 
    // same module.
    //
    mConnectionHandle = NS_STATIC_CAST(nsLDAPConnection *, 
                                            aConnection)->mConnectionHandle;

    // do any useful message parsing
    //
    const int msgType = ldap_msgtype(mMsgHandle);
    if ( msgType == -1) {
        NS_ERROR("nsLDAPMessage::Init(): ldap_msgtype() failed");
        return NS_ERROR_UNEXPECTED;
    }

    switch (msgType) {

    case LDAP_RES_SEARCH_REFERENCE:
        // XXX should do something here?
        break;

    case LDAP_RES_SEARCH_ENTRY:
        // nothing to do here
        break;

    case LDAP_RES_EXTENDED:
        // XXX should do something here?
        break;

    case LDAP_RES_BIND:
    case LDAP_RES_SEARCH_RESULT:
    case LDAP_RES_MODIFY:
    case LDAP_RES_ADD:
    case LDAP_RES_DELETE:
    case LDAP_RES_MODRDN:
    case LDAP_RES_COMPARE:
        parseResult = ldap_parse_result(mConnectionHandle, 
                                        mMsgHandle, &mErrorCode, &mMatchedDn,
                                        &mErrorMessage,&mReferrals, 
                                        &mServerControls, 0);
        switch (parseResult) {
        case LDAP_SUCCESS: 
            // we're good
            break;

        case LDAP_DECODING_ERROR:
            NS_WARNING("nsLDAPMessage::Init(): ldap_parse_result() hit a "
                       "decoding error");
            return NS_ERROR_LDAP_DECODING_ERROR;

        case LDAP_NO_MEMORY:
            NS_WARNING("nsLDAPMessage::Init(): ldap_parse_result() ran out " 
                       "of memory");
            return NS_ERROR_OUT_OF_MEMORY;

        case LDAP_PARAM_ERROR:
        case LDAP_MORE_RESULTS_TO_RETURN:
        case LDAP_NO_RESULTS_RETURNED:
        default:
            NS_ERROR("nsLDAPMessage::Init(): ldap_parse_result returned "
                     "unexpected return code");
            return NS_ERROR_UNEXPECTED;
        }

        break;

    default:
        NS_ERROR("nsLDAPMessage::Init(): unexpected message type");
        return NS_ERROR_UNEXPECTED;
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsLDAPMessage::IterateAttrErrHandler ( PRInt32  aLderrno,
PRUint32 aAttrCount,
char ***  aAttributes,
BerElement *  position 
) [protected]

Definition at line 271 of file nsLDAPMessage.cpp.

{

    // if necessary, free the position holder used by 
    // ldap_{first,next}_attribute()  
    //
    if (position) {
        ldap_ber_free(position, 0);
    }

    // deallocate any entries in the array that have been allocated, then
    // the array itself
    //
    if (*aAttributes) {
        NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(*aAttrCount, *aAttributes);
    }

    // possibly spit out a debugging message, then return an appropriate
    // error code
    //
    switch (aLderrno) {

    case LDAP_PARAM_ERROR:
        NS_WARNING("nsLDAPMessage::IterateAttributes() failure; probable bug "
                   "or memory corruption encountered");
        return NS_ERROR_UNEXPECTED;
        break;

    case LDAP_DECODING_ERROR:
        NS_WARNING("nsLDAPMessage::IterateAttributes(): decoding error");
        return NS_ERROR_LDAP_DECODING_ERROR;
        break;

    case LDAP_NO_MEMORY:
        return NS_ERROR_OUT_OF_MEMORY;
        break;

    }

    NS_WARNING("nsLDAPMessage::IterateAttributes(): LDAP C SDK returned "
               "unexpected value; possible bug or memory corruption");
    return NS_ERROR_UNEXPECTED;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsLDAPMessage::IterateAttributes ( PRUint32 aAttrCount,
char ***  aAttributes,
PRBool  getP 
) [protected]

Definition at line 332 of file nsLDAPMessage.cpp.

{
    BerElement *position;
    nsresult rv;

    if (!aAttrCount || !aAttributes ) {
        return NS_ERROR_INVALID_POINTER;
    }

    // if we've been called from GetAttributes, recurse once in order to
    // count the elements in this message.
    //
    if (getP) {
        *aAttributes = 0;
        *aAttrCount = 0;

        rv = IterateAttributes(aAttrCount, aAttributes, PR_FALSE);
        if (NS_FAILED(rv))
            return rv;

        // create an array of the appropriate size
        //
        *aAttributes = NS_STATIC_CAST(char **, 
                                      nsMemory::Alloc(*aAttrCount *
                                                      sizeof(char *)));
        if (!*aAttributes) {
            return NS_ERROR_OUT_OF_MEMORY;
        }
    } 

    // get the first attribute
    //
    char *attr = ldap_first_attribute(mConnectionHandle, 
                                      mMsgHandle, 
                                      &position);
    if (!attr) {
        return IterateAttrErrHandler(ldap_get_lderrno(mConnectionHandle, 0, 0),
                                     aAttrCount, aAttributes, position);
    }

    // if we're getting attributes, try and fill in the first field
    //
    if (getP) {
        (*aAttributes)[0] = nsCRT::strdup(attr);
        if (!(*aAttributes)[0]) {
            ldap_memfree(attr);
            nsMemory::Free(*aAttributes);
            return NS_ERROR_OUT_OF_MEMORY;
        }

        // note that we start counting again, in order to keep our place in 
        // the array so that we can unwind gracefully and avoid leakage if
        // we hit an error as we're filling in the array
        //
        *aAttrCount = 1;
    } else {

        // otherwise just update the count
        //
        *aAttrCount = 1;
    }
    ldap_memfree(attr);

    while (1) {
    
        // get the next attribute
        //
        attr = ldap_next_attribute(mConnectionHandle, mMsgHandle, position);

        // check to see if there is an error, or if we're just done iterating
        //
        if (!attr) {
            
            // bail out if there's an error
            //
            PRInt32 lderrno = ldap_get_lderrno(mConnectionHandle, 0, 0);
            if (lderrno != LDAP_SUCCESS) {
                return IterateAttrErrHandler(lderrno, aAttrCount, aAttributes, 
                                             position);
            }

            // otherwise, there are no more attributes; we're done with
            // the while loop
            //
            break;

        } else if (getP) {

            // if ldap_next_attribute did return successfully, and 
            // we're supposed to fill in a value, do so.
            //
            (*aAttributes)[*aAttrCount] = nsCRT::strdup(attr);
            if (!(*aAttributes)[*aAttrCount]) {
                ldap_memfree(attr);
                return IterateAttrErrHandler(LDAP_NO_MEMORY, aAttrCount, 
                                             aAttributes, position);
            }
       
        }
        ldap_memfree(attr);

        // we're done using *aAttrCount as a c-style array index (ie starting
        // at 0).  update it to reflect the number of elements now in the array
        //
        *aAttrCount += 1;
    }

    // free the position pointer, if necessary
    //
    if (position) {
        ldap_ber_free(position, 0);
    }

    return NS_OK;
}

Here is the call graph for this function:

wstring nsILDAPMessage::toUnicode ( ) [inherited]

get an LDIF-like string representation of this message

Returns:
unicode encoded string representation.

Friends And Related Function Documentation

PRBool PR_CALLBACK CheckLDAPOperationResult ( nsHashKey *  aKey,
void aData,
void aClosure 
) [friend]

Definition at line 597 of file nsLDAPConnection.cpp.

{
    int lderrno;
    nsresult rv;
    PRInt32 returnCode;
    LDAPMessage *msgHandle;
    nsCOMPtr<nsILDAPMessage> msg;
    PRBool operationFinished = PR_TRUE;
    struct timeval timeout = { 1, 0 }; 
    PRIntervalTime sleepTime = PR_MillisecondsToInterval(40);

    // we need to access some of the connection loop's objects
    //
    nsLDAPConnectionLoop *loop = 
        NS_STATIC_CAST(nsLDAPConnectionLoop *, aClosure);

    // get the console service so we can log messages
    //
    nsCOMPtr<nsIConsoleService> consoleSvc = 
        do_GetService(kConsoleServiceContractId, &rv);
    if (NS_FAILED(rv)) {
        NS_ERROR("CheckLDAPOperationResult() couldn't get console service");
        return NS_ERROR_FAILURE;
    }

    returnCode = ldap_result(loop->mRawConn->mConnectionHandle,
                             aKey->HashCode(), LDAP_MSG_ONE,
                                 &timeout, &msgHandle);

        // if we didn't error or timeout, create an nsILDAPMessage
        //      
        switch (returnCode) {

        case 0: // timeout

            // the connection may not exist yet.  sleep for a while
            // to avoid a problem where the LDAP connection/thread isn't 
            // ready quite yet, and we want to avoid a very busy loop.
            //
            PR_Sleep(sleepTime);
            return PR_TRUE;

        case -1: // something went wrong 

        lderrno = ldap_get_lderrno(loop->mRawConn->mConnectionHandle, 0, 0);

            // Sleep briefly, to avoid a very busy loop again.
            //
            PR_Sleep(sleepTime);

            switch (lderrno) {

            case LDAP_SERVER_DOWN:
                // We might want to shutdown the thread here, but it has
                // implications to the user of the nsLDAPConnection, so
                // for now we just ignore it. It's up to the owner of
                // the nsLDAPConnection to detect the error, and then
                // create a new connection.
                //
                PR_LOG(gLDAPLogModule, PR_LOG_DEBUG, 
                       ("CheckLDAPOperationResult(): ldap_result returned" 
                        " LDAP_SERVER_DOWN"));
                break;

            case LDAP_DECODING_ERROR:
                consoleSvc->LogStringMessage(
                    NS_LITERAL_STRING("LDAP: WARNING: decoding error; possible corrupt data received").get());
                NS_WARNING("CheckLDAPOperationResult(): ldaperrno = "
                           "LDAP_DECODING_ERROR after ldap_result()");
                break;

            case LDAP_NO_MEMORY:
                NS_ERROR("CheckLDAPOperationResult(): Couldn't allocate memory"
                         " while getting async operation result");
                // punt and hope things work out better next time around
                break;

            case LDAP_PARAM_ERROR:
                // I think it's possible to hit a race condition where we're
                // continuing to poll for a result after the C SDK connection
                // has removed the operation because the connection has gone
                // dead.  In theory we should fix this.  Practically, it's
                // unclear to me whether it matters.
                //
                NS_WARNING("CheckLDAPOperationResult(): ldap_result returned"
                           " LDAP_PARAM_ERROR");
                break;

            default:
                NS_ERROR("CheckLDAPOperationResult(): lderrno set to "
                           "unexpected value after ldap_result() "
                           "call in nsLDAPConnection::Run()");
                PR_LOG(gLDAPLogModule, PR_LOG_ERROR, 
                       ("lderrno = 0x%x", lderrno));
                break;
            }
            break;

        case LDAP_RES_SEARCH_ENTRY:
        case LDAP_RES_SEARCH_REFERENCE:
            // XXX what should we do with LDAP_RES_SEARCH_EXTENDED?

            // not done yet, so we shouldn't remove the op from the conn q
            operationFinished = PR_FALSE;

            // fall through to default case

        default: // initialize the message and call the callback

            // we want nsLDAPMessage specifically, not a compatible, since
            // we're sharing native objects used by the LDAP C SDK
            //
            nsLDAPMessage *rawMsg;
            NS_NEWXPCOM(rawMsg, nsLDAPMessage);
            if (!rawMsg) {
            NS_ERROR("CheckLDAPOperationResult(): couldn't allocate memory"
                     " for new LDAP message; search entry dropped");
                // punt and hope things work out better next time around
                break;
            }

            // initialize the message, using a protected method not available
            // through nsILDAPMessage (which is why we need the raw pointer)
            //
            rv = rawMsg->Init(loop->mRawConn, msgHandle);

            switch (rv) {

            case NS_OK: {
                PRInt32 errorCode;
                rawMsg->GetErrorCode(&errorCode);
                // maybe a version error, e.g., using v3 on a v2 server.
                // if we're using v3, try v2.
                //
                if (errorCode == LDAP_PROTOCOL_ERROR && 
                   loop->mRawConn->mVersion == nsILDAPConnection::VERSION3) {
                    nsCAutoString password;
                    loop->mRawConn->mVersion = nsILDAPConnection::VERSION2;
                    ldap_set_option(loop->mRawConn->mConnectionHandle,
                          LDAP_OPT_PROTOCOL_VERSION, &loop->mRawConn->mVersion);
                    nsCOMPtr <nsILDAPOperation> operation = 
                      NS_STATIC_CAST(nsILDAPOperation *, 
                          NS_STATIC_CAST(nsISupports *, aData));
                    // we pass in an empty password to tell the operation that 
                    // it should use the cached password.
                    //
                    rv = operation->SimpleBind(password);
                    if (NS_SUCCEEDED(rv)) {
                        operationFinished = PR_FALSE;
                        // we don't want to notify callers that we're done...
                        return PR_TRUE;
                    }
                }
            }
            break;

            case NS_ERROR_LDAP_DECODING_ERROR:
                consoleSvc->LogStringMessage(
                    NS_LITERAL_STRING("LDAP: WARNING: decoding error; possible corrupt data received").get());
            NS_WARNING("CheckLDAPOperationResult(): ldaperrno = "
                           "LDAP_DECODING_ERROR after ldap_result()");
            return PR_TRUE;

            case NS_ERROR_OUT_OF_MEMORY:
                // punt and hope things work out better next time around
            return PR_TRUE;

            case NS_ERROR_ILLEGAL_VALUE:
            case NS_ERROR_UNEXPECTED:
            default:
                // shouldn't happen; internal error
                //
            NS_ERROR("CheckLDAPOperationResult(): nsLDAPMessage::Init() "
                           "returned unexpected value.");

                // punt and hope things work out better next time around
            return PR_TRUE;
            }

            // now let the scoping mechanisms provided by nsCOMPtr manage
            // the reference for us.
            //
            msg = rawMsg;

            // invoke the callback on the nsILDAPOperation corresponding to 
            // this message
            //
        rv = loop->mRawConn->InvokeMessageCallback(msgHandle, msg, 
                                                    operationFinished);
            if (NS_FAILED(rv)) {
            NS_ERROR("CheckLDAPOperationResult(): error invoking message"
                     " callback");
                // punt and hope things work out better next time around
            return PR_TRUE;
            }

            break;
        }       

    return PR_TRUE;
}
friend class nsLDAPConnection [friend]

Definition at line 58 of file nsLDAPMessage.h.

friend class nsLDAPConnectionLoop [friend]

Definition at line 59 of file nsLDAPMessage.h.

friend class nsLDAPOperation [friend]

Definition at line 57 of file nsLDAPMessage.h.


Member Data Documentation

readonly attribute AUTF8String nsILDAPMessage::dn [inherited]

The Distinguished Name of the entry associated with this message.

Exceptions:
NS_ERROR_OUT_OF_MEMORYran out of memory
NS_ERROR_ILLEGAL_VALUEnull pointer passed in
NS_ERROR_LDAP_DECODING_ERRORproblem during BER-decoding
NS_ERROR_UNEXPECTEDbug or memory corruption

Definition at line 56 of file nsILDAPMessage.idl.

The result code (aka lderrno) for this message.

IDL definitions for these constants live in nsILDAPErrors.idl.

Exceptions:
NS_ERROR_ILLEGAL_VALUEnull pointer passed in

Definition at line 100 of file nsILDAPMessage.idl.

readonly attribute AUTF8String nsILDAPMessage::errorMessage [inherited]

Additional error information optionally sent by the server.

Definition at line 175 of file nsILDAPMessage.idl.

readonly attribute AUTF8String nsILDAPMessage::matchedDn [inherited]

In LDAPv3, when the server returns any of the following errors: NO_SUCH_OBJECT, ALIAS_PROBLEM, INVALID_DN_SYNTAX, ALIAS_DEREF_PROBLEM, it also returns the closest existing DN to the entry requested.

Definition at line 182 of file nsILDAPMessage.idl.

Definition at line 90 of file nsLDAPMessage.h.

Definition at line 84 of file nsLDAPMessage.h.

Definition at line 94 of file nsLDAPMessage.h.

char* nsLDAPMessage::mErrorMessage [protected]

Definition at line 96 of file nsLDAPMessage.h.

char* nsLDAPMessage::mMatchedDn [protected]

Definition at line 95 of file nsLDAPMessage.h.

LDAPMessage* nsLDAPMessage::mMsgHandle [protected]

Definition at line 81 of file nsLDAPMessage.h.

Definition at line 82 of file nsLDAPMessage.h.

char** nsLDAPMessage::mReferrals [protected]

Definition at line 97 of file nsLDAPMessage.h.

Definition at line 98 of file nsLDAPMessage.h.

The operation this message originated from.

Exceptions:
NS_ERROR_NULL_POINTERNULL pointer to getter

Definition at line 91 of file nsILDAPMessage.idl.

const long nsILDAPMessage::RES_ADD = 0x69 [inherited]

The result of an add operation.

Definition at line 143 of file nsILDAPMessage.idl.

const long nsILDAPMessage::RES_BIND = 0x61 [inherited]

Result of a bind operation.

Definition at line 117 of file nsILDAPMessage.idl.

The result of a compare operation.

Definition at line 158 of file nsILDAPMessage.idl.

The result of a delete operation.

Definition at line 148 of file nsILDAPMessage.idl.

The result of an LDAPv3 extended operation.

Definition at line 163 of file nsILDAPMessage.idl.

const long nsILDAPMessage::RES_MODDN = 0x6D [inherited]

The result of an modify DN operation.

Definition at line 153 of file nsILDAPMessage.idl.

The result of a modify operation.

Definition at line 138 of file nsILDAPMessage.idl.

An entry found in an search operation.

Definition at line 122 of file nsILDAPMessage.idl.

An LDAPv3 search reference (a referral to another server)

Definition at line 127 of file nsILDAPMessage.idl.

The result of a search operation (i.e.

the search is done; no more entries to follow).

Definition at line 133 of file nsILDAPMessage.idl.

readonly attribute long nsILDAPMessage::type [inherited]

The result type of this message.

Possible types listed below, the values chosen are taken from the draft-ietf-ldapext-ldap-c-api-04.txt and are the same ones used in the ldap.h include file from the Mozilla LDAP C SDK.

Exceptions:
NS_ERROR_ILLEGAL_VALUEnull pointer passed in
NS_ERROR_UNEXPECTEDinternal error (possible memory corruption)

Definition at line 112 of file nsILDAPMessage.idl.


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