00001
00002
00003
00004
00005
00006
00007 #ifndef LDAP_ATTRIBUTE_LIST_H
00008 #define LDAP_ATTRIBUTE_LIST_H
00009
00010 #include <ldap.h>
00011 #include <list>
00012 #include <string>
00013
00014 class LDAPAttribute;
00015 class LDAPAsynConnection;
00016 class LDAPMsg;
00017
00021 class LDAPAttributeList{
00022 typedef std::list<LDAPAttribute> ListType;
00023
00024 private :
00025 ListType m_attrs;
00026
00027 public :
00028 typedef ListType::const_iterator const_iterator;
00029 typedef ListType::iterator iterator;
00030
00031
00035 LDAPAttributeList(const LDAPAttributeList& al);
00036
00044 LDAPAttributeList(const LDAPAsynConnection *ld, LDAPMessage *msg);
00045
00049 LDAPAttributeList();
00050
00054 virtual ~LDAPAttributeList();
00055
00060 size_t size() const;
00061
00066 bool empty() const;
00067
00071 const_iterator begin() const;
00072
00077 const_iterator end() const;
00078
00085 const LDAPAttribute* getAttributeByName(const std::string& name) const;
00086
00087
00092 void addAttribute(const LDAPAttribute& attr);
00093
00098 LDAPMod** toLDAPModArray() const;
00099
00104 friend std::ostream& operator << (std::ostream& s,
00105 const LDAPAttributeList& al);
00106 };
00107
00108 #endif // LDAP_ATTRIBUTE_LIST_H
00109