00001 /* 00002 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. 00003 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file 00004 */ 00005 00006 00007 #ifndef LDAP_ENTRY_H 00008 #define LDAP_ENTRY_H 00009 #include <ldap.h> 00010 00011 #include <LDAPAttributeList.h> 00012 00013 class LDAPAsynConnection; 00014 00018 class LDAPEntry{ 00019 00020 public : 00024 LDAPEntry(const LDAPEntry& entry); 00025 00032 LDAPEntry(const std::string& dn=std::string(), 00033 const LDAPAttributeList *attrs=new LDAPAttributeList()); 00034 00041 LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg); 00042 00046 ~LDAPEntry(); 00047 00052 void setDN(const std::string& dn); 00053 00058 void setAttributes(LDAPAttributeList *attrs); 00059 00067 const LDAPAttribute* getAttributeByName(const std::string& name) const; 00068 00074 void addAttribute(const LDAPAttribute& attr); 00075 00081 void replaceAttribute(const LDAPAttribute& attr); 00082 00086 const std::string& getDN() const ; 00087 00091 const LDAPAttributeList* getAttributes() const; 00092 00097 friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le); 00098 00099 private : 00100 LDAPAttributeList *m_attrs; 00101 std::string m_dn; 00102 }; 00103 #endif //LDAP_ENTRY_H
1.5.5