signon  8.42
signonclient.h
Go to the documentation of this file.
1 /*
2  * This file is part of signon
3  *
4  * Copyright (C) 2009-2010 Nokia Corporation.
5  *
6  * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * version 2.1 as published by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  */
22 #ifndef SIGNONCLIENT_H
23 #define SIGNONCLIENT_H
24 
25 #include "ui_signonclient.h"
26 #include "SignOn/AuthService"
27 #include "SignOn/Identity"
28 
29 
30 namespace SignOn {
31 
32 class SignonClient: public QWidget
33 {
34  Q_OBJECT
35 
36 public:
37  SignonClient(QWidget *parent = 0);
38  ~SignonClient();
39 
40 public slots:
41  void response(const SignOn::SessionData &sessionData);
42  void error(const SignOn::Error &error);
43  void sessionError(const SignOn::Error &error);
44  void credentialsStored(const quint32 id);
45  void userVerified(const bool valid);
46 
47 private slots:
48  void methodsAvailable(const QStringList &mechs);
49  void mechanismsAvailable(const QString &method, const QStringList &mechs);
50  void identities(const QList<SignOn::IdentityInfo> &identityList);
51 
52  void on_store_clicked();
53  void on_query_clicked();
54  void on_challenge_clicked();
55  void on_google_clicked();
56  void on_verify_clicked();
57 
58 private:
60  SignOn::AuthService *m_service;
61  SignOn::Identity *m_identity;
62  SignOn::IdentityInfo *m_info;
63  SignOn::AuthSession *m_session;
64  SignOn::SessionData *m_sessionData;
65 };
66 
67 } //namespace SignOn
68 #endif //SIGNONCLIENT_H
69