17 #include "DBusGreeterList.h"
20 #include <QDBusMessage>
21 #include <QStringList>
23 DBusGreeterList::DBusGreeterList(Greeter *greeter,
const QString &path)
24 : UnityDBusObject(path, QStringLiteral(
"com.canonical.UnityGreeter"), true, greeter),
27 connect(m_greeter, &Greeter::authenticationUserChanged,
this, &DBusGreeterList::authenticationUserChangedHandler);
28 connect(m_greeter, &Greeter::promptlessChanged,
this, &DBusGreeterList::promptlessChangedHandler);
31 QString DBusGreeterList::GetActiveEntry()
const
33 return m_greeter->authenticationUser();
36 void DBusGreeterList::SetActiveEntry(
const QString &entry)
38 Q_EMIT m_greeter->requestAuthenticationUser(entry);
41 bool DBusGreeterList::entryIsLocked()
const
43 return !m_greeter->promptless();
46 void DBusGreeterList::authenticationUserChangedHandler(
const QString &user)
48 notifyPropertyChanged(QStringLiteral(
"ActiveEntry"), user);
49 Q_EMIT EntrySelected(user);
52 void DBusGreeterList::promptlessChangedHandler()
54 notifyPropertyChanged(QStringLiteral(
"EntryIsLocked"), entryIsLocked());
55 Q_EMIT entryIsLockedChanged();