2
* Copyright (C) 2013 Canonical, Ltd.
3
* Copyright (C) 2010-2011 David Edmundson.
4
* Copyright (C) 2010-2011 Robert Ancell
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
* Author: David Edmundson <kde@davidedmundson.co.uk>
21
#ifndef LIGHTDM_GREETER_H
22
#define LIGHTDM_GREETER_H
24
#include <QtCore/QObject>
25
#include <QtCore/QVariant>
32
class Q_DECL_EXPORT Greeter : public QObject
36
Q_PROPERTY(bool authenticated READ isAuthenticated ) //NOTFIY authenticationComplete
37
Q_PROPERTY(QString authenticationUser READ authenticationUser )
38
Q_PROPERTY(QString defaultSession READ defaultSessionHint CONSTANT)
39
Q_PROPERTY(QString selectUser READ selectUserHint CONSTANT)
40
Q_PROPERTY(bool selectGuest READ selectGuestHint CONSTANT)
42
Q_PROPERTY(QString hostname READ hostname CONSTANT)
43
Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
44
Q_PROPERTY(bool locked READ lockHint CONSTANT)
46
Q_PROPERTY(QString hostname READ hostname CONSTANT)
48
Q_ENUMS(PromptType MessageType)
61
explicit Greeter(QObject* parent=0);
64
QString getHint(const QString &name) const;
65
QString defaultSessionHint() const;
66
bool hideUsersHint() const;
67
bool showManualLoginHint() const;
68
bool showRemoteLoginHint() const;
69
bool lockHint () const;
70
bool hasGuestAccountHint() const;
71
QString selectUserHint() const;
72
bool selectGuestHint() const;
73
QString autologinUserHint() const;
74
bool autologinGuestHint() const;
75
int autologinTimeoutHint() const;
77
bool inAuthentication() const;
78
bool isAuthenticated() const;
79
QString authenticationUser() const;
80
QString hostname() const;
84
void authenticate(const QString &username=QString());
85
void authenticateAsGuest();
86
void authenticateAutologin();
87
void authenticateRemote(const QString &session=QString(), const QString &username=QString());
88
void respond(const QString &response);
89
void cancelAuthentication();
90
void setLanguage (const QString &language);
91
bool startSessionSync(const QString &session=QString());
94
void showMessage(QString text, QLightDM::Greeter::MessageType type);
95
void showPrompt(QString text, QLightDM::Greeter::PromptType type);
96
void authenticationComplete();
97
void autologinTimerExpired();
100
GreeterPrivate *d_ptr;
101
Q_DECLARE_PRIVATE(Greeter)
105
#endif // LIGHTDM_GREETER_H