signon  8.40
signonclient.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 #ifndef SIGNONCLIENT_H
00023 #define SIGNONCLIENT_H
00024 
00025 #include "ui_signonclient.h"
00026 #include "SignOn/AuthService"
00027 #include "SignOn/Identity"
00028 
00029 
00030 namespace SignOn {
00031 
00032 class SignonClient: public QWidget
00033 {
00034     Q_OBJECT
00035 
00036 public:
00037     SignonClient(QWidget *parent = 0);
00038     ~SignonClient();
00039 
00040 public slots:
00041     void response(const SignOn::SessionData &sessionData);
00042     void error(const SignOn::Error &error);
00043     void sessionError(const SignOn::Error &error);
00044     void credentialsStored(const quint32 id);
00045     void userVerified(const bool valid);
00046 
00047 private slots:
00048     void methodsAvailable(const QStringList &mechs);
00049     void mechanismsAvailable(const QString &method, const QStringList &mechs);
00050     void identities(const QList<SignOn::IdentityInfo> &identityList);
00051 
00052     void on_store_clicked();
00053     void on_query_clicked();
00054     void on_challenge_clicked();
00055     void on_google_clicked();
00056     void on_verify_clicked();
00057 
00058 private:
00059     Ui::SignonClient ui;
00060     SignOn::AuthService *m_service;
00061     SignOn::Identity *m_identity;
00062     SignOn::IdentityInfo *m_info;
00063     SignOn::AuthSession *m_session;
00064     SignOn::SessionData *m_sessionData;
00065 };
00066 
00067 } //namespace SignOn
00068 #endif //SIGNONCLIENT_H
00069