Public Member Functions | Public Attributes

nsILDAPOperation Interface Reference

import "nsILDAPOperation.idl";

Collaboration diagram for nsILDAPOperation:

List of all members.

Public Member Functions

void init (in nsILDAPConnection aConnection, in nsILDAPMessageListener aMessageListener, in nsISupports aClosure)
 Initializes this operation.
void simpleBind (in AUTF8String passwd)
 Asynchronously authenticate to the LDAP server.
void saslBind (in ACString service, in ACString mechanism, in nsIAuthModule authModule)
 Asynchronously perform a SASL bind against the LDAP server.
void saslStep (in string token, in unsigned long tokenLen)
 Continue a SASL bind operation.
void addExt (in AUTF8String aBaseDn, in nsIArray aMods)
 Kicks off an asynchronous add request.
void deleteExt (in AUTF8String aBaseDn)
 Kicks off an asynchronous delete request.
void modifyExt (in AUTF8String aBaseDn, in nsIArray aMods)
 Kicks off an asynchronous modify request.
void rename (in AUTF8String aBaseDn, in AUTF8String aNewRDn, in AUTF8String aNewParent, in boolean aDeleteOldRDn)
 Kicks off an asynchronous rename request.
void searchExt (in AUTF8String aBaseDn, in PRInt32 aScope, in AUTF8String aFilter, in unsigned long aAttrCount,[array, size_is(aAttrCount)] in string aAttributes, in PRIntervalTime aTimeOut, in PRInt32 aSizeLimit)
 Kicks off an asynchronous search request.
void abandonExt ()
 Cancels an async operation that is in progress.

Public Attributes

readonly attribute
nsILDAPConnection 
connection
 The connection this operation is on.
readonly attribute
nsILDAPMessageListener 
messageListener
 Callback for individual result messages related to this operation (set by the init() method).
readonly attribute long messageID
 The message-id associated with this operation.
attribute nsISupports closure
 private parameter (anything caller desires)
const long NO_LIMIT = 0
 No time and/or size limit specified.
attribute nsIMutableArray serverControls
 If specified, these arrays of nsILDAPControls are passed into the LDAP C SDK for any extended operations (ie method calls on this interface ending in "Ext").
attribute nsIMutableArray clientControls

Member Function Documentation

void nsILDAPOperation::abandonExt (  ) 

Cancels an async operation that is in progress.

XXX controls not supported yet

Exceptions:
NS_ERROR_NOT_IMPLEMENTED server or client controls were set on this object
NS_ERROR_NOT_INITIALIZED operation not initialized
NS_ERROR_LDAP_ENCODING_ERROR error during BER-encoding
NS_ERROR_LDAP_SERVER_DOWN the LDAP server did not receive the request or the connection was lost
NS_ERROR_OUT_OF_MEMORY out of memory
NS_ERROR_INVALID_ARG invalid argument
NS_ERROR_UNEXPECTED internal error
void nsILDAPOperation::addExt ( in AUTF8String  aBaseDn,
in nsIArray  aMods 
)

Kicks off an asynchronous add request.

The "ext" stands for "extensions", and is intended to convey that this method will eventually support the extensions described in the draft-ietf-ldapext-ldap-c-api-04.txt Internet Draft.

Parameters:
aBaseDn Base DN to add
aModCount Number of modifications
aMods Array of modifications
Exceptions:
NS_ERROR_NOT_INITIALIZED operation not initialized
NS_ERROR_INVALID_ARG invalid argument
NS_ERROR_LDAP_ENCODING_ERROR error during BER-encoding
NS_ERROR_LDAP_SERVER_DOWN the LDAP server did not receive the request or the connection was lost
NS_ERROR_OUT_OF_MEMORY ran out of memory
NS_ERROR_LDAP_NOT_SUPPORTED not supported in the version of the LDAP protocol that the client is using
NS_ERROR_UNEXPECTED an unexpected error has occurred

XXX doesn't currently handle LDAPControl params

void nsILDAPOperation::deleteExt ( in AUTF8String  aBaseDn  ) 

Kicks off an asynchronous delete request.

The "ext" stands for "extensions", and is intended to convey that this method will eventually support the extensions described in the draft-ietf-ldapext-ldap-c-api-04.txt Internet Draft.

Parameters:
aBaseDn Base DN to delete
Exceptions:
NS_ERROR_NOT_INITIALIZED operation not initialized
NS_ERROR_INVALID_ARG invalid argument
NS_ERROR_LDAP_ENCODING_ERROR error during BER-encoding
NS_ERROR_LDAP_SERVER_DOWN the LDAP server did not receive the request or the connection was lost
NS_ERROR_OUT_OF_MEMORY ran out of memory
NS_ERROR_LDAP_NOT_SUPPORTED not supported in the version of the LDAP protocol that the client is using
NS_ERROR_UNEXPECTED an unexpected error has occurred

XXX doesn't currently handle LDAPControl params

void nsILDAPOperation::init ( in nsILDAPConnection  aConnection,
in nsILDAPMessageListener  aMessageListener,
in nsISupports  aClosure 
)

Initializes this operation.

Must be called prior to initiating any actual operations. Note that by default, the aMessageListener callbacks happen on the LDAP connection thread. If you need them to happen on the main thread (or any other thread), then you should created an nsISupports proxy object and pass that in.

Parameters:
aConnection connection this operation should use
aMessageListener interface used to call back the results.
aClosure private parameter (anything caller desires)
Exceptions:
NS_ERROR_ILLEGAL_VALUE a NULL pointer was passed in
NS_ERROR_UNEXPECTED failed to get connection handle
void nsILDAPOperation::modifyExt ( in AUTF8String  aBaseDn,
in nsIArray  aMods 
)

Kicks off an asynchronous modify request.

The "ext" stands for "extensions", and is intended to convey that this method will eventually support the extensions described in the draft-ietf-ldapext-ldap-c-api-04.txt Internet Draft.

Parameters:
aBaseDn Base DN to modify
aModCount Number of modifications
aMods Array of modifications
Exceptions:
NS_ERROR_NOT_INITIALIZED operation not initialized
NS_ERROR_INVALID_ARG invalid argument
NS_ERROR_LDAP_ENCODING_ERROR error during BER-encoding
NS_ERROR_LDAP_SERVER_DOWN the LDAP server did not receive the request or the connection was lost
NS_ERROR_OUT_OF_MEMORY ran out of memory
NS_ERROR_LDAP_NOT_SUPPORTED not supported in the version of the LDAP protocol that the client is using
NS_ERROR_UNEXPECTED an unexpected error has occurred

XXX doesn't currently handle LDAPControl params

void nsILDAPOperation::rename ( in AUTF8String  aBaseDn,
in AUTF8String  aNewRDn,
in AUTF8String  aNewParent,
in boolean  aDeleteOldRDn 
)

Kicks off an asynchronous rename request.

Parameters:
aBaseDn Base DN to rename
aNewRDn New relative DN
aNewParent DN of the new parent under which to move the entry
aDeleteOldRDn Indicates whether to remove the old relative DN as a value in the entry or not
Exceptions:
NS_ERROR_NOT_INITIALIZED operation not initialized
NS_ERROR_INVALID_ARG invalid argument
NS_ERROR_LDAP_ENCODING_ERROR error during BER-encoding
NS_ERROR_LDAP_SERVER_DOWN the LDAP server did not receive the request or the connection was lost
NS_ERROR_OUT_OF_MEMORY ran out of memory
NS_ERROR_LDAP_NOT_SUPPORTED not supported in the version of the LDAP protocol that the client is using
NS_ERROR_UNEXPECTED an unexpected error has occurred

XXX doesn't currently handle LDAPControl params

void nsILDAPOperation::saslBind ( in ACString  service,
in ACString  mechanism,
in nsIAuthModule  authModule 
)

Asynchronously perform a SASL bind against the LDAP server.

Parameters:
service the host name of the service being connected to
mechanism the name of the SASL mechanism in use
authModule the nsIAuthModule to be used to perform the operation
void nsILDAPOperation::saslStep ( in string  token,
in unsigned long  tokenLen 
)

Continue a SASL bind operation.

Parameters:
token the next SASL token to send to the server
tokenLen the length of the token to send
void nsILDAPOperation::searchExt ( in AUTF8String  aBaseDn,
in PRInt32  aScope,
in AUTF8String  aFilter,
in unsigned long  aAttrCount,
[array, size_is(aAttrCount)] in string  aAttributes,
in PRIntervalTime  aTimeOut,
in PRInt32  aSizeLimit 
)

Kicks off an asynchronous search request.

The "ext" stands for "extensions", and is intended to convey that this method will eventually support the extensions described in the draft-ietf-ldapext-ldap-c-api-04.txt Internet Draft.

Parameters:
aBaseDn Base DN to search
aScope One of SCOPE_{BASE,ONELEVEL,SUBTREE}
aFilter Search filter
aAttrCount Number of attributes we request (0 for all)
aAttributes Array of strings, holding the attrs we need
aTimeOut How long to wait
aSizeLimit Maximum number of entries to return.
Exceptions:
NS_ERROR_NOT_INITIALIZED operation not initialized
NS_ERROR_LDAP_ENCODING_ERROR error during BER-encoding
NS_ERROR_LDAP_SERVER_DOWN the LDAP server did not receive the request or the connection was lost
NS_ERROR_OUT_OF_MEMORY ran out of memory
NS_ERROR_INVALID_ARG invalid argument
NS_ERROR_LDAP_NOT_SUPPORTED not supported in the version of the LDAP protocol that the client is using
NS_ERROR_LDAP_FILTER_ERROR 
NS_ERROR_UNEXPECTED 
void nsILDAPOperation::simpleBind ( in AUTF8String  passwd  ) 

Asynchronously authenticate to the LDAP server.

Parameters:
passwd the password used for binding; NULL for anon-binds
Exceptions:
NS_ERROR_LDAP_ENCODING_ERROR problem encoding bind request
NS_ERROR_LDAP_SERVER_DOWN server down (XXX rebinds?)
NS_ERROR_LDAP_CONNECT_ERROR connection failed or lost
NS_ERROR_OUT_OF_MEMORY ran out of memory
NS_ERROR_UNEXPECTED internal error

Member Data Documentation

private parameter (anything caller desires)

The connection this operation is on.

Exceptions:
NS_ERROR_ILLEGAL_VALUE a NULL pointer was passed in
readonly attribute long nsILDAPOperation::messageID

The message-id associated with this operation.

Exceptions:
NS_ERROR_ILLEGAL_VALUE a NULL pointer was passed in

Callback for individual result messages related to this operation (set by the init() method).

This is actually an nsISupports proxy object, as the callback will happen from another thread.

Exceptions:
NS_ERROR_ILLEGAL_VALUE a NULL pointer was passed in

No time and/or size limit specified.

If specified, these arrays of nsILDAPControls are passed into the LDAP C SDK for any extended operations (ie method calls on this interface ending in "Ext").


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