1 #ifndef QLIGTHDM_GREETER_H
2 #define QLIGTHDM_GREETER_H
9 //#include "ldmlayout.h"
17 class Q_DECL_EXPORT Greeter : public QObject
21 explicit Greeter(QObject* parent=0);
24 Q_PROPERTY(bool canSuspend READ canSuspend);
25 Q_PROPERTY(bool canHibernate READ canHibernate);
26 Q_PROPERTY(bool canShutdown READ canShutdown);
27 Q_PROPERTY(bool canRestart READ canRestart);
29 Q_PROPERTY(QString hostname READ hostname);
31 /** The hostname of the machine */
32 QString hostname() const;
33 QString theme() const;
35 QVariant getProperty(const QString &name) const;
37 QString timedLoginUser() const;
38 int timedLoginDelay() const;
40 QList<QLightDM::Language> languages() const;
41 QString defaultLanguage() const;
43 //QList<LdmLayout> layouts() const;
44 QString defaultLayout() const;
45 QString layout() const;
47 QLightDM::Config *config() const;
49 QString defaultSession() const;
50 bool guestAccountSupported() const;
52 bool inAuthentication() const;
53 bool isAuthenticated() const;
54 QString authenticationUser() const;
56 void connectToServer();
57 void cancelTimedLogin();
58 void login(const QString &username);
60 void provideSecret(const QString &secret);
61 void cancelAuthentication();
62 void startSession(const QString &session, const QString &language);
63 void startSessionWithDefaults();
65 bool canSuspend() const;
66 bool canHibernate() const;
67 bool canShutdown() const;
68 bool canRestart() const;
78 void showPrompt(QString prompt);
79 void showMessage(QString message);
80 void showError(QString message);
81 void authenticationComplete(bool isAuthenticated);
82 void timedLogin(QString username);
90 void writeInt(int value);
91 void writeString(QString value);
92 void writeHeader(int id, int length);
94 int getPacketLength();
95 int readInt(int *offset);
96 QString readString(int *offset);
101 #endif // LDMGREETER_H