Back to index

openldap  2.4.31
Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes
LDAPDeleteRequest Class Reference

#include <LDAPDeleteRequest.h>

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

List of all members.

Public Member Functions

 LDAPDeleteRequest (const LDAPDeleteRequest &req)
 LDAPDeleteRequest (const std::string &dn, LDAPAsynConnection *connect, const LDAPConstraints *cons, bool isReferral=false, const LDAPRequest *parent=0)
virtual ~LDAPDeleteRequest ()
virtual LDAPMessageQueuesendRequest ()
 This method encodes the request an calls the apprpriate functions of the C-API to send the Request to a LDAP-Server.
virtual LDAPRequestfollowReferral (LDAPMsg *refs)
const LDAPConstraintsgetConstraints () const
const LDAPAsynConnectiongetConnection () const
virtual LDAPMsggetNextMessage () const
int getType () const
int getMsgID () const
int getHopCount () const
const LDAPRequestgetParent () const
bool isReferral () const
void unbind () const
virtual bool equals (const LDAPRequest *req) const
 Compare this request with another on.
bool isCycle () const

Static Public Attributes

static const int BIND = 0
static const int UNBIND = 2
static const int SEARCH = 3
static const int MODIFY = 7
static const int ADD = 8
static const int DELETE = 10
static const int COMPARE = 14

Protected Attributes

bool m_isReferral
int m_requestType
LDAPConstraintsm_cons
LDAPAsynConnectionm_connection
const LDAPRequestm_parent
int m_hopCount
int m_msgID

Private Attributes

std::string m_dn

Detailed Description

Definition at line 13 of file LDAPDeleteRequest.h.


Constructor & Destructor Documentation

Definition at line 18 of file LDAPDeleteRequest.cpp.

                                                                  :
        LDAPRequest(req){
       DEBUG(LDAP_DEBUG_CONSTRUCT, 
              "LDAPDeleteRequest::LDAPDeleteRequest(&)" << endl);
    m_dn = req.m_dn;
}

Here is the caller graph for this function:

LDAPDeleteRequest::LDAPDeleteRequest ( const std::string &  dn,
LDAPAsynConnection connect,
const LDAPConstraints cons,
bool  isReferral = false,
const LDAPRequest parent = 0 
)

Definition at line 25 of file LDAPDeleteRequest.cpp.

        : LDAPRequest(connect, cons, isReferral, parent) {
       DEBUG(LDAP_DEBUG_CONSTRUCT,
            "LDAPDeleteRequest::LDAPDeleteRequest()" << endl);
       DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER, "   dn:" << dn << endl);
    m_requestType=LDAPRequest::DELETE;
    m_dn=dn;
}

Definition at line 36 of file LDAPDeleteRequest.cpp.

                                     {
    DEBUG(LDAP_DEBUG_DESTROY,
          "LDAPDeleteRequest::~LDAPDeleteRequest()" << endl);
}

Member Function Documentation

bool LDAPRequest::equals ( const LDAPRequest req) const [virtual, inherited]

Compare this request with another on.

And returns true if they have the same parameters.

Reimplemented in LDAPSearchRequest.

Definition at line 116 of file LDAPRequest.cpp.

                                                    {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::equals()" << endl);
    if( (this->m_requestType == req->getType()) && 
        (this->m_connection->getHost() == req->m_connection->getHost()) && 
        (this->m_connection->getPort() == req->m_connection->getPort())
      ){
        return true;
    }return false;        
}

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented from LDAPRequest.

Definition at line 58 of file LDAPDeleteRequest.cpp.

                                                           {
       DEBUG(LDAP_DEBUG_TRACE, "LDAPDeleteRequest::followReferral()" << endl);
    LDAPUrlList::const_iterator usedUrl;
    LDAPUrlList urls= ((LDAPResult*)refs)->getReferralUrls();
    LDAPAsynConnection* con=0;
    try{
        con = getConnection()->referralConnect(urls,usedUrl,m_cons);
    }catch (LDAPException e){
        delete con;
        return 0;
    }
    if(con != 0){
        return new LDAPDeleteRequest(m_dn, con, m_cons, true, this);
    }
    return 0;
}

Here is the call graph for this function:

Definition at line 86 of file LDAPRequest.cpp.

                                                          {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getConnection()" << endl);
    return m_connection;
}

Here is the caller graph for this function:

Definition at line 81 of file LDAPRequest.cpp.

                                                        {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getConstraints()" << endl);
    return m_cons;
}

Here is the caller graph for this function:

int LDAPRequest::getHopCount ( ) const [inherited]

Definition at line 101 of file LDAPRequest.cpp.

                                   {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getHopCount()" << endl);
    return m_hopCount;
}

Here is the caller graph for this function:

int LDAPRequest::getMsgID ( ) const [inherited]

Definition at line 96 of file LDAPRequest.cpp.

                                {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getMsgId()" << endl);
    return m_msgID;
}

Here is the caller graph for this function:

LDAPMsg * LDAPRequest::getNextMessage ( ) const [virtual, inherited]

Reimplemented in LDAPSaslInteractiveBind.

Definition at line 51 of file LDAPRequest.cpp.

{
    DEBUG(LDAP_DEBUG_DESTROY,"LDAPRequest::getNextMessage()" << endl);
    int res;
    LDAPMessage *msg;

    res=ldap_result(this->m_connection->getSessionHandle(),
            this->m_msgID,0,0,&msg);

    if (res <= 0){
        if(msg != 0){
            ldap_msgfree(msg);
        }
        throw  LDAPException(this->m_connection);
    }else{    
        LDAPMsg *ret=0;
        //this can  throw an exception (Decoding Error)
        ret = LDAPMsg::create(this,msg);
        ldap_msgfree(msg);
        return ret;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

const LDAPRequest * LDAPRequest::getParent ( ) const [inherited]
Returns:
The LDAPRequest that has created this object. Or 0 if this object was not created by another request.

Definition at line 106 of file LDAPRequest.cpp.

                                               {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getParent()" << endl);
    return m_parent;
}

Here is the caller graph for this function:

int LDAPRequest::getType ( ) const [inherited]

Definition at line 91 of file LDAPRequest.cpp.

                               {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::getType()" << endl);
    return m_requestType;
}

Here is the caller graph for this function:

bool LDAPRequest::isCycle ( ) const [inherited]

Definition at line 126 of file LDAPRequest.cpp.

                               {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::isCycle()" << endl);
    const LDAPRequest* parent=m_parent;
    if(parent != 0){
        do{
            if(this->equals(parent)){
                return true;
            }else{
                parent=parent->getParent();
            }
        }
        while(parent != 0);
    }
    return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool LDAPRequest::isReferral ( ) const [inherited]
Returns:
true if this object was created during the automatic chasing of referrals. Otherwise false

Definition at line 111 of file LDAPRequest.cpp.

                                   {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::isReferral()" << endl);
    return m_isReferral;
}

Here is the caller graph for this function:

This method encodes the request an calls the apprpriate functions of the C-API to send the Request to a LDAP-Server.

Implements LDAPRequest.

Definition at line 41 of file LDAPDeleteRequest.cpp.

                                                {
       DEBUG(LDAP_DEBUG_TRACE, "LDAPDeleteRequest::sendRequest()" << endl);
    int msgID=0;
    LDAPControl** tmpSrvCtrls=m_cons->getSrvCtrlsArray();
    LDAPControl** tmpClCtrls=m_cons->getClCtrlsArray();
    int err=ldap_delete_ext(m_connection->getSessionHandle(),m_dn.c_str(), 
            tmpSrvCtrls, tmpClCtrls ,&msgID);
    LDAPControlSet::freeLDAPControlArray(tmpSrvCtrls);
    LDAPControlSet::freeLDAPControlArray(tmpClCtrls);
    if(err != LDAP_SUCCESS){
        throw LDAPException(err);
    }else{
        m_msgID=msgID;
        return new LDAPMessageQueue(this);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void LDAPRequest::unbind ( ) const [inherited]

Definition at line 142 of file LDAPRequest.cpp.

                              {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPRequest::unbind()" << endl);
    m_connection->unbind();
}

Here is the caller graph for this function:


Member Data Documentation

const int LDAPRequest::ADD = 8 [static, inherited]

Definition at line 32 of file LDAPRequest.h.

const int LDAPRequest::BIND = 0 [static, inherited]

Definition at line 28 of file LDAPRequest.h.

const int LDAPRequest::COMPARE = 14 [static, inherited]

Definition at line 34 of file LDAPRequest.h.

const int LDAPRequest::DELETE = 10 [static, inherited]

Definition at line 33 of file LDAPRequest.h.

Definition at line 82 of file LDAPRequest.h.

LDAPConstraints* LDAPRequest::m_cons [protected, inherited]

Definition at line 81 of file LDAPRequest.h.

std::string LDAPDeleteRequest::m_dn [private]

Definition at line 24 of file LDAPDeleteRequest.h.

int LDAPRequest::m_hopCount [protected, inherited]

Definition at line 84 of file LDAPRequest.h.

bool LDAPRequest::m_isReferral [protected, inherited]

Definition at line 79 of file LDAPRequest.h.

int LDAPRequest::m_msgID [protected, inherited]

Definition at line 85 of file LDAPRequest.h.

const LDAPRequest* LDAPRequest::m_parent [protected, inherited]

Definition at line 83 of file LDAPRequest.h.

int LDAPRequest::m_requestType [protected, inherited]

Definition at line 80 of file LDAPRequest.h.

const int LDAPRequest::MODIFY = 7 [static, inherited]

Definition at line 31 of file LDAPRequest.h.

const int LDAPRequest::SEARCH = 3 [static, inherited]

Definition at line 30 of file LDAPRequest.h.

const int LDAPRequest::UNBIND = 2 [static, inherited]

Definition at line 29 of file LDAPRequest.h.


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