aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2011-04-07 18:27:51 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2011-04-07 18:27:51 +0000
commit194762951e6a59808350032f38e05cd0e5d03807 (patch)
treec766a97835dad98838906710be77a2197099e1e9 /tests/tests.cpp
parentfafebd0f90dd8b6fe311e0384898653632072539 (diff)
downloadqxmpp-194762951e6a59808350032f38e05cd0e5d03807.tar.gz
make password checking full asynchronous
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index f603a31d..f7511078 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -33,10 +33,10 @@
#include "QXmppArchiveIq.h"
#include "QXmppBindIq.h"
#include "QXmppClient.h"
-#include "QXmppIncomingClient.h"
#include "QXmppJingleIq.h"
#include "QXmppMessage.h"
#include "QXmppNonSASLAuth.h"
+#include "QXmppPasswordChecker.h"
#include "QXmppPresence.h"
#include "QXmppPubSubIq.h"
#include "QXmppRpcIq.h"
@@ -941,25 +941,24 @@ public:
};
/// Retrieves the password for the given username.
- Error getPassword(const QString &username, const QString &domain, QString &password)
+ QXmppPasswordReply::Error getPassword(const QXmppPasswordRequest &request, QString &password)
{
- Q_UNUSED(domain);
-
- if (username == m_username)
+ if (request.username() == m_username)
{
password = m_password;
- return NoError;
+ return QXmppPasswordReply::NoError;
} else {
- return AuthorizationError;
+ return QXmppPasswordReply::AuthorizationError;
}
};
+ /// Sets whether getPassword() is enabled.
void setGetPassword(bool getPassword)
{
m_getPassword = getPassword;
}
- /// Returns true as we implemented getPassword().
+ /// Returns whether getPassword() is enabled.
bool hasGetPassword() const
{
return m_getPassword;