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 startAuthentication(const QString &username);
59 void provideSecret(const QString &secret);
60 void cancelAuthentication();
61 void login(const QString &username, const QString &session, const QString &language);
62 void loginWithDefaults(const QString &username);
63 void loginAsGuest(const QString &session, const QString &language);
64 void loginAsGuestWithDefaults();
66 bool canSuspend() const;
67 bool canHibernate() const;
68 bool canShutdown() const;
69 bool canRestart() const;
79 void showPrompt(QString prompt);
80 void showMessage(QString message);
81 void showError(QString message);
82 void authenticationComplete(bool isAuthenticated);
83 void timedLogin(QString username);
91 void writeInt(int value);
92 void writeString(QString value);
93 void writeHeader(int id, int length);
95 int getPacketLength();
96 int readInt(int *offset);
97 QString readString(int *offset);
102 #endif // LDMGREETER_H