26 #include <QLightDM/Greeter> 27 #include <QtCore/QObject> 32 class 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(QString selectUser READ selectUser CONSTANT)
43 static Greeter *instance();
46 bool isActive()
const;
47 bool isAuthenticated()
const;
48 QString authenticationUser()
const;
49 QString defaultSessionHint()
const;
50 QString selectUser()
const;
51 bool hasGuestAccount()
const;
52 bool showManualLoginHint()
const;
53 bool hideUsersHint()
const;
55 PromptsModel *promptsModel();
58 void authenticate(
const QString &username=QString());
59 void respond(
const QString &response);
60 bool startSessionSync(
const QString &session=QString());
61 void setIsActive(
bool isActive);
64 void authenticationUserChanged();
65 void isActiveChanged();
66 void isAuthenticatedChanged();
69 void loginError(
bool automatic);
70 void loginSuccess(
bool automatic);
71 void authenticationStarted();
75 void requestAuthenticationUser(
const QString &user);
78 explicit Greeter(QObject* parent=0);
80 GreeterPrivate *
const d_ptr;
82 Q_DECLARE_PRIVATE(Greeter)
85 void showMessageFilter(
const QString &text, QLightDM::Greeter::MessageType type);
86 void showPromptFilter(
const QString &text, QLightDM::Greeter::PromptType type);
87 void authenticationCompleteFilter();
88 void checkAuthenticationUser();