2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 // $Id: LDAPConstraints.cpp,v 1.10 2000/08/31 17:43:48 rhafer Exp $
9 #include "LDAPConstraints.h"
10 //#include "LDAPAsynConnection.h"
12 LDAPConstraints::LDAPConstraints(){
13 m_maxTime=LDAP_NO_LIMIT;
14 m_maxSize=LDAP_NO_LIMIT;
18 LDAPConstraints::LDAPConstraints(const LDAPConstraints& c){
19 m_maxTime=c.m_maxTime;
20 m_maxSize=c.m_maxSize;
21 m_referralChase=c.m_referralChase;
24 LDAPConstraints::~LDAPConstraints(){
25 DEBUG(LDAP_DEBUG_TRACE,"LDAPConstraints::~LDAPConstraints()" << endl);
28 void LDAPConstraints::setMaxTime(int t){
32 void LDAPConstraints::setSizeLimit(int s){
36 void LDAPConstraints::setReferralChase(bool rc){
39 int LDAPConstraints::getMaxTime() const {
43 int LDAPConstraints::getSizeLimit() const {
48 LDAPControl** LDAPConstraints::getSrvCtrlsArray() const {
53 LDAPControl** LDAPConstraints::getClCtrlsArray() const {
57 timeval* LDAPConstraints::getTimeoutStruct() const {
58 if(m_maxTime == LDAP_NO_LIMIT){
61 timeval *ret = new timeval;
62 ret->tv_sec=m_maxTime;
68 bool LDAPConstraints::getReferralChase() const {
69 return m_referralChase;