ldapsdk  0.0.1
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
LDAPRequest Class Referenceabstract

For internal use only. More...

#include <LDAPRequest.h>

Inheritance diagram for LDAPRequest:
LDAPAddRequest LDAPBindRequest LDAPCompareRequest LDAPDeleteRequest LDAPExtRequest LDAPModDNRequest LDAPModifyRequest LDAPSaslBindRequest LDAPSaslInteractiveBind LDAPSearchRequest

Public Member Functions

 LDAPRequest (const LDAPRequest &req)
 
 LDAPRequest (LDAPAsynConnection *conn, const LDAPConstraints *cons, bool isReferral=false, const LDAPRequest *parent=0)
 
virtual ~LDAPRequest ()
 
const LDAPConstraints * getConstraints () const
 
const LDAPAsynConnection * getConnection () const
 
virtual LDAPMsg * getNextMessage () const
 
int getType () const
 
int getMsgID () const
 
int getHopCount () const
 
const LDAPRequest * getParent () const
 
bool isReferral () const
 
void unbind () const
 
virtual LDAPMessageQueue * sendRequest ()=0
 This method encodes the request an calls the apprpriate functions of the C-API to send the Request to a LDAP-Server. More...
 
virtual LDAPRequest * followReferral (LDAPMsg *ref)
 
virtual bool equals (const LDAPRequest *req) const
 Compare this request with another on. More...
 
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 Member Functions

 LDAPRequest ()
 

Protected Attributes

bool m_isReferral
 
int m_requestType
 
LDAPConstraints * m_cons
 
LDAPAsynConnection * m_connection
 
const LDAPRequest * m_parent
 
int m_hopCount
 
int m_msgID
 

Detailed Description

For internal use only.

Each request that is sent to a LDAP-server by this library is represented by a special object that contains the parameters and some other info of the request. This virtual class is the common base classe for these specialized request classes.

Constructor & Destructor Documentation

◆ LDAPRequest() [1/3]

LDAPRequest::LDAPRequest ( const LDAPRequest &  req)

◆ LDAPRequest() [2/3]

LDAPRequest::LDAPRequest ( LDAPAsynConnection *  conn,
const LDAPConstraints *  cons,
bool  isReferral = false,
const LDAPRequest *  parent = 0 
)

◆ ~LDAPRequest()

LDAPRequest::~LDAPRequest ( )
virtual

References DEBUG, and LDAP_DEBUG_DESTROY.

◆ LDAPRequest() [3/3]

LDAPRequest::LDAPRequest ( )
protected

References DEBUG, and LDAP_DEBUG_CONSTRUCT.

Member Function Documentation

◆ equals()

bool LDAPRequest::equals ( const LDAPRequest *  req) const
virtual

Compare this request with another on.

And returns true if they have the same parameters.

Reimplemented in LDAPSearchRequest.

References DEBUG, LDAPAsynConnection::getHost(), LDAPAsynConnection::getPort(), getType(), LDAP_DEBUG_TRACE, and m_connection.

Referenced by LDAPSearchRequest::equals().

◆ followReferral()

LDAPRequest * LDAPRequest::followReferral ( LDAPMsg *  ref)
virtual

◆ getConnection()

const LDAPAsynConnection * LDAPRequest::getConnection ( ) const

◆ getConstraints()

const LDAPConstraints * LDAPRequest::getConstraints ( ) const

◆ getHopCount()

int LDAPRequest::getHopCount ( ) const

◆ getMsgID()

int LDAPRequest::getMsgID ( ) const

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPAsynConnection::abandon().

◆ getNextMessage()

LDAPMsg * LDAPRequest::getNextMessage ( ) const
virtual

◆ getParent()

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

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by isCycle().

◆ getType()

int LDAPRequest::getType ( ) const

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by equals().

◆ isCycle()

bool LDAPRequest::isCycle ( ) const

◆ isReferral()

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

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPMessageQueue::getNext(), LDAPAddRequest::LDAPAddRequest(), and LDAPSearchRequest::sendRequest().

◆ sendRequest()

virtual LDAPMessageQueue* LDAPRequest::sendRequest ( )
pure virtual

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

Implemented in LDAPSaslInteractiveBind, LDAPSaslBindRequest, LDAPSearchRequest, LDAPBindRequest, LDAPModifyRequest, LDAPAddRequest, LDAPModDNRequest, LDAPCompareRequest, LDAPDeleteRequest, and LDAPExtRequest.

Referenced by LDAPMessageQueue::chaseReferral().

◆ unbind()

void LDAPRequest::unbind ( ) const

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPMessageQueue::getNext().

Member Data Documentation

◆ ADD

const int LDAPRequest::ADD =8
static

◆ BIND

const int LDAPRequest::BIND =0
static

◆ COMPARE

const int LDAPRequest::COMPARE =14
static

◆ DELETE

const int LDAPRequest::DELETE =10
static

◆ m_connection

LDAPAsynConnection* LDAPRequest::m_connection
protected

◆ m_cons

LDAPConstraints* LDAPRequest::m_cons
protected

◆ m_hopCount

int LDAPRequest::m_hopCount
protected

Referenced by LDAPRequest().

◆ m_isReferral

bool LDAPRequest::m_isReferral
protected

Referenced by LDAPRequest().

◆ m_msgID

int LDAPRequest::m_msgID
protected

◆ m_parent

const LDAPRequest* LDAPRequest::m_parent
protected

Referenced by LDAPRequest().

◆ m_requestType

int LDAPRequest::m_requestType
protected

◆ MODIFY

const int LDAPRequest::MODIFY =7
static

◆ SEARCH

const int LDAPRequest::SEARCH =3
static

◆ UNBIND

const int LDAPRequest::UNBIND =2
static

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