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_ENUMS(PromptType MessageType)
63 explicit Greeter(QObject* parent=0);
66 QString getHint(
const QString &name)
const;
67 QString defaultSessionHint()
const;
68 bool hideUsersHint()
const;
69 bool showManualLoginHint()
const;
70 bool showRemoteLoginHint()
const;
71 bool lockHint ()
const;
72 bool hasGuestAccountHint()
const;
73 QString selectUserHint()
const;
74 bool selectGuestHint()
const;
75 QString autologinUserHint()
const;
76 bool autologinGuestHint()
const;
77 int autologinTimeoutHint()
const;
79 bool inAuthentication()
const;
80 bool isAuthenticated()
const;
81 QString authenticationUser()
const;
82 QString hostname()
const;
86 void authenticate(
const QString &username=QString());
87 void authenticateAsGuest();
88 void authenticateAutologin();
89 void authenticateRemote(
const QString &session=QString(),
const QString &username=QString());
90 void respond(
const QString &response);
91 void cancelAuthentication();
92 void setLanguage (
const QString &language);
93 bool startSessionSync(
const QString &session=QString());
96 void showMessage(QString text, QLightDM::Greeter::MessageType type);
97 void showPrompt(QString text, QLightDM::Greeter::PromptType type);
98 void authenticationComplete();
99 void autologinTimerExpired();
102 void sendAuthenticationComplete();
105 GreeterPrivate *d_ptr;
106 Q_DECLARE_PRIVATE(Greeter)
110 #endif // UNITY_MOCK_GREETER_H