KLDAP Library
ldapobject.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KLDAP_LDAPOBJECT_H
00022 #define KLDAP_LDAPOBJECT_H
00023
00024 #include <QtCore/QList>
00025 #include <QtCore/QMap>
00026 #include <QtCore/QSharedDataPointer>
00027 #include <QtCore/QString>
00028
00029 #include "ldapdn.h"
00030 #include "kldap_export.h"
00031
00032 namespace KLDAP {
00033
00034 typedef QList<QByteArray> LdapAttrValue;
00035 typedef QMap<QString,LdapAttrValue > LdapAttrMap;
00036
00041 class KLDAP_EXPORT LdapObject
00042 {
00043 public:
00044 LdapObject();
00045 explicit LdapObject( const QString &dn );
00046 virtual ~LdapObject();
00047
00048 LdapObject( const LdapObject &that );
00049 LdapObject &operator=( const LdapObject &that );
00050
00054 QString toString() const;
00055
00059 void clear();
00063 void setDn( const LdapDN &dn );
00067 void setDn( const QString &dn );
00071 void setAttributes( const LdapAttrMap &attrs );
00076 void setValues( const QString &attributeName, const LdapAttrValue &values );
00081 void addValue( const QString &attributeName, const QByteArray &value );
00085 LdapDN dn() const;
00089 const LdapAttrMap &attributes() const;
00093 LdapAttrValue values( const QString &attributeName ) const;
00098 QByteArray value( const QString &attributeName ) const;
00102 bool hasAttribute( const QString &attributeName ) const;
00103
00104 private:
00105 class Private;
00106 QSharedDataPointer<Private> d;
00107 };
00108
00109 typedef QList<LdapObject> LdapObjects;
00110 }
00111
00112 #endif