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 #include "debug.h"
00031
00032
00033 namespace SignOn {
00034
00035 AuthSession::AuthSession(quint32 id, const QString &methodName,
00036 QObject *parent):
00037 QObject(parent),
00038 impl(new AuthSessionImpl(this, id, methodName))
00039 {
00040 initDebug();
00041
00042 qRegisterMetaType<SessionData>("SessionData");
00043 qRegisterMetaType<AuthSessionState>("AuthSession::AuthSessionState");
00044
00045 if (qMetaTypeId<SessionData>() < QMetaType::User)
00046 BLAME() << "AuthSession::AuthSession() - "
00047 "SessionData meta type not registered.";
00048
00049 if (qMetaTypeId<AuthSessionState>() < QMetaType::User)
00050 BLAME() << "AuthSession::AuthSession() - "
00051 "AuthSessionState meta type not registered.";
00052
00053 }
00054
00055 AuthSession::~AuthSession()
00056 {
00057 delete impl;
00058 }
00059
00060 const QString AuthSession::name() const
00061 {
00062 return impl->name();
00063 }
00064
00065 void AuthSession::queryAvailableMechanisms(const QStringList &wantedMechanisms)
00066 {
00067 impl->queryAvailableMechanisms(wantedMechanisms);
00068 }
00069
00070 void AuthSession::process(const SessionData& sessionData,
00071 const QString &mechanism)
00072 {
00073 impl->process(sessionData, mechanism);
00074 }
00075
00076 void AuthSession::cancel()
00077 {
00078 impl->cancel();
00079 }
00080
00081 }