00001
00002
00003
00004
00005
00006
00007 #ifndef LDAP_CONSTRAINTS_H
00008 #define LDAP_CONSTRAINTS_H
00009 #include <list>
00010
00011 #include <LDAPControl.h>
00012 #include <LDAPControlSet.h>
00013 #include <LDAPRebind.h>
00014
00015
00016
00017
00018
00019
00020
00026 class LDAPConstraints{
00027
00028 public :
00029 static const int DEREF_NEVER = 0x00;
00030 static const int DEREF_SEARCHING = 0x01;
00031 static const int DEREF_FINDING = 0x02;
00032 static const int DEREF_ALWAYS = 0x04;
00033
00034
00035 LDAPConstraints();
00036
00037
00038 LDAPConstraints(const LDAPConstraints& c);
00039
00040 ~LDAPConstraints();
00041
00042 void setAliasDeref(int deref);
00043 void setMaxTime(int t);
00044 void setSizeLimit(int s);
00045 void setReferralChase(bool rc);
00046 void setHopLimit(int hop);
00047 void setReferralRebind(const LDAPRebind* rebind);
00048 void setServerControls(const LDAPControlSet* ctrls);
00049 void setClientControls(const LDAPControlSet* ctrls);
00050
00051 int getAliasDeref() const;
00052 int getMaxTime() const ;
00053 int getSizeLimit() const;
00054 const LDAPRebind* getReferralRebind() const;
00055 const LDAPControlSet* getServerControls() const;
00056 const LDAPControlSet* getClientControls() const;
00057
00058
00059 LDAPControl** getSrvCtrlsArray() const;
00060
00061
00062 LDAPControl** getClCtrlsArray() const;
00063
00064
00065 timeval* getTimeoutStruct() const;
00066 bool getReferralChase() const ;
00067 int getHopLimit() const;
00068
00069 private :
00070 int m_aliasDeref;
00071
00072
00073 int m_maxTime;
00074
00075
00076 int m_maxSize;
00077
00078
00079 bool m_referralChase;
00080
00081
00082 int m_HopLimit;
00083
00084
00085 int m_deref;
00086
00087
00088 const LDAPRebind* m_refRebind;
00089
00090
00091 LDAPControlSet* m_clientControls;
00092
00093
00094 LDAPControlSet* m_serverControls;
00095
00096 };
00097 #endif //LDAP_CONSTRAINTS_H