27 #include "GreeterPrivate.h"
28 #include <QtCore/QCoreApplication>
34 Greeter::Greeter(QObject *parent)
36 d_ptr(new GreeterPrivate(this))
44 QString Greeter::authenticationUser()
const
47 return d->authenticationUser;
50 bool Greeter::hasGuestAccountHint()
const
55 QString Greeter::getHint(
const QString &name)
const
58 return QLatin1String("");
61 QString Greeter::defaultSessionHint()
const
63 return QStringLiteral(
"ubuntu");
66 bool Greeter::hideUsersHint()
const
71 bool Greeter::showManualLoginHint()
const
76 bool Greeter::showRemoteLoginHint()
const
81 bool Greeter::lockHint ()
const
86 QString Greeter::selectUserHint()
const
88 return QLatin1String(
"");
91 bool Greeter::selectGuestHint()
const
96 QString Greeter::autologinUserHint()
const
98 return QLatin1String(
"");
101 bool Greeter::autologinGuestHint()
const
106 int Greeter::autologinTimeoutHint()
const
111 bool Greeter::inAuthentication()
const
116 QString Greeter::hostname()
const
118 return QStringLiteral(
"hostname1");
121 bool Greeter::isAuthenticated()
const
124 return d->authenticated;
127 bool Greeter::connectSync()
132 void Greeter::authenticate(
const QString &username)
136 d->authenticated =
false;
137 d->authenticationUser = username;
138 d->handleAuthenticate();
141 void Greeter::authenticateAsGuest()
144 void Greeter::authenticateAutologin()
147 void Greeter::authenticateRemote(
const QString &session,
const QString &username)
153 void Greeter::cancelAuthentication()
156 void Greeter::setLanguage (
const QString &language)
161 bool Greeter::startSessionSync(
const QString &session)
167 void Greeter::respond(const QString &response)
171 d->handleRespond(response);
174 void Greeter::sendAuthenticationComplete()
176 if (qgetenv(
"UNITY_TESTING").isEmpty()) {
178 QTimer::singleShot(1000,
this, &Greeter::authenticationComplete);
180 Q_EMIT authenticationComplete();