24 #ifndef UNITY_GREETER_H 25 #define UNITY_GREETER_H 27 #include <QLightDM/Greeter> 28 #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(
bool promptless READ promptless NOTIFY promptlessChanged)
41 Q_PROPERTY(QString selectUser READ selectUser CONSTANT)
44 explicit Greeter(QObject* parent=0);
46 bool isActive()
const;
47 bool isAuthenticated()
const;
48 QString authenticationUser()
const;
49 QString defaultSessionHint()
const;
50 bool promptless()
const;
51 QString selectUser()
const;
54 void authenticate(
const QString &username=QString());
55 void respond(
const QString &response);
56 bool startSessionSync(
const QString &session=QString());
57 void setIsActive(
bool isActive);
60 void showMessage(
const QString &text,
bool isError);
61 void showPrompt(
const QString &text,
bool isSecret,
bool isDefaultPrompt);
62 void authenticationComplete();
63 void authenticationUserChanged(
const QString &user);
64 void isActiveChanged();
65 void isAuthenticatedChanged();
66 void promptlessChanged();
72 void requestAuthenticationUser(
const QString &user);
75 GreeterPrivate *
const d_ptr;
77 Q_DECLARE_PRIVATE(Greeter)
80 void showMessageFilter(const QString &text,
QLightDM::Greeter::MessageType type);
81 void showPromptFilter(const QString &text,
QLightDM::Greeter::PromptType type);
82 void authenticationCompleteFilter();