ldapsdk  0.0.1
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
LDAPRequest Class Reference

For internal use only. More...

#include <LDAPRequest.h>

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

List of all members.

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.
virtual LDAPRequest * followReferral (LDAPMsg *ref)
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 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::LDAPRequest ( const LDAPRequest &  req)
LDAPRequest::LDAPRequest ( LDAPAsynConnection *  conn,
const LDAPConstraints *  cons,
bool  isReferral = false,
const LDAPRequest *  parent = 0 
)
LDAPRequest::~LDAPRequest ( )
virtual

References DEBUG, and LDAP_DEBUG_DESTROY.

LDAPRequest::LDAPRequest ( )
protected

References DEBUG, and LDAP_DEBUG_CONSTRUCT.


Member Function Documentation

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().

LDAPRequest * LDAPRequest::followReferral ( LDAPMsg *  ref)
virtual
const LDAPAsynConnection * LDAPRequest::getConnection ( ) const
const LDAPConstraints * LDAPRequest::getConstraints ( ) const
int LDAPRequest::getHopCount ( ) const
int LDAPRequest::getMsgID ( ) const

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPAsynConnection::abandon().

LDAPMsg * LDAPRequest::getNextMessage ( ) const
virtual
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().

int LDAPRequest::getType ( ) const

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by equals().

bool LDAPRequest::isCycle ( ) const
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(), and LDAPSearchRequest::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().

void LDAPRequest::unbind ( ) const

References DEBUG, and LDAP_DEBUG_TRACE.

Referenced by LDAPMessageQueue::getNext().


Member Data Documentation

const int LDAPRequest::ADD = 8
static
const int LDAPRequest::BIND = 0
static
const int LDAPRequest::COMPARE = 14
static
const int LDAPRequest::DELETE = 10
static
LDAPAsynConnection* LDAPRequest::m_connection
protected
LDAPConstraints* LDAPRequest::m_cons
protected
int LDAPRequest::m_hopCount
protected

Referenced by LDAPRequest().

bool LDAPRequest::m_isReferral
protected

Referenced by LDAPRequest().

int LDAPRequest::m_msgID
protected
const LDAPRequest* LDAPRequest::m_parent
protected

Referenced by LDAPRequest().

int LDAPRequest::m_requestType
protected
const int LDAPRequest::MODIFY = 7
static
const int LDAPRequest::SEARCH = 3
static
const int LDAPRequest::UNBIND = 2
static

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