signon
8.58
|
00001 /* 00002 * This file is part of signon 00003 * 00004 * Copyright (C) 2009-2010 Nokia Corporation. 00005 * Copyright (C) 2012 Canonical Ltd. 00006 * 00007 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public License 00011 * version 2.1 as published by the Free Software Foundation. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 */ 00023 #ifndef SIGNONAUTHSESSIONADAPTOR_H_ 00024 #define SIGNONAUTHSESSIONADAPTOR_H_ 00025 00026 #include <QtCore> 00027 #include <QtDBus> 00028 00029 #include "signond-common.h" 00030 #include "signonauthsession.h" 00031 00032 namespace SignonDaemonNS { 00033 00034 class SignonAuthSessionAdaptor: public QDBusAbstractAdaptor 00035 { 00036 Q_OBJECT 00037 Q_CLASSINFO("D-Bus Interface", 00038 "com.google.code.AccountsSSO.SingleSignOn.AuthSession") 00039 00040 public: 00041 SignonAuthSessionAdaptor(SignonAuthSession *parent); 00042 virtual ~SignonAuthSessionAdaptor(); 00043 00044 inline SignonAuthSession *parent() const { 00045 return static_cast<SignonAuthSession *>(QObject::parent()); 00046 } 00047 00048 private: 00049 void errorReply(const QString &name, const QString &message); 00050 00051 public Q_SLOTS: 00052 QStringList queryAvailableMechanisms(const QStringList &wantedMechanisms); 00053 QVariantMap process(const QVariantMap &sessionDataVa, 00054 const QString &mechanism); 00055 00056 Q_NOREPLY void cancel(); 00057 Q_NOREPLY void setId(quint32 id); 00058 Q_NOREPLY void objectUnref(); 00059 00060 Q_SIGNALS: 00061 void stateChanged(int state, const QString &message); 00062 void unregistered(); 00063 }; 00064 00065 } //namespace SignonDaemonNS 00066 00067 #endif /* SIGNONAUTHSESSIONADAPTOR_H_ */