26#include <QLightDM/Greeter>
27#include <QtCore/QObject>
32class Greeter :
public QObject
36 Q_PROPERTY(
bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged)
37 Q_PROPERTY(
bool authenticated READ isAuthenticated NOTIFY isAuthenticatedChanged)
38 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
39 Q_PROPERTY(QString defaultSession READ defaultSessionHint CONSTANT)
40 Q_PROPERTY(
bool promptless READ promptless NOTIFY promptlessChanged)
41 Q_PROPERTY(QString selectUser READ selectUser CONSTANT)
44 static Greeter *instance();
47 bool isActive()
const;
48 bool isAuthenticated()
const;
49 QString authenticationUser()
const;
50 QString defaultSessionHint()
const;
51 bool promptless()
const;
52 QString selectUser()
const;
53 bool hasGuestAccount()
const;
54 bool showManualLoginHint()
const;
55 bool hideUsersHint()
const;
57 PromptsModel *promptsModel();
60 void authenticate(
const QString &username=QString());
61 void respond(
const QString &response);
62 bool startSessionSync(
const QString &session=QString());
63 void setIsActive(
bool isActive);
66 void authenticationUserChanged();
67 void isActiveChanged();
68 void isAuthenticatedChanged();
69 void promptlessChanged();
72 void loginError(
bool automatic);
73 void loginSuccess(
bool automatic);
74 void authenticationStarted();
78 void requestAuthenticationUser(
const QString &user);
81 explicit Greeter(QObject* parent=0);
83 GreeterPrivate *
const d_ptr;
85 Q_DECLARE_PRIVATE(Greeter)
88 void showMessageFilter(
const QString &text, QLightDM::Greeter::MessageType type);
89 void showPromptFilter(
const QString &text, QLightDM::Greeter::PromptType type);
90 void authenticationCompleteFilter();
91 void checkAuthenticationUser();