2
* Copyright (C) 2016 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
class Q_DECL_EXPORT MockController : public QObject
29
Q_PROPERTY(QString selectUserHint READ selectUserHint WRITE setSelectUserHint NOTIFY selectUserHintChanged)
31
// single, single-pin, single-passphrase, full
32
Q_PROPERTY(QString userMode READ userMode WRITE setUserMode NOTIFY userModeChanged)
35
Q_PROPERTY(QString sessionMode READ sessionMode WRITE setSessionMode NOTIFY sessionModeChanged)
37
Q_PROPERTY(int numAvailableSessions READ numFullSessions CONSTANT)
38
Q_PROPERTY(int numSessions READ numSessions WRITE setNumSessions NOTIFY numSessionsChanged)
41
static MockController *instance();
42
virtual ~MockController();
44
QString selectUserHint() const;
45
void setSelectUserHint(const QString &selectUserHint);
47
QString userMode() const;
48
void setUserMode(const QString &userMode);
50
QString sessionMode() const;
51
void setSessionMode(const QString &sessionMode);
59
int numFullSessions() const;
60
const QList<SessionItem> &fullSessionItems() const;
62
int numSessions() const;
63
void setNumSessions(int numSessions);
66
void selectUserHintChanged();
67
void userModeChanged();
68
void sessionModeChanged();
69
void numSessionsChanged();
72
explicit MockController(QObject* parent=0);
74
QString m_selectUserHint;
76
QString m_sessionMode;
77
QList<SessionItem> m_fullSessions;