aboutsummaryrefslogtreecommitdiff
path: root/examples/example_8_server
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 /examples/example_8_server
parentfafebd0f90dd8b6fe311e0384898653632072539 (diff)
downloadqxmpp-194762951e6a59808350032f38e05cd0e5d03807.tar.gz
make password checking full asynchronous
Diffstat (limited to 'examples/example_8_server')
-rw-r--r--examples/example_8_server/main.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/example_8_server/main.cpp b/examples/example_8_server/main.cpp
index bd24ebda..716d1aeb 100644
--- a/examples/example_8_server/main.cpp
+++ b/examples/example_8_server/main.cpp
@@ -24,7 +24,7 @@
#include <QtCore/QCoreApplication>
#include "QXmppLogger.h"
-#include "QXmppIncomingClient.h"
+#include "QXmppPasswordChecker.h"
#include "QXmppServer.h"
#define USERNAME "qxmpp.test1"
@@ -33,16 +33,14 @@
class passwordChecker : public QXmppPasswordChecker
{
/// Retrieves the password for the given username.
- QXmppPasswordChecker::Error getPassword(const QString &username, const QString &domain, QString &password)
+ QXmppPasswordReply::Error getPassword(const QXmppPasswordRequest &request, QString &password)
{
- Q_UNUSED(domain);
-
- if (username == USERNAME)
+ if (request.username() == USERNAME)
{
password = PASSWORD;
- return NoError;
+ return QXmppPasswordReply::NoError;
} else {
- return AuthorizationError;
+ return QXmppPasswordReply::AuthorizationError;
}
};