From 51eef84fd4104f19228ebd85fce89658b64464a2 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Fri, 20 Jul 2012 17:37:38 +0200 Subject: make SASL code fully private --- src/base/QXmppSaslAuth.h | 102 ----------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 src/base/QXmppSaslAuth.h (limited to 'src/base/QXmppSaslAuth.h') diff --git a/src/base/QXmppSaslAuth.h b/src/base/QXmppSaslAuth.h deleted file mode 100644 index f436cdf3..00000000 --- a/src/base/QXmppSaslAuth.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2008-2012 The QXmpp developers - * - * Authors: - * Manjeet Dahiya - * Jeremy Lainé - * - * Source: - * http://code.google.com/p/qxmpp - * - * This file is a part of QXmpp library. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - */ - -#ifndef QXMPPSASLAUTH_H -#define QXMPPSASLAUTH_H - -#include "QXmppGlobal.h" -#include "QXmppLogger.h" - -class QXmppSaslClientPrivate; -class QXmppSaslServerPrivate; - -/// The QXmppSaslClient class is the base class for all SASL client -/// authentication methods. - -class QXMPP_EXPORT QXmppSaslClient : public QXmppLoggable -{ -public: - QXmppSaslClient(QObject *parent = 0); - virtual ~QXmppSaslClient(); - - QString host() const; - void setHost(const QString &host); - - QString serviceType() const; - void setServiceType(const QString &serviceType); - - QString username() const; - void setUsername(const QString &username); - - QString password() const; - void setPassword(const QString &password); - - virtual QString mechanism() const = 0; - virtual bool respond(const QByteArray &challenge, QByteArray &response) = 0; - - static QStringList availableMechanisms(); - static QXmppSaslClient* create(const QString &mechanism, QObject *parent = 0); - -private: - QXmppSaslClientPrivate *d; -}; - -/// The QXmppServerClient class is the base class for all SASL server -/// authentication methods. - -class QXMPP_EXPORT QXmppSaslServer : public QXmppLoggable -{ -public: - enum Response { - Challenge = 0, - Succeeded = 1, - Failed = 2, - InputNeeded = 3 - }; - - QXmppSaslServer(QObject *parent = 0); - virtual ~QXmppSaslServer(); - - QString username() const; - void setUsername(const QString &username); - - QString password() const; - void setPassword(const QString &password); - - QByteArray passwordDigest() const; - void setPasswordDigest(const QByteArray &digest); - - QString realm() const; - void setRealm(const QString &realm); - - virtual QString mechanism() const = 0; - virtual Response respond(const QByteArray &challenge, QByteArray &response) = 0; - - static QXmppSaslServer* create(const QString &mechanism, QObject *parent = 0); - -private: - QXmppSaslServerPrivate *d; -}; - -#endif -- cgit v1.2.3