00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <QObject>
00025 #include <QMetaType>
00026
00027 #include "libsignoncommon.h"
00028 #include "authsession.h"
00029 #include "authsessionimpl.h"
00030
00031
00032 namespace SignOn {
00033
00034 AuthSession::AuthSession(quint32 id, const QString &methodName, QObject *parent)
00035 : QObject(parent),
00036 impl(new AuthSessionImpl(this, id, methodName))
00037 {
00038 qRegisterMetaType<SessionData>("SessionData");
00039 qRegisterMetaType<AuthSessionState>("AuthSession::AuthSessionState");
00040
00041 if (qMetaTypeId<SessionData>() < QMetaType::User)
00042 BLAME() << "AuthSession::AuthSession() - SessionData meta type not registered.";
00043
00044 if (qMetaTypeId<AuthSessionState>() < QMetaType::User)
00045 BLAME() << "AuthSession::AuthSession() - AuthSessionState meta type not registered.";
00046
00047 }
00048
00049 AuthSession::~AuthSession()
00050 {
00051 delete impl;
00052 }
00053
00054 const QString AuthSession::name() const
00055 {
00056 return impl->name();
00057 }
00058
00059 void AuthSession::queryAvailableMechanisms(const QStringList &wantedMechanisms)
00060 {
00061 impl->queryAvailableMechanisms(wantedMechanisms);
00062 }
00063
00064 void AuthSession::process(const SessionData& sessionData, const QString &mechanism)
00065 {
00066 impl->process(sessionData, mechanism);
00067 }
00068
00069 void AuthSession::cancel()
00070 {
00071 impl->cancel();
00072 }
00073
00074 }