KLDAP Library
ldapobject.h
00001 /* 00002 This file is part of libkldap. 00003 Copyright (c) 2004-2006 Szombathelyi György <gyurco@freemail.hu> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:00:05 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:00:05 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.