1/*
2 * Copyright 2008, François Revol, <revol@free.fr>. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _LOGINAPP_H_
6#define _LOGINAPP_H_
7
8#include <Application.h>
9
10/* try loging in a user */
11const uint32 kAttemptLogin = 'logi';
12const uint32 kHaltAction = 'halt';
13const uint32 kRebootAction = 'rebo';
14const uint32 kSuspendAction = 'susp';
15const uint32 kLoginBad = 'lgba';
16const uint32 kLoginOk = 'lgok';
17
18class LoginWindow;
19class DesktopWindow;
20
21class LoginApp : public BApplication {
22public:
23					LoginApp();
24	virtual			~LoginApp();
25	void			ReadyToRun();
26	void			MessageReceived(BMessage *message);
27	void			ArgvReceived(int32 argc, char **argv);
28
29private:
30	void			TryLogin(BMessage *message);
31	status_t		ValidateLogin(const char *login, const char *password);
32	int				getpty(char *pty, char *tty);
33
34	DesktopWindow*	fDesktopWindow;
35	LoginWindow*	fLoginWindow;
36	bool			fEditShelfMode;
37	bool			fModalMode;
38};
39
40#endif	// _LOGINAPP_H_
41