2 * Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
3 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
11 #include <LDAPAsynConnection.h>
12 #include <LDAPAttributeList.h>
15 * This class is used to store every kind of LDAP Entry.
23 LDAPEntry(const LDAPEntry& entry);
26 * Constructs a new entry (also used as standard constructor).
28 * @param dn The Distinguished Name for the new entry.
29 * @param attrs The attributes for the new entry.
31 LDAPEntry(const std::string& dn=std::string(),
32 const LDAPAttributeList *attrs=new LDAPAttributeList());
35 * Used internally only.
37 * The constructor is used internally to create a LDAPEntry from
38 * the C-API's data structurs.
40 LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg);
48 * Sets the DN-attribute.
49 * @param dn: The new DN for the entry.
51 void setDN(const std::string& dn);
54 * Sets the attributes of the entry.
55 * @param attr: A pointer to a std::list of the new attributes.
57 void setAttributes(LDAPAttributeList *attrs);
60 * @returns The current DN of the entry.
62 const std::string& getDN() const ;
65 * @returns A const pointer to the attributes of the entry.
67 const LDAPAttributeList* getAttributes() const;
70 * This method can be used to dump the data of a LDAPResult-Object.
71 * It is only useful for debugging purposes at the moment
73 friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le);
77 LDAPAttributeList *m_attrs;