00001 /* 00002 * $Id$ 00003 * Kockpit - an Qt application for user/group management on unix based systems. 00004 * 00005 * Copyright (C) 2010 Julian Thome 00006 * 00007 * This program is free software; you can redistribute it and/or modify it under the terms of 00008 * the GNU General Public License as published by the Free Software Foundation; 00009 * either version 3 of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 00012 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00013 * See the GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along with this program; 00016 * if not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 #ifndef LDAPMODULE_H 00019 #define LDAPMODULE_H 00020 00021 #include <QVariant> 00022 #include <QString> 00023 #include <QStringList> 00024 #include <LDAPConnection.h> 00025 00026 #include "kockpitmodule.h" 00027 #include "attributemap.h" 00028 00030 00033 class LDAPModule: public QObject, public KockpitModule{ 00034 00035 Q_OBJECT 00036 Q_INTERFACES(KockpitModule) 00037 00038 public: 00040 00043 LDAPModule(); 00045 virtual ~LDAPModule(){ } 00046 00048 00053 void connect(const KockpitAuthObj &authobj); 00054 00056 00060 void bind(KockpitAuthObj &authobj); 00061 00063 00068 void reset(KockpitAuthObj &authobj); 00069 00071 void disconnect(); 00072 00073 // -- also documented in kockpitmodule 00074 void build(QList<KockpitUnitMap*>* kuml, const KockpitBaseObj &baseobj); 00075 void createEntry(KockpitUnitMap* kunit); 00076 void deleteEntry(KockpitUnitMap* kunit); 00077 void modifyEntry(KockpitUnitMap* kunit); 00078 // -- 00079 00081 00088 Q_INVOKABLE QStringList getAttrs(const QString &base, const QString &attr); 00089 00090 private: 00092 LDAPConnection *conn; 00093 }; 00094 00095 Q_DECLARE_METATYPE(LDAPModule*); 00096 00097 #endif // LDAPMODULE_H