2 * Copyright (C) 2010-2011 David Edmundson.
3 * Copyright (C) 2010-2011 Robert Ancell
4 * Author: David Edmundson <kde@davidedmundson.co.uk>
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 3 of the License, or (at your option) any
9 * later version. See http://www.gnu.org/copyleft/lgpl.html the full text of the
13 #ifndef QLIGHTDM_GREETER_H
14 #define QLIGHTDM_GREETER_H
16 #include <QtCore/QObject>
17 #include <QtCore/QVariant>
18 #include "QLightDM/User"
19 #include "QLightDM/Language"
37 class Q_DECL_EXPORT Greeter : public QObject
41 explicit Greeter(QObject* parent=0);
44 QString timedLoginUser() const;
45 int timedLoginDelay() const;
47 QString getHint(QString name) const;
48 QString defaultSessionHint() const;
49 bool hideUsersHint() const;
50 bool hasGuestAccountHint() const;
51 QString selectUserHint() const;
52 bool selectGuestHint() const;
53 QString autologinUserHint() const;
54 bool autologinGuestHint() const;
55 int autologinTimeoutHint() const;
57 bool inAuthentication() const;
58 bool isAuthenticated() const;
59 QString authenticationUser() const;
63 void authenticate(const QString &username=QString());
64 void authenticateAsGuest();
65 void respond(const QString &response);
66 void cancelAuthentication();
67 bool startSessionSync(const QString &session=QString());
70 void showPrompt(QString prompt, PromptType type);
71 void showMessage(QString message, MessageType type);
72 void authenticationComplete();
73 void autologinTimerExpired();
80 void writeInt(int value);
81 void writeString(QString value);
82 void writeHeader(int id, int length);
84 char *readMessage(int *length, bool block);
88 #endif // QLIGHTDM_GREETER_H