signon  8.58
ssotestplugin.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of signon
00003  *
00004  * Copyright (C) 2009-2010 Nokia Corporation.
00005  *
00006  * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * version 2.1 as published by the Free Software Foundation.
00011  *
00012  * This library is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00020  * 02110-1301 USA
00021  */
00022 
00023 #ifndef SSOTESTPLUGIN_H_
00024 #define SSOTESTPLUGIN_H_
00025 
00026 #include <QtCore>
00027 
00028 #include "SignOn/sessiondata.h"
00029 #include "SignOn/authpluginif.h"
00030 #include "SignOn/uisessiondata.h"
00031 
00032 namespace SsoTestPluginNS {
00033 
00034 class SsoTestPlugin: public AuthPluginInterface
00035 {
00036     Q_OBJECT
00037     Q_INTERFACES(AuthPluginInterface)
00038 public:
00039     SsoTestPlugin(QObject *parent = 0);
00040     virtual ~SsoTestPlugin();
00041 
00042 public Q_SLOTS:
00043     QString type() const { return m_type; }
00044     QStringList mechanisms() const { return m_mechanisms; }
00045     void cancel();
00046     void process(const SignOn::SessionData &inData,
00047                  const QString &mechanism = 0);
00048     void userActionFinished(const SignOn::UiSessionData &data);
00049 
00050 private:
00051     QString m_type;
00052     QStringList m_mechanisms;
00053 
00054 private Q_SLOTS:
00055     void execProcess(const SignOn::SessionData &inData,
00056                      const QString &mechanism);
00057 };
00058 
00059 } //namespace SsoTestPluginNS
00060 
00061 #endif /* SSOTESTPLUGIN_H_ */