2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
11 #include <LDAPAttributeList.h>
13 class LDAPAsynConnection;
16 * This class is used to store every kind of LDAP Entry.
24 LDAPEntry(const LDAPEntry& entry);
27 * Constructs a new entry (also used as standard constructor).
29 * @param dn The Distinguished Name for the new entry.
30 * @param attrs The attributes for the new entry.
32 LDAPEntry(const std::string& dn=std::string(),
33 const LDAPAttributeList *attrs=new LDAPAttributeList());
36 * Used internally only.
38 * The constructor is used internally to create a LDAPEntry from
39 * the C-API's data structurs.
41 LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg);
49 * Sets the DN-attribute.
50 * @param dn: The new DN for the entry.
52 void setDN(const std::string& dn);
55 * Sets the attributes of the entry.
56 * @param attr: A pointer to a std::list of the new attributes.
58 void setAttributes(LDAPAttributeList *attrs);
61 * @returns The current DN of the entry.
63 const std::string& getDN() const ;
66 * @returns A const pointer to the attributes of the entry.
68 const LDAPAttributeList* getAttributes() const;
71 * This method can be used to dump the data of a LDAPResult-Object.
72 * It is only useful for debugging purposes at the moment
74 friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le);
78 LDAPAttributeList *m_attrs;