KLdap

ldapobject.h
1 /*
2  This file is part of libkldap.
3  Copyright (c) 2004-2006 Szombathelyi Gy├Ârgy <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KLDAP_LDAPOBJECT_H
22 #define KLDAP_LDAPOBJECT_H
23 
24 #include <QList>
25 #include <QMap>
26 #include <QSharedDataPointer>
27 #include <QString>
28 class LdapObjectPrivate;
29 
30 #include "ldapdn.h"
31 #include "kldap_export.h"
32 
33 // clazy:excludeall=copyable-polymorphic
34 
35 namespace KLDAP {
36 typedef QList<QByteArray> LdapAttrValue;
37 typedef QMap<QString, LdapAttrValue > LdapAttrMap;
38 
43 class KLDAP_EXPORT LdapObject
44 {
45 public:
46  LdapObject();
47  explicit LdapObject(const QString &dn);
48  ~LdapObject();
49 
50  LdapObject(const LdapObject &that);
51  LdapObject &operator=(const LdapObject &that);
52 
56  Q_REQUIRED_RESULT QString toString() const;
57 
61  void clear();
65  void setDn(const LdapDN &dn);
69  void setDn(const QString &dn);
73  void setAttributes(const LdapAttrMap &attrs);
80  void setValues(const QString &attributeName, const LdapAttrValue &values);
87  void addValue(const QString &attributeName, const QByteArray &value);
91  Q_REQUIRED_RESULT LdapDN dn() const;
95  const LdapAttrMap &attributes() const;
99  Q_REQUIRED_RESULT LdapAttrValue values(const QString &attributeName) const;
104  Q_REQUIRED_RESULT QByteArray value(const QString &attributeName) const;
108  Q_REQUIRED_RESULT bool hasAttribute(const QString &attributeName) const;
109 
110 private:
112 };
113 
115 }
116 
117 #endif
QVector< V > values(const QMultiHash< K, V > &c)
Definition: ber.h:30
This class represents an LDAP Object.
Definition: ldapobject.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed May 27 2020 22:37:12 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.