#ifndef LDAP_CONSTRAINTS_H
#define LDAP_CONSTRAINTS_H
#include <list>
#include <LDAPControl.h>
#include <LDAPControlSet.h>
#include <LDAPRebind.h>
class LDAPConstraints{
public :
static const int DEREF_NEVER = 0x00;
static const int DEREF_SEARCHING = 0x01;
static const int DEREF_FINDING = 0x02;
static const int DEREF_ALWAYS = 0x04;
LDAPConstraints();
LDAPConstraints(const LDAPConstraints& c);
~LDAPConstraints();
void setAliasDeref(int deref);
void setMaxTime(int t);
void setSizeLimit(int s);
void setReferralChase(bool rc);
void setHopLimit(int hop);
void setReferralRebind(const LDAPRebind* rebind);
void setServerControls(const LDAPControlSet* ctrls);
void setClientControls(const LDAPControlSet* ctrls);
int getAliasDeref() const;
int getMaxTime() const ;
int getSizeLimit() const;
const LDAPRebind* getReferralRebind() const;
const LDAPControlSet* getServerControls() const;
const LDAPControlSet* getClientControls() const;
LDAPControl** getSrvCtrlsArray() const;
LDAPControl** getClCtrlsArray() const;
timeval* getTimeoutStruct() const;
bool getReferralChase() const ;
int getHopLimit() const;
private :
int m_aliasDeref;
int m_maxTime;
int m_maxSize;
bool m_referralChase;
int m_HopLimit;
int m_deref;
const LDAPRebind* m_refRebind;
LDAPControlSet* m_clientControls;
LDAPControlSet* m_serverControls;
};
#endif //LDAP_CONSTRAINTS_H