21 #ifndef UNITY_MOCK_GREETER_H
22 #define UNITY_MOCK_GREETER_H
24 #include <QtCore/QObject>
25 #include <QtCore/QVariant>
36 class Q_DECL_EXPORT Greeter :
public QObject
40 Q_PROPERTY(
bool authenticated READ isAuthenticated )
41 Q_PROPERTY(QString authenticationUser READ authenticationUser )
42 Q_PROPERTY(QString defaultSession READ defaultSessionHint CONSTANT)
43 Q_PROPERTY(QString selectUser READ selectUserHint CONSTANT)
44 Q_PROPERTY(
bool selectGuest READ selectGuestHint CONSTANT)
46 Q_PROPERTY(QString hostname READ hostname CONSTANT)
47 Q_PROPERTY(
bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
48 Q_PROPERTY(
bool locked READ lockHint CONSTANT)
50 Q_PROPERTY(QString hostname READ hostname CONSTANT)
52 Q_ENUMS(PromptType MessageType)
65 explicit Greeter(QObject* parent=0);
68 QString getHint(
const QString &name)
const;
69 QString defaultSessionHint()
const;
70 bool hideUsersHint()
const;
71 bool showManualLoginHint()
const;
72 bool showRemoteLoginHint()
const;
73 bool lockHint ()
const;
74 bool hasGuestAccountHint()
const;
75 QString selectUserHint()
const;
76 bool selectGuestHint()
const;
77 QString autologinUserHint()
const;
78 bool autologinGuestHint()
const;
79 int autologinTimeoutHint()
const;
81 bool inAuthentication()
const;
82 bool isAuthenticated()
const;
83 QString authenticationUser()
const;
84 QString hostname()
const;
88 void authenticate(
const QString &username=QString());
89 void authenticateAsGuest();
90 void authenticateAutologin();
91 void authenticateRemote(
const QString &session=QString(),
const QString &username=QString());
92 void respond(
const QString &response);
93 void cancelAuthentication();
94 void setLanguage (
const QString &language);
95 bool startSessionSync(
const QString &session=QString());
98 void showMessage(QString text, QLightDM::Greeter::MessageType type);
99 void showPrompt(QString text, QLightDM::Greeter::PromptType type);
100 void authenticationComplete();
101 void autologinTimerExpired();
104 void sendAuthenticationComplete();
107 GreeterPrivate *d_ptr;
108 Q_DECLARE_PRIVATE(Greeter)
112 #endif // UNITY_MOCK_GREETER_H