summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/loginapplication.cpp27
-rw-r--r--core/opie-login/loginapplication.h27
-rw-r--r--core/opie-login/loginwindowimpl.cpp29
-rw-r--r--core/opie-login/loginwindowimpl.h27
-rw-r--r--core/opie-login/main.cpp27
5 files changed, 136 insertions, 1 deletions
diff --git a/core/opie-login/loginapplication.cpp b/core/opie-login/loginapplication.cpp
index cd58c47..103d63b 100644
--- a/core/opie-login/loginapplication.cpp
+++ b/core/opie-login/loginapplication.cpp
@@ -1,24 +1,51 @@
+/*
+               =. This file is part of the OPIE Project
+             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This file is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This file is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.=       =       ; Public License for more details.
+++=   -.     .`     .:
+ :     =  ...= . :.=- You should have received a copy of the GNU
+ -.   .:....=;==+<; General Public License along with this file;
+  -_. . .   )=.  = see the file COPYING. If not, write to the
+    --        :-=` Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
#include <pwd.h>
#include <grp.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#ifdef USEPAM
extern "C" {
#include <security/pam_appl.h>
}
#else
#include <crypt.h>
#include <shadow.h>
#endif
#include "loginapplication.h"
LoginApplication *lApp;
LoginApplication::LoginApplication ( int &argc, char **argv )
: QPEApplication ( argc, argv, GuiServer )
{
lApp = this;
}
diff --git a/core/opie-login/loginapplication.h b/core/opie-login/loginapplication.h
index a709c5b..062c088 100644
--- a/core/opie-login/loginapplication.h
+++ b/core/opie-login/loginapplication.h
@@ -1,24 +1,51 @@
+/*
+               =. This file is part of the OPIE Project
+             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This file is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This file is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.=       =       ; Public License for more details.
+++=   -.     .`     .:
+ :     =  ...= . :.=- You should have received a copy of the GNU
+ -.   .:....=;==+<; General Public License along with this file;
+  -_. . .   )=.  = see the file COPYING. If not, write to the
+    --        :-=` Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
#ifndef __OPIE_LOGINAPPLICATION_H__
#define __OPIE_LOGINAPPLICATION_H__
#include <qstringlist.h>
#include <qpe/qpeapplication.h>
#ifdef USEPAM
struct pam_message;
struct pam_response;
#endif
class LoginApplication : public QPEApplication {
public:
LoginApplication ( int &argc, char **argv );
static bool checkPassword ( const char *user, const char *password );
static const char *loginAs ( );
static void setLoginAs ( const char *user );
static bool changeIdentity ( );
static bool login ( );
diff --git a/core/opie-login/loginwindowimpl.cpp b/core/opie-login/loginwindowimpl.cpp
index 3694513..fe2906a 100644
--- a/core/opie-login/loginwindowimpl.cpp
+++ b/core/opie-login/loginwindowimpl.cpp
@@ -1,24 +1,51 @@
+/*
+               =. This file is part of the OPIE Project
+             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This file is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This file is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.=       =       ; Public License for more details.
+++=   -.     .`     .:
+ :     =  ...= . :.=- You should have received a copy of the GNU
+ -.   .:....=;==+<; General Public License along with this file;
+  -_. . .   )=.  = see the file COPYING. If not, write to the
+    --        :-=` Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
#include <qapplication.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qframe.h>
#include <qlineedit.h>
#include <qtimer.h>
#include <qcombobox.h>
#include <qpixmap.h>
#include <qlabel.h>
#include <qpopupmenu.h>
#include <qmessagebox.h>
#include <qimage.h>
#include <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/config.h>
#include <opie/odevice.h>
#include <stdio.h>
#include <stdlib.h>
#include "loginwindowimpl.h"
#include "loginapplication.h"
@@ -104,49 +131,49 @@ void LoginWindowImpl::suspend ( )
{
ODevice::inst ( )-> suspend ( );
QCopEnvelope e("QPE/System", "setBacklight(int)");
e << -3; // Force on
}
void LoginWindowImpl::backlight ( )
{
QCopEnvelope e("QPE/System", "setBacklight(int)");
e << -2; // toggle
}
class WaitLogo : public QLabel {
public:
WaitLogo ( ) : QLabel ( 0, "wait hack!", WStyle_Customize | WStyle_NoBorder | WStyle_Tool )
{
QImage img = Resource::loadImage ( "launcher/new_wait" );
QPixmap pix;
pix. convertFromImage ( img );
setPixmap ( pix );
setAlignment ( AlignCenter );
move ( 0, 0 );
resize ( qApp-> desktop ( )-> width ( ), qApp-> desktop ( )-> height ( ));
-
+
m_visible = false;
show ( );
}
virtual void showEvent ( QShowEvent *e )
{
QLabel::showEvent ( e );
m_visible = true;
}
virtual void paintEvent ( QPaintEvent *e )
{
QLabel::paintEvent ( e );
if ( m_visible )
qApp-> quit ( );
}
private:
bool m_visible;
};
void LoginWindowImpl::login ( )
{
const char *user = ::strdup ( m_user-> currentText ( ). local8Bit ( ));
diff --git a/core/opie-login/loginwindowimpl.h b/core/opie-login/loginwindowimpl.h
index 2e2ba0d..e769b03 100644
--- a/core/opie-login/loginwindowimpl.h
+++ b/core/opie-login/loginwindowimpl.h
@@ -1,24 +1,51 @@
+/*
+               =. This file is part of the OPIE Project
+             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This file is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This file is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.=       =       ; Public License for more details.
+++=   -.     .`     .:
+ :     =  ...= . :.=- You should have received a copy of the GNU
+ -.   .:....=;==+<; General Public License along with this file;
+  -_. . .   )=.  = see the file COPYING. If not, write to the
+    --        :-=` Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
#ifndef __OPIE_LOGINWINDOW_IMPL_H__
#define __OPIE_LOGINWINDOW_IMPL_H__
#include "loginwindow.h"
class InputMethods;
class LoginWindowImpl : public LoginWindow {
Q_OBJECT
public:
LoginWindowImpl ( );
virtual ~LoginWindowImpl ( );
protected slots:
void restart ( );
void quit ( );
void showIM ( );
void suspend ( );
void backlight ( );
void login ( );
void toggleEchoMode ( bool );
protected:
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 91610af..2c10f77 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -1,24 +1,51 @@
+/*
+               =. This file is part of the OPIE Project
+             .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This file is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This file is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.=       =       ; Public License for more details.
+++=   -.     .`     .:
+ :     =  ...= . :.=- You should have received a copy of the GNU
+ -.   .:....=;==+<; General Public License along with this file;
+  -_. . .   )=.  = see the file COPYING. If not, write to the
+    --        :-=` Free Software Foundation, Inc.,
+ 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
#define _GNU_SOURCE
#include <sys/types.h>
#include <time.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <syslog.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <getopt.h>
#include <string.h>
#include <qpe/qpeapplication.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpestyle.h>
#include <qpe/power.h>
#include <opie/odevice.h>
#include <qwindowsystem_qws.h>
#include <qmessagebox.h>