25 #ifndef UNITY_GREETER_H
26 #define UNITY_GREETER_H
28 #include <QLightDM/Greeter>
29 #include <QtCore/QObject>
33 class Greeter :
public QObject
37 Q_PROPERTY(
bool active READ isActive WRITE setIsActive NOTIFY isActiveChanged)
38 Q_PROPERTY(
bool authenticated READ isAuthenticated NOTIFY isAuthenticatedChanged)
39 Q_PROPERTY(QString authenticationUser READ authenticationUser NOTIFY authenticationUserChanged)
40 Q_PROPERTY(
bool promptless READ promptless NOTIFY promptlessChanged)
43 explicit Greeter(QObject* parent=0);
45 bool isActive()
const;
46 bool isAuthenticated()
const;
47 QString authenticationUser()
const;
48 bool promptless()
const;
51 void authenticate(
const QString &username=QString());
52 void respond(
const QString &response);
53 bool startSessionSync(
const QString &session=QString());
54 void setIsActive(
bool isActive);
57 void showMessage(
const QString &text,
bool isError);
58 void showPrompt(
const QString &text,
bool isSecret,
bool isDefaultPrompt);
59 void authenticationComplete();
60 void authenticationUserChanged(
const QString &user);
61 void isActiveChanged();
62 void isAuthenticatedChanged();
63 void promptlessChanged();
69 void requestAuthenticationUser(
const QString &user);
72 GreeterPrivate *
const d_ptr;
74 Q_DECLARE_PRIVATE(Greeter)
77 void showMessageFilter(const QString &text,
QLightDM::Greeter::MessageType type);
78 void showPromptFilter(const QString &text,
QLightDM::Greeter::PromptType type);
79 void authenticationCompleteFilter();