2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
6 // $Id: LDAPEntry.cpp,v 1.6 2000/08/31 17:43:48 rhafer Exp $
11 LDAPEntry::LDAPEntry(const LDAPEntry& entry){
12 DEBUG(LDAP_DEBUG_TRACE,"LDAPEntry::LDAPEntry(LDAPEntry&)" << endl);
13 this->setDN(entry.m_dn);
14 this->setAttributes(entry.m_attrs);
18 LDAPEntry::LDAPEntry(const char *dn,
19 LDAPAttributeList *attrs=new LDAPAttributeList()){
24 LDAPEntry::LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg){
25 DEBUG(LDAP_DEBUG_TRACE,"LDAPEntry::LDAPEntry()" << endl);
26 m_dn = ldap_get_dn(ld->getSessionHandle(),msg);
27 m_attrs = new LDAPAttributeList(ld, msg);
28 m_attrs->find("objectClass");
31 LDAPEntry::~LDAPEntry(){
32 DEBUG(LDAP_DEBUG_TRACE,"LDAPEntry::~LDAPEntry()" << endl);
37 void LDAPEntry::setDN(const char* dn){
44 void LDAPEntry::setAttributes(LDAPAttributeList *attrs){
51 char* LDAPEntry::getDN(){
55 LDAPAttributeList* LDAPEntry::getAttributes(){
59 ostream& operator << (ostream& s, const LDAPEntry& le){
60 s << "DN: " << le.m_dn << ": " << *(le.m_attrs);