From 4ecc0dcf7934dd0d43be634d03da799af82f91e1 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Thu, 26 Aug 2010 07:39:14 +0000 Subject: improve QXmppPasswordChecker class --- src/QXmppIncomingClient.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/QXmppIncomingClient.h') diff --git a/src/QXmppIncomingClient.h b/src/QXmppIncomingClient.h index 65acf842..a6be0a54 100644 --- a/src/QXmppIncomingClient.h +++ b/src/QXmppIncomingClient.h @@ -35,10 +35,24 @@ class QXmppPasswordChecker { public: /// Checks that the given credentials are valid. - virtual bool check(const QString &username, const QString &password) = 0; + virtual bool checkCredentials(const QString &username, const QString &password) = 0; /// Retrieves the password for the given username. - virtual bool get(const QString &username, QString &password) = 0; + /// + /// Reimplement this method to support DIGEST-MD5 authentication. + virtual bool getPassword(const QString &username, QString &password) + { + return false; + }; + + /// Returns true if it is possible to retrieve passwords. + /// + /// Reimplement this method and return true if you provided a + /// getPassword() method. + virtual bool hasPasswords() const + { + return false; + }; }; /// \brief The QXmppIncomingClient class represents an incoming XMPP stream -- cgit v1.2.3