2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 // $Id: LDAPSearchReference.cpp,v 1.7 2000/08/31 17:43:49 rhafer Exp $
11 #include "LDAPSearchReference.h"
12 #include "LDAPException.h"
13 #include "LDAPRequest.h"
16 LDAPSearchReference::LDAPSearchReference(LDAPRequest *req, LDAPMessage *msg) :
18 DEBUG(LDAP_DEBUG_TRACE,"LDAPSearchReference::LDAPSearchReference()"
21 const LDAPAsynConnection* con=req->getConnection();
22 int err = ldap_parse_reference(con->getSessionHandle(), msg, &ref, 0,0);
23 if (err != LDAP_SUCCESS){
24 throw LDAPException(err);
27 for (tmp=ref; *tmp != 0; tmp++){
28 m_urlList.push_back( new LDAPUrl(*tmp) );
29 DEBUG(LDAP_DEBUG_PARAMETER," URL:" << *tmp << endl);
34 LDAPSearchReference::~LDAPSearchReference(){
35 LDAPUrlList::const_iterator i;
36 for(i=m_urlList.begin(); i!=m_urlList.end(); i++){
41 LDAPUrlList* LDAPSearchReference::getURLs(){