X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fsqlauthenticator.h;fp=src%2Fcore%2Fsqlauthenticator.h;h=1b71ee2579d7a62c48484d18ac00961a5c1a06b8;hp=0000000000000000000000000000000000000000;hb=61aac1868f15babb7086d8bc6bbcff530346f438;hpb=dd69349ca91776432a4a53aa4d18dd8ef018cd26 diff --git a/src/core/sqlauthenticator.h b/src/core/sqlauthenticator.h new file mode 100644 index 00000000..1b71ee25 --- /dev/null +++ b/src/core/sqlauthenticator.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * Copyright (C) 2005-2015 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef SQLAUTHENTICATOR_H +#define SQLAUTHENTICATOR_H + +#include "authenticator.h" + +class SqlAuthenticator : public Authenticator +{ + Q_OBJECT + +public: + SqlAuthenticator(QObject *parent = 0); + virtual ~SqlAuthenticator(); + +public slots: + /* General */ + bool isAvailable() const; + QString displayName() const; + QString description() const; + virtual inline QStringList setupKeys() const { return QStringList(); } + virtual inline QVariantMap setupDefaults() const { return QVariantMap(); } + + bool setup(const QVariantMap &settings = QVariantMap()); + State init(const QVariantMap &settings = QVariantMap()); + UserId validateUser(const QString &user, const QString &password); + + /* User handling */ + //virtual UserId getUserId(const QString &username); + +}; + + +#endif