/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsILDAPOperation.idl
 */

#ifndef __gen_nsILDAPOperation_h__
#define __gen_nsILDAPOperation_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_nsILDAPConnection_h__
#include "nsILDAPConnection.h"
#endif

#ifndef __gen_nsIAuthModule_h__
#include "nsIAuthModule.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsILDAPMessage; /* forward declaration */

class nsILDAPMessageListener; /* forward declaration */

class nsILDAPModification; /* forward declaration */

class nsIMutableArray; /* forward declaration */

class nsIArray; /* forward declaration */

#define NS_LDAPOPERATION_CONTRACTID "@mozilla.org/network/ldap-operation;1" 
typedef PRUint32  PRIntervalTime;


/* starting interface:    nsILDAPOperation */
#define NS_ILDAPOPERATION_IID_STR "4dfb1b19-fc8f-4525-92e7-f97b78a9747a"

#define NS_ILDAPOPERATION_IID \
  {0x4dfb1b19, 0xfc8f, 0x4525, \
    { 0x92, 0xe7, 0xf9, 0x7b, 0x78, 0xa9, 0x74, 0x7a }}

class NS_NO_VTABLE NS_SCRIPTABLE nsILDAPOperation : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILDAPOPERATION_IID)

  /**
     * The connection this operation is on. 
     * 
     * @exception NS_ERROR_ILLEGAL_VALUE        a NULL pointer was passed in
     */
  /* readonly attribute nsILDAPConnection connection; */
  NS_SCRIPTABLE NS_IMETHOD GetConnection(nsILDAPConnection **aConnection) = 0;

  /**
     * 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.
     * 
     * @exception NS_ERROR_ILLEGAL_VALUE        a NULL pointer was passed in
     */
  /* readonly attribute nsILDAPMessageListener messageListener; */
  NS_SCRIPTABLE NS_IMETHOD GetMessageListener(nsILDAPMessageListener **aMessageListener) = 0;

  /**
     * The message-id associated with this operation.
     *
     * @exception NS_ERROR_ILLEGAL_VALUE        a NULL pointer was passed in
     */
  /* readonly attribute long messageID; */
  NS_SCRIPTABLE NS_IMETHOD GetMessageID(PRInt32 *aMessageID) = 0;

  /**
     * private parameter (anything caller desires)
     */
  /* attribute nsISupports closure; */
  NS_SCRIPTABLE NS_IMETHOD GetClosure(nsISupports **aClosure) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetClosure(nsISupports *aClosure) = 0;

  /**
     * No time and/or size limit specified
     */
  enum { NO_LIMIT = 0 };

  /**
     * 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 serverControls; */
  NS_SCRIPTABLE NS_IMETHOD GetServerControls(nsIMutableArray **aServerControls) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetServerControls(nsIMutableArray *aServerControls) = 0;

  /* attribute nsIMutableArray clientControls; */
  NS_SCRIPTABLE NS_IMETHOD GetClientControls(nsIMutableArray **aClientControls) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetClientControls(nsIMutableArray *aClientControls) = 0;

  /**
     * 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.
     *
     * @param aConnection       connection this operation should use
     * @param aMessageListener  interface used to call back the results.
     * @param aClosure          private parameter (anything caller desires)
     *
     * @exception NS_ERROR_ILLEGAL_VALUE        a NULL pointer was passed in
     * @exception NS_ERROR_UNEXPECTED           failed to get connection handle
     */
  /* void init (in nsILDAPConnection aConnection, in nsILDAPMessageListener aMessageListener, in nsISupports aClosure); */
  NS_SCRIPTABLE NS_IMETHOD Init(nsILDAPConnection *aConnection, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure) = 0;

  /**
     * Asynchronously authenticate to the LDAP server.
     * 
     * @param passwd    the password used for binding; NULL for anon-binds
     *
     * @exception NS_ERROR_LDAP_ENCODING_ERROR  problem encoding bind request
     * @exception NS_ERROR_LDAP_SERVER_DOWN     server down (XXX rebinds?)
     * @exception NS_ERROR_LDAP_CONNECT_ERROR   connection failed or lost
     * @exception NS_ERROR_OUT_OF_MEMORY        ran out of memory
     * @exception NS_ERROR_UNEXPECTED           internal error
     */
  /* void simpleBind (in AUTF8String passwd); */
  NS_SCRIPTABLE NS_IMETHOD SimpleBind(const nsACString & passwd) = 0;

  /**
     * Asynchronously perform a SASL bind against the LDAP server
     *
     * @param service    the host name of the service being connected to
     * @param mechanism  the name of the SASL mechanism in use
     * @param authModule the nsIAuthModule to be used to perform the operation
     *
     */
  /* void saslBind (in ACString service, in ACString mechanism, in nsIAuthModule authModule); */
  NS_SCRIPTABLE NS_IMETHOD SaslBind(const nsACString & service, const nsACString & mechanism, nsIAuthModule *authModule) = 0;

  /**
     * Continue a SASL bind operation
     *
     * @param token     the next SASL token to send to the server
     * @param tokenLen  the length of the token to send
     *
     */
  /* void saslStep (in string token, in unsigned long tokenLen); */
  NS_SCRIPTABLE NS_IMETHOD SaslStep(const char *token, PRUint32 tokenLen) = 0;

  /**
     * 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.
     *
     * @param aBaseDn           Base DN to add
     * @param aModCount         Number of modifications
     * @param aMods             Array of modifications
     *
     * @exception NS_ERROR_NOT_INITIALIZED      operation not initialized
     * @exception NS_ERROR_INVALID_ARG          invalid argument
     * @exception NS_ERROR_LDAP_ENCODING_ERROR  error during BER-encoding
     * @exception NS_ERROR_LDAP_SERVER_DOWN     the LDAP server did not
     *                                          receive the request or the
     *                                          connection was lost
     * @exception NS_ERROR_OUT_OF_MEMORY        ran out of memory
     * @exception NS_ERROR_LDAP_NOT_SUPPORTED   not supported in the version
     *                                          of the LDAP protocol that the
     *                                          client is using
     * @exception NS_ERROR_UNEXPECTED           an unexpected error has
     *                                          occurred
     *
     * XXX doesn't currently handle LDAPControl params
     */
  /* void addExt (in AUTF8String aBaseDn, in nsIArray aMods); */
  NS_SCRIPTABLE NS_IMETHOD AddExt(const nsACString & aBaseDn, nsIArray *aMods) = 0;

  /**
     * 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.
     *
     * @param aBaseDn           Base DN to delete
     *
     * @exception NS_ERROR_NOT_INITIALIZED      operation not initialized
     * @exception NS_ERROR_INVALID_ARG          invalid argument
     * @exception NS_ERROR_LDAP_ENCODING_ERROR  error during BER-encoding
     * @exception NS_ERROR_LDAP_SERVER_DOWN     the LDAP server did not
     *                                          receive the request or the
     *                                          connection was lost
     * @exception NS_ERROR_OUT_OF_MEMORY        ran out of memory
     * @exception NS_ERROR_LDAP_NOT_SUPPORTED   not supported in the version
     *                                          of the LDAP protocol that the
     *                                          client is using
     * @exception NS_ERROR_UNEXPECTED           an unexpected error has
     *                                          occurred
     *
     * XXX doesn't currently handle LDAPControl params
     */
  /* void deleteExt (in AUTF8String aBaseDn); */
  NS_SCRIPTABLE NS_IMETHOD DeleteExt(const nsACString & aBaseDn) = 0;

  /**
     * 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.
     *
     * @param aBaseDn           Base DN to modify
     * @param aModCount         Number of modifications
     * @param aMods             Array of modifications
     *
     * @exception NS_ERROR_NOT_INITIALIZED      operation not initialized
     * @exception NS_ERROR_INVALID_ARG          invalid argument
     * @exception NS_ERROR_LDAP_ENCODING_ERROR  error during BER-encoding
     * @exception NS_ERROR_LDAP_SERVER_DOWN     the LDAP server did not
     *                                          receive the request or the
     *                                          connection was lost
     * @exception NS_ERROR_OUT_OF_MEMORY        ran out of memory
     * @exception NS_ERROR_LDAP_NOT_SUPPORTED   not supported in the version
     *                                          of the LDAP protocol that the
     *                                          client is using
     * @exception NS_ERROR_UNEXPECTED           an unexpected error has
     *                                          occurred
     *
     * XXX doesn't currently handle LDAPControl params
     */
  /* void modifyExt (in AUTF8String aBaseDn, in nsIArray aMods); */
  NS_SCRIPTABLE NS_IMETHOD ModifyExt(const nsACString & aBaseDn, nsIArray *aMods) = 0;

  /**
     * Kicks off an asynchronous rename request.
     *
     * @param aBaseDn           Base DN to rename
     * @param aNewRDn           New relative DN
     * @param aNewParent        DN of the new parent under which to move the
     *                          entry
     * @param aDeleteOldRDn     Indicates whether to remove the old relative
     *                          DN as a value in the entry or not
     *
     * @exception NS_ERROR_NOT_INITIALIZED      operation not initialized
     * @exception NS_ERROR_INVALID_ARG          invalid argument
     * @exception NS_ERROR_LDAP_ENCODING_ERROR  error during BER-encoding
     * @exception NS_ERROR_LDAP_SERVER_DOWN     the LDAP server did not
     *                                          receive the request or the
     *                                          connection was lost
     * @exception NS_ERROR_OUT_OF_MEMORY        ran out of memory
     * @exception NS_ERROR_LDAP_NOT_SUPPORTED   not supported in the version
     *                                          of the LDAP protocol that the
     *                                          client is using
     * @exception NS_ERROR_UNEXPECTED           an unexpected error has
     *                                          occurred
     *
     * XXX doesn't currently handle LDAPControl params
     */
  /* void rename (in AUTF8String aBaseDn, in AUTF8String aNewRDn, in AUTF8String aNewParent, in boolean aDeleteOldRDn); */
  NS_SCRIPTABLE NS_IMETHOD Rename(const nsACString & aBaseDn, const nsACString & aNewRDn, const nsACString & aNewParent, PRBool aDeleteOldRDn) = 0;

  /**
     * 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.
     *
     * @param aBaseDn           Base DN to search
     * @param aScope            One of SCOPE_{BASE,ONELEVEL,SUBTREE}
     * @param aFilter           Search filter
     * @param aAttributes       Comma separated list of values, holding the
     *                          attributes we need
     * @param aTimeOut          How long to wait
     * @param aSizeLimit        Maximum number of entries to return.
     *
     * @exception NS_ERROR_NOT_INITIALIZED      operation not initialized
     * @exception NS_ERROR_LDAP_ENCODING_ERROR  error during BER-encoding
     * @exception NS_ERROR_LDAP_SERVER_DOWN     the LDAP server did not
     *                                          receive the request or the
     *                                          connection was lost
     * @exception NS_ERROR_OUT_OF_MEMORY        ran out of memory
     * @exception NS_ERROR_INVALID_ARG          invalid argument
     * @exception NS_ERROR_LDAP_NOT_SUPPORTED   not supported in the version
     *                                          of the LDAP protocol that the
     *                                          client is using
     * @exception NS_ERROR_LDAP_FILTER_ERROR
     * @exception NS_ERROR_UNEXPECTED
     */
  /* void searchExt (in AUTF8String aBaseDn, in PRInt32 aScope, in AUTF8String aFilter, in ACString aAttributes, in PRIntervalTime aTimeOut, in PRInt32 aSizeLimit); */
  NS_SCRIPTABLE NS_IMETHOD SearchExt(const nsACString & aBaseDn, PRInt32 aScope, const nsACString & aFilter, const nsACString & aAttributes, PRIntervalTime aTimeOut, PRInt32 aSizeLimit) = 0;

  /**  
     * Cancels an async operation that is in progress.
     *
     * XXX controls not supported yet
     *
     * @exception NS_ERROR_NOT_IMPLEMENTED      server or client controls
     *                                          were set on this object
     * @exception NS_ERROR_NOT_INITIALIZED      operation not initialized
     * @exception NS_ERROR_LDAP_ENCODING_ERROR  error during BER-encoding
     * @exception NS_ERROR_LDAP_SERVER_DOWN     the LDAP server did not
     *                                          receive the request or the
     *                                          connection was lost
     * @exception NS_ERROR_OUT_OF_MEMORY        out of memory
     * @exception NS_ERROR_INVALID_ARG          invalid argument
     * @exception NS_ERROR_UNEXPECTED           internal error
     */
  /* void abandonExt (); */
  NS_SCRIPTABLE NS_IMETHOD AbandonExt(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsILDAPOperation, NS_ILDAPOPERATION_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILDAPOPERATION \
  NS_SCRIPTABLE NS_IMETHOD GetConnection(nsILDAPConnection **aConnection); \
  NS_SCRIPTABLE NS_IMETHOD GetMessageListener(nsILDAPMessageListener **aMessageListener); \
  NS_SCRIPTABLE NS_IMETHOD GetMessageID(PRInt32 *aMessageID); \
  NS_SCRIPTABLE NS_IMETHOD GetClosure(nsISupports **aClosure); \
  NS_SCRIPTABLE NS_IMETHOD SetClosure(nsISupports *aClosure); \
  NS_SCRIPTABLE NS_IMETHOD GetServerControls(nsIMutableArray **aServerControls); \
  NS_SCRIPTABLE NS_IMETHOD SetServerControls(nsIMutableArray *aServerControls); \
  NS_SCRIPTABLE NS_IMETHOD GetClientControls(nsIMutableArray **aClientControls); \
  NS_SCRIPTABLE NS_IMETHOD SetClientControls(nsIMutableArray *aClientControls); \
  NS_SCRIPTABLE NS_IMETHOD Init(nsILDAPConnection *aConnection, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure); \
  NS_SCRIPTABLE NS_IMETHOD SimpleBind(const nsACString & passwd); \
  NS_SCRIPTABLE NS_IMETHOD SaslBind(const nsACString & service, const nsACString & mechanism, nsIAuthModule *authModule); \
  NS_SCRIPTABLE NS_IMETHOD SaslStep(const char *token, PRUint32 tokenLen); \
  NS_SCRIPTABLE NS_IMETHOD AddExt(const nsACString & aBaseDn, nsIArray *aMods); \
  NS_SCRIPTABLE NS_IMETHOD DeleteExt(const nsACString & aBaseDn); \
  NS_SCRIPTABLE NS_IMETHOD ModifyExt(const nsACString & aBaseDn, nsIArray *aMods); \
  NS_SCRIPTABLE NS_IMETHOD Rename(const nsACString & aBaseDn, const nsACString & aNewRDn, const nsACString & aNewParent, PRBool aDeleteOldRDn); \
  NS_SCRIPTABLE NS_IMETHOD SearchExt(const nsACString & aBaseDn, PRInt32 aScope, const nsACString & aFilter, const nsACString & aAttributes, PRIntervalTime aTimeOut, PRInt32 aSizeLimit); \
  NS_SCRIPTABLE NS_IMETHOD AbandonExt(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILDAPOPERATION(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetConnection(nsILDAPConnection **aConnection) { return _to GetConnection(aConnection); } \
  NS_SCRIPTABLE NS_IMETHOD GetMessageListener(nsILDAPMessageListener **aMessageListener) { return _to GetMessageListener(aMessageListener); } \
  NS_SCRIPTABLE NS_IMETHOD GetMessageID(PRInt32 *aMessageID) { return _to GetMessageID(aMessageID); } \
  NS_SCRIPTABLE NS_IMETHOD GetClosure(nsISupports **aClosure) { return _to GetClosure(aClosure); } \
  NS_SCRIPTABLE NS_IMETHOD SetClosure(nsISupports *aClosure) { return _to SetClosure(aClosure); } \
  NS_SCRIPTABLE NS_IMETHOD GetServerControls(nsIMutableArray **aServerControls) { return _to GetServerControls(aServerControls); } \
  NS_SCRIPTABLE NS_IMETHOD SetServerControls(nsIMutableArray *aServerControls) { return _to SetServerControls(aServerControls); } \
  NS_SCRIPTABLE NS_IMETHOD GetClientControls(nsIMutableArray **aClientControls) { return _to GetClientControls(aClientControls); } \
  NS_SCRIPTABLE NS_IMETHOD SetClientControls(nsIMutableArray *aClientControls) { return _to SetClientControls(aClientControls); } \
  NS_SCRIPTABLE NS_IMETHOD Init(nsILDAPConnection *aConnection, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure) { return _to Init(aConnection, aMessageListener, aClosure); } \
  NS_SCRIPTABLE NS_IMETHOD SimpleBind(const nsACString & passwd) { return _to SimpleBind(passwd); } \
  NS_SCRIPTABLE NS_IMETHOD SaslBind(const nsACString & service, const nsACString & mechanism, nsIAuthModule *authModule) { return _to SaslBind(service, mechanism, authModule); } \
  NS_SCRIPTABLE NS_IMETHOD SaslStep(const char *token, PRUint32 tokenLen) { return _to SaslStep(token, tokenLen); } \
  NS_SCRIPTABLE NS_IMETHOD AddExt(const nsACString & aBaseDn, nsIArray *aMods) { return _to AddExt(aBaseDn, aMods); } \
  NS_SCRIPTABLE NS_IMETHOD DeleteExt(const nsACString & aBaseDn) { return _to DeleteExt(aBaseDn); } \
  NS_SCRIPTABLE NS_IMETHOD ModifyExt(const nsACString & aBaseDn, nsIArray *aMods) { return _to ModifyExt(aBaseDn, aMods); } \
  NS_SCRIPTABLE NS_IMETHOD Rename(const nsACString & aBaseDn, const nsACString & aNewRDn, const nsACString & aNewParent, PRBool aDeleteOldRDn) { return _to Rename(aBaseDn, aNewRDn, aNewParent, aDeleteOldRDn); } \
  NS_SCRIPTABLE NS_IMETHOD SearchExt(const nsACString & aBaseDn, PRInt32 aScope, const nsACString & aFilter, const nsACString & aAttributes, PRIntervalTime aTimeOut, PRInt32 aSizeLimit) { return _to SearchExt(aBaseDn, aScope, aFilter, aAttributes, aTimeOut, aSizeLimit); } \
  NS_SCRIPTABLE NS_IMETHOD AbandonExt(void) { return _to AbandonExt(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSILDAPOPERATION(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetConnection(nsILDAPConnection **aConnection) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetConnection(aConnection); } \
  NS_SCRIPTABLE NS_IMETHOD GetMessageListener(nsILDAPMessageListener **aMessageListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMessageListener(aMessageListener); } \
  NS_SCRIPTABLE NS_IMETHOD GetMessageID(PRInt32 *aMessageID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMessageID(aMessageID); } \
  NS_SCRIPTABLE NS_IMETHOD GetClosure(nsISupports **aClosure) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClosure(aClosure); } \
  NS_SCRIPTABLE NS_IMETHOD SetClosure(nsISupports *aClosure) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetClosure(aClosure); } \
  NS_SCRIPTABLE NS_IMETHOD GetServerControls(nsIMutableArray **aServerControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServerControls(aServerControls); } \
  NS_SCRIPTABLE NS_IMETHOD SetServerControls(nsIMutableArray *aServerControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetServerControls(aServerControls); } \
  NS_SCRIPTABLE NS_IMETHOD GetClientControls(nsIMutableArray **aClientControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClientControls(aClientControls); } \
  NS_SCRIPTABLE NS_IMETHOD SetClientControls(nsIMutableArray *aClientControls) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetClientControls(aClientControls); } \
  NS_SCRIPTABLE NS_IMETHOD Init(nsILDAPConnection *aConnection, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aConnection, aMessageListener, aClosure); } \
  NS_SCRIPTABLE NS_IMETHOD SimpleBind(const nsACString & passwd) { return !_to ? NS_ERROR_NULL_POINTER : _to->SimpleBind(passwd); } \
  NS_SCRIPTABLE NS_IMETHOD SaslBind(const nsACString & service, const nsACString & mechanism, nsIAuthModule *authModule) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaslBind(service, mechanism, authModule); } \
  NS_SCRIPTABLE NS_IMETHOD SaslStep(const char *token, PRUint32 tokenLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->SaslStep(token, tokenLen); } \
  NS_SCRIPTABLE NS_IMETHOD AddExt(const nsACString & aBaseDn, nsIArray *aMods) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddExt(aBaseDn, aMods); } \
  NS_SCRIPTABLE NS_IMETHOD DeleteExt(const nsACString & aBaseDn) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteExt(aBaseDn); } \
  NS_SCRIPTABLE NS_IMETHOD ModifyExt(const nsACString & aBaseDn, nsIArray *aMods) { return !_to ? NS_ERROR_NULL_POINTER : _to->ModifyExt(aBaseDn, aMods); } \
  NS_SCRIPTABLE NS_IMETHOD Rename(const nsACString & aBaseDn, const nsACString & aNewRDn, const nsACString & aNewParent, PRBool aDeleteOldRDn) { return !_to ? NS_ERROR_NULL_POINTER : _to->Rename(aBaseDn, aNewRDn, aNewParent, aDeleteOldRDn); } \
  NS_SCRIPTABLE NS_IMETHOD SearchExt(const nsACString & aBaseDn, PRInt32 aScope, const nsACString & aFilter, const nsACString & aAttributes, PRIntervalTime aTimeOut, PRInt32 aSizeLimit) { return !_to ? NS_ERROR_NULL_POINTER : _to->SearchExt(aBaseDn, aScope, aFilter, aAttributes, aTimeOut, aSizeLimit); } \
  NS_SCRIPTABLE NS_IMETHOD AbandonExt(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AbandonExt(); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsLDAPOperation : public nsILDAPOperation
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSILDAPOPERATION

  nsLDAPOperation();

private:
  ~nsLDAPOperation();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsLDAPOperation, nsILDAPOperation)

nsLDAPOperation::nsLDAPOperation()
{
  /* member initializers and constructor code */
}

nsLDAPOperation::~nsLDAPOperation()
{
  /* destructor code */
}

/* readonly attribute nsILDAPConnection connection; */
NS_IMETHODIMP nsLDAPOperation::GetConnection(nsILDAPConnection **aConnection)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsILDAPMessageListener messageListener; */
NS_IMETHODIMP nsLDAPOperation::GetMessageListener(nsILDAPMessageListener **aMessageListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute long messageID; */
NS_IMETHODIMP nsLDAPOperation::GetMessageID(PRInt32 *aMessageID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsISupports closure; */
NS_IMETHODIMP nsLDAPOperation::GetClosure(nsISupports **aClosure)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPOperation::SetClosure(nsISupports *aClosure)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIMutableArray serverControls; */
NS_IMETHODIMP nsLDAPOperation::GetServerControls(nsIMutableArray **aServerControls)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPOperation::SetServerControls(nsIMutableArray *aServerControls)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsIMutableArray clientControls; */
NS_IMETHODIMP nsLDAPOperation::GetClientControls(nsIMutableArray **aClientControls)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPOperation::SetClientControls(nsIMutableArray *aClientControls)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void init (in nsILDAPConnection aConnection, in nsILDAPMessageListener aMessageListener, in nsISupports aClosure); */
NS_IMETHODIMP nsLDAPOperation::Init(nsILDAPConnection *aConnection, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void simpleBind (in AUTF8String passwd); */
NS_IMETHODIMP nsLDAPOperation::SimpleBind(const nsACString & passwd)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saslBind (in ACString service, in ACString mechanism, in nsIAuthModule authModule); */
NS_IMETHODIMP nsLDAPOperation::SaslBind(const nsACString & service, const nsACString & mechanism, nsIAuthModule *authModule)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void saslStep (in string token, in unsigned long tokenLen); */
NS_IMETHODIMP nsLDAPOperation::SaslStep(const char *token, PRUint32 tokenLen)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addExt (in AUTF8String aBaseDn, in nsIArray aMods); */
NS_IMETHODIMP nsLDAPOperation::AddExt(const nsACString & aBaseDn, nsIArray *aMods)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteExt (in AUTF8String aBaseDn); */
NS_IMETHODIMP nsLDAPOperation::DeleteExt(const nsACString & aBaseDn)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void modifyExt (in AUTF8String aBaseDn, in nsIArray aMods); */
NS_IMETHODIMP nsLDAPOperation::ModifyExt(const nsACString & aBaseDn, nsIArray *aMods)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void rename (in AUTF8String aBaseDn, in AUTF8String aNewRDn, in AUTF8String aNewParent, in boolean aDeleteOldRDn); */
NS_IMETHODIMP nsLDAPOperation::Rename(const nsACString & aBaseDn, const nsACString & aNewRDn, const nsACString & aNewParent, PRBool aDeleteOldRDn)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void searchExt (in AUTF8String aBaseDn, in PRInt32 aScope, in AUTF8String aFilter, in ACString aAttributes, in PRIntervalTime aTimeOut, in PRInt32 aSizeLimit); */
NS_IMETHODIMP nsLDAPOperation::SearchExt(const nsACString & aBaseDn, PRInt32 aScope, const nsACString & aFilter, const nsACString & aAttributes, PRIntervalTime aTimeOut, PRInt32 aSizeLimit)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void abandonExt (); */
NS_IMETHODIMP nsLDAPOperation::AbandonExt()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsILDAPOperation_h__ */
