signon 8.54

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

signonidentity.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 * Copyright (C) 2012-2013 Canonical Ltd.
6 *
7 * Contact: Aurel Popirtac <ext-aurel.popirtac@nokia.com>
8 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * version 2.1 as published by the Free Software Foundation.
13 *
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 * 02110-1301 USA
23 */
24
25 #ifndef SIGNONIDENTITY_H_
26 #define SIGNONIDENTITY_H_
27
28 #include <QtCore>
29 #include <QtDBus>
30
31 #include "pluginproxy.h"
32
33 #include "signond-common.h"
34 #include "signondaemon.h"
35 #include "signondisposable.h"
36 #include "signonidentityinfo.h"
37 #include "credentialsaccessmanager.h"
38
39 #include "signonui_interface.h"
40
41 namespace SignonDaemonNS {
42
43 class PendingCallWatcherWithContext;
44
50 class SignonIdentity: public SignonDisposable, protected QDBusContext
51 {
52 Q_OBJECT
53
54 friend class PendingCallWatcherWithContext;
55 friend class SignonIdentityAdaptor;
56
57 virtual ~SignonIdentity();
58
59 public:
60 void destroy();
61 static SignonIdentity *createIdentity(quint32 id, SignonDaemon *parent);
62 quint32 id() const { return m_id; }
63
64 SignonIdentityInfo queryInfo(bool &ok, bool queryPassword = true);
65 quint32 storeCredentials(const SignonIdentityInfo &info);
66
67 public Q_SLOTS:
68 quint32 requestCredentialsUpdate(const QString &message);
69 QVariantMap getInfo();
70 bool addReference(const QString &reference);
71 bool removeReference(const QString &reference);
72 bool verifyUser(const QVariantMap &params);
73 bool verifySecret(const QString &secret);
74 void remove();
75 bool signOut();
76 quint32 store(const QVariantMap &info);
77 void queryUiSlot(QDBusPendingCallWatcher *call);
78 void verifyUiSlot(QDBusPendingCallWatcher *call);
79 Q_SIGNALS:
80 void unregistered();
81 //TODO - split this into the 3 separate signals(updated, removed, signed out)
82 void infoUpdated(int);
83 void stored(SignonIdentity *identity);
84
85 private Q_SLOTS:
86 void removeCompleted(QDBusPendingCallWatcher *call);
87 void signOutCompleted(QDBusPendingCallWatcher *call);
88
89 private:
90 SignonIdentity(quint32 id, int timeout, SignonDaemon *parent);
91 void queryUserPassword(const QVariantMap &params,
92 const QDBusConnection &connection,
93 const QDBusMessage &message);
94
95 private:
96 quint32 m_id;
97 SignonUiAdaptor *m_signonui;
98 SignonIdentityInfo *m_pInfo;
99 }; //class SignonDaemon
100
101 } //namespace SignonDaemonNS
102
103 #endif /* SIGNONIDENTITY_H_ */
SignonDaemonNS::SignonIdentity::infoUpdated
void infoUpdated(int)
SignonDaemonNS::SignonDisposable
Base class for server objects that can be automatically destroyed after a certain period of inactivit...
Definition: signondisposable.h:39
SignonDaemonNS::SignonIdentity::id
quint32 id() const
Definition: signonidentity.h:62
SignonDaemonNS::SignonIdentity::requestCredentialsUpdate
quint32 requestCredentialsUpdate(const QString &message)
Definition: signonidentity.cpp:203
SignonDaemonNS::SignonIdentity::addReference
bool addReference(const QString &reference)
Definition: signonidentity.cpp:163
SignonDaemonNS::SignonIdentity::destroy
void destroy()
Performs any predestruction operations and the destruction itself.
Definition: signonidentity.cpp:121
SignonDaemonNS::SignonIdentity::verifyUiSlot
void verifyUiSlot(QDBusPendingCallWatcher *call)
Definition: signonidentity.cpp:614
SignonDaemonNS::SignonIdentity::PendingCallWatcherWithContext
friend class PendingCallWatcherWithContext
Definition: signonidentity.h:54
signond-common.h
SignonDaemonNS::SignonIdentity::verifySecret
bool verifySecret(const QString &secret)
Definition: signonidentity.cpp:320
SignonDaemonNS::SignonDaemon
Daemon core.
Definition: signondaemon.h:105
signonidentityinfo.h
SignonDaemonNS::SignonIdentity::verifyUser
bool verifyUser(const QVariantMap &params)
Definition: signonidentity.cpp:286
SignonDaemonNS::SignonIdentity::createIdentity
static SignonIdentity * createIdentity(quint32 id, SignonDaemon *parent)
Definition: signonidentity.cpp:116
SignonDaemonNS::SignonIdentity::signOut
bool signOut()
Definition: signonidentity.cpp:382
SignonDaemonNS::SignonIdentity::unregistered
void unregistered()
SignonDaemonNS::SignonIdentity::queryUiSlot
void queryUiSlot(QDBusPendingCallWatcher *call)
Definition: signonidentity.cpp:525
SignonUiAdaptor
Definition: signonui_interface.h:41
pluginproxy.h
signondaemon.h
SignonDaemonNS::SignonIdentity::store
quint32 store(const QVariantMap &info)
Definition: signonidentity.cpp:433
credentialsaccessmanager.h
Definition of the CredentialsAccessManager object.
SignonDaemonNS::SignonIdentity::removeReference
bool removeReference(const QString &reference)
Definition: signonidentity.cpp:183
SignonDaemonNS::SignonIdentity::getInfo
QVariantMap getInfo()
Definition: signonidentity.cpp:244
SignonDaemonNS::SignonIdentity
Daemon side representation of identity.
Definition: signonidentity.h:50
SignonDaemonNS::SignonIdentity::stored
void stored(SignonIdentity *identity)
SignonDaemonNS::SignonIdentityAdaptor
Definition: signonidentityadaptor.h:36
SignonDaemonNS::SignonIdentityInfo
Daemon side representation of identity information.
Definition: signonidentityinfo.h:43
signonui_interface.h
SignonDaemonNS::SignonIdentity::storeCredentials
quint32 storeCredentials(const SignonIdentityInfo &info)
Definition: signonidentity.cpp:492
signondisposable.h
SignonDaemonNS::SignonIdentity::queryInfo
SignonIdentityInfo queryInfo(bool &ok, bool queryPassword=true)
Definition: signonidentity.cpp:126