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 status_t StartUserSession(const char *login); 33 int getpty(char *pty, char *tty); 34 35 DesktopWindow* fDesktopWindow; 36 LoginWindow* fLoginWindow; 37 bool fEditShelfMode; 38 bool fModalMode; 39}; 40 41#endif // _LOGINAPP_H_ 42