ldapsdk 0.0.1
LDAPEntry.h
Go to the documentation of this file.
1// $OpenLDAP$
2/*
3 * Copyright 2000-2013 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5 */
6
7
8#ifndef LDAP_ENTRY_H
9#define LDAP_ENTRY_H
10#include <ldap.h>
11
12#include <LDAPAttributeList.h>
13
15
20
21 public :
25 LDAPEntry(const LDAPEntry& entry);
26
33 LDAPEntry(const std::string& dn=std::string(),
34 const LDAPAttributeList *attrs=0);
35
42 LDAPEntry(const LDAPAsynConnection *ld, LDAPMessage *msg);
43
47 ~LDAPEntry();
48
52 LDAPEntry& operator=(const LDAPEntry& from);
53
58 void setDN(const std::string& dn);
59
65
73 const LDAPAttribute* getAttributeByName(const std::string& name) const;
74
80 void addAttribute(const LDAPAttribute& attr);
81
87 void delAttribute(const std::string& type);
88
94 void replaceAttribute(const LDAPAttribute& attr);
95
99 const std::string& getDN() const ;
100
104 const LDAPAttributeList* getAttributes() const;
105
110 friend std::ostream& operator << (std::ostream& s, const LDAPEntry& le);
111
112 private :
113 LDAPAttributeList *m_attrs;
114 std::string m_dn;
115};
116#endif //LDAP_ENTRY_H
This class represents an asynchronous connection to an LDAP-Server.
Definition: LDAPAsynConnection.h:45
Represents the name an value(s) of an Attribute.
Definition: LDAPAttribute.h:21
This container class is used to store multiple LDAPAttribute-objects.
Definition: LDAPAttributeList.h:22
This class is used to store every kind of LDAP Entry.
Definition: LDAPEntry.h:19
const LDAPAttribute * getAttributeByName(const std::string &name) const
Get an Attribute by its AttributeType (simple wrapper around LDAPAttributeList::getAttributeByName() ...
Definition: LDAPEntry.cpp:81
const LDAPAttributeList * getAttributes() const
Definition: LDAPEntry.cpp:76
LDAPEntry & operator=(const LDAPEntry &from)
Assignment operator.
Definition: LDAPEntry.cpp:47
void addAttribute(const LDAPAttribute &attr)
Adds one Attribute to the List of Attributes (simple wrapper around LDAPAttributeList::addAttribute()...
Definition: LDAPEntry.cpp:86
const std::string & getDN() const
Definition: LDAPEntry.cpp:71
~LDAPEntry()
Destructor.
Definition: LDAPEntry.cpp:42
LDAPEntry(const std::string &dn=std::string(), const LDAPAttributeList *attrs=0)
Constructs a new entry (also used as standard constructor).
void setDN(const std::string &dn)
Sets the DN-attribute.
Definition: LDAPEntry.cpp:54
void replaceAttribute(const LDAPAttribute &attr)
Replace an Attribute in the List of Attributes (simple wrapper around LDAPAttributeList::replaceAttri...
Definition: LDAPEntry.cpp:96
friend std::ostream & operator<<(std::ostream &s, const LDAPEntry &le)
This method can be used to dump the data of a LDAPResult-Object.
void setAttributes(LDAPAttributeList *attrs)
Sets the attributes of the entry.
Definition: LDAPEntry.cpp:61
void delAttribute(const std::string &type)
Deletes all values of an Attribute from the list of Attributes (simple wrapper around LDAPAttributeLi...
Definition: LDAPEntry.cpp:91
LDAPEntry(const LDAPEntry &entry)
Copy-constructor.
Definition: LDAPEntry.cpp:16