author | sandman <sandman> | 2002-10-14 01:06:10 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-14 01:06:10 (UTC) |
commit | 1b8d2ecee642bdecfdc3be15625f2c53bab01e64 (patch) (unidiff) | |
tree | 725f60df58e601c35f56aecb4d57e9db9ea8c7c4 | |
parent | 62c946c5a92ab11b5ad9495ff0bab158d38bce48 (diff) | |
download | opie-1b8d2ecee642bdecfdc3be15625f2c53bab01e64.zip opie-1b8d2ecee642bdecfdc3be15625f2c53bab01e64.tar.gz opie-1b8d2ecee642bdecfdc3be15625f2c53bab01e64.tar.bz2 |
added copyright headers
-rw-r--r-- | core/opie-login/loginapplication.cpp | 27 | ||||
-rw-r--r-- | core/opie-login/loginapplication.h | 27 | ||||
-rw-r--r-- | core/opie-login/loginwindowimpl.cpp | 29 | ||||
-rw-r--r-- | core/opie-login/loginwindowimpl.h | 27 | ||||
-rw-r--r-- | core/opie-login/main.cpp | 27 |
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 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
1 | #include <pwd.h> | 28 | #include <pwd.h> |
2 | #include <grp.h> | 29 | #include <grp.h> |
3 | #include <unistd.h> | 30 | #include <unistd.h> |
4 | #include <stdlib.h> | 31 | #include <stdlib.h> |
5 | #include <signal.h> | 32 | #include <signal.h> |
6 | 33 | ||
7 | #ifdef USEPAM | 34 | #ifdef USEPAM |
8 | extern "C" { | 35 | extern "C" { |
9 | #include <security/pam_appl.h> | 36 | #include <security/pam_appl.h> |
10 | } | 37 | } |
11 | #else | 38 | #else |
12 | #include <crypt.h> | 39 | #include <crypt.h> |
13 | #include <shadow.h> | 40 | #include <shadow.h> |
14 | #endif | 41 | #endif |
15 | 42 | ||
16 | #include "loginapplication.h" | 43 | #include "loginapplication.h" |
17 | 44 | ||
18 | LoginApplication *lApp; | 45 | LoginApplication *lApp; |
19 | 46 | ||
20 | LoginApplication::LoginApplication ( int &argc, char **argv ) | 47 | LoginApplication::LoginApplication ( int &argc, char **argv ) |
21 | : QPEApplication ( argc, argv, GuiServer ) | 48 | : QPEApplication ( argc, argv, GuiServer ) |
22 | { | 49 | { |
23 | lApp = this; | 50 | lApp = this; |
24 | } | 51 | } |
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 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
1 | #ifndef __OPIE_LOGINAPPLICATION_H__ | 28 | #ifndef __OPIE_LOGINAPPLICATION_H__ |
2 | #define __OPIE_LOGINAPPLICATION_H__ | 29 | #define __OPIE_LOGINAPPLICATION_H__ |
3 | 30 | ||
4 | #include <qstringlist.h> | 31 | #include <qstringlist.h> |
5 | 32 | ||
6 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
7 | 34 | ||
8 | #ifdef USEPAM | 35 | #ifdef USEPAM |
9 | struct pam_message; | 36 | struct pam_message; |
10 | struct pam_response; | 37 | struct pam_response; |
11 | #endif | 38 | #endif |
12 | 39 | ||
13 | class LoginApplication : public QPEApplication { | 40 | class LoginApplication : public QPEApplication { |
14 | public: | 41 | public: |
15 | LoginApplication ( int &argc, char **argv ); | 42 | LoginApplication ( int &argc, char **argv ); |
16 | 43 | ||
17 | static bool checkPassword ( const char *user, const char *password ); | 44 | static bool checkPassword ( const char *user, const char *password ); |
18 | 45 | ||
19 | static const char *loginAs ( ); | 46 | static const char *loginAs ( ); |
20 | static void setLoginAs ( const char *user ); | 47 | static void setLoginAs ( const char *user ); |
21 | 48 | ||
22 | static bool changeIdentity ( ); | 49 | static bool changeIdentity ( ); |
23 | static bool login ( ); | 50 | static bool login ( ); |
24 | 51 | ||
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 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
1 | #include <qapplication.h> | 28 | #include <qapplication.h> |
2 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
3 | #include <qlayout.h> | 30 | #include <qlayout.h> |
4 | #include <qframe.h> | 31 | #include <qframe.h> |
5 | #include <qlineedit.h> | 32 | #include <qlineedit.h> |
6 | #include <qtimer.h> | 33 | #include <qtimer.h> |
7 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
8 | #include <qpixmap.h> | 35 | #include <qpixmap.h> |
9 | #include <qlabel.h> | 36 | #include <qlabel.h> |
10 | #include <qpopupmenu.h> | 37 | #include <qpopupmenu.h> |
11 | #include <qmessagebox.h> | 38 | #include <qmessagebox.h> |
12 | #include <qimage.h> | 39 | #include <qimage.h> |
13 | 40 | ||
14 | #include <qpe/resource.h> | 41 | #include <qpe/resource.h> |
15 | #include <qpe/qcopenvelope_qws.h> | 42 | #include <qpe/qcopenvelope_qws.h> |
16 | #include <qpe/config.h> | 43 | #include <qpe/config.h> |
17 | 44 | ||
18 | #include <opie/odevice.h> | 45 | #include <opie/odevice.h> |
19 | 46 | ||
20 | #include <stdio.h> | 47 | #include <stdio.h> |
21 | #include <stdlib.h> | 48 | #include <stdlib.h> |
22 | 49 | ||
23 | #include "loginwindowimpl.h" | 50 | #include "loginwindowimpl.h" |
24 | #include "loginapplication.h" | 51 | #include "loginapplication.h" |
@@ -104,49 +131,49 @@ void LoginWindowImpl::suspend ( ) | |||
104 | { | 131 | { |
105 | ODevice::inst ( )-> suspend ( ); | 132 | ODevice::inst ( )-> suspend ( ); |
106 | 133 | ||
107 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 134 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
108 | e << -3; // Force on | 135 | e << -3; // Force on |
109 | } | 136 | } |
110 | 137 | ||
111 | void LoginWindowImpl::backlight ( ) | 138 | void LoginWindowImpl::backlight ( ) |
112 | { | 139 | { |
113 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 140 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
114 | e << -2; // toggle | 141 | e << -2; // toggle |
115 | } | 142 | } |
116 | 143 | ||
117 | class WaitLogo : public QLabel { | 144 | class WaitLogo : public QLabel { |
118 | public: | 145 | public: |
119 | WaitLogo ( ) : QLabel ( 0, "wait hack!", WStyle_Customize | WStyle_NoBorder | WStyle_Tool ) | 146 | WaitLogo ( ) : QLabel ( 0, "wait hack!", WStyle_Customize | WStyle_NoBorder | WStyle_Tool ) |
120 | { | 147 | { |
121 | QImage img = Resource::loadImage ( "launcher/new_wait" ); | 148 | QImage img = Resource::loadImage ( "launcher/new_wait" ); |
122 | QPixmap pix; | 149 | QPixmap pix; |
123 | pix. convertFromImage ( img ); | 150 | pix. convertFromImage ( img ); |
124 | setPixmap ( pix ); | 151 | setPixmap ( pix ); |
125 | setAlignment ( AlignCenter ); | 152 | setAlignment ( AlignCenter ); |
126 | move ( 0, 0 ); | 153 | move ( 0, 0 ); |
127 | resize ( qApp-> desktop ( )-> width ( ), qApp-> desktop ( )-> height ( )); | 154 | resize ( qApp-> desktop ( )-> width ( ), qApp-> desktop ( )-> height ( )); |
128 | 155 | ||
129 | m_visible = false; | 156 | m_visible = false; |
130 | show ( ); | 157 | show ( ); |
131 | } | 158 | } |
132 | 159 | ||
133 | virtual void showEvent ( QShowEvent *e ) | 160 | virtual void showEvent ( QShowEvent *e ) |
134 | { | 161 | { |
135 | QLabel::showEvent ( e ); | 162 | QLabel::showEvent ( e ); |
136 | m_visible = true; | 163 | m_visible = true; |
137 | } | 164 | } |
138 | 165 | ||
139 | virtual void paintEvent ( QPaintEvent *e ) | 166 | virtual void paintEvent ( QPaintEvent *e ) |
140 | { | 167 | { |
141 | QLabel::paintEvent ( e ); | 168 | QLabel::paintEvent ( e ); |
142 | if ( m_visible ) | 169 | if ( m_visible ) |
143 | qApp-> quit ( ); | 170 | qApp-> quit ( ); |
144 | } | 171 | } |
145 | 172 | ||
146 | private: | 173 | private: |
147 | bool m_visible; | 174 | bool m_visible; |
148 | }; | 175 | }; |
149 | 176 | ||
150 | void LoginWindowImpl::login ( ) | 177 | void LoginWindowImpl::login ( ) |
151 | { | 178 | { |
152 | const char *user = ::strdup ( m_user-> currentText ( ). local8Bit ( )); | 179 | 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 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
1 | #ifndef __OPIE_LOGINWINDOW_IMPL_H__ | 28 | #ifndef __OPIE_LOGINWINDOW_IMPL_H__ |
2 | #define __OPIE_LOGINWINDOW_IMPL_H__ | 29 | #define __OPIE_LOGINWINDOW_IMPL_H__ |
3 | 30 | ||
4 | #include "loginwindow.h" | 31 | #include "loginwindow.h" |
5 | 32 | ||
6 | class InputMethods; | 33 | class InputMethods; |
7 | 34 | ||
8 | class LoginWindowImpl : public LoginWindow { | 35 | class LoginWindowImpl : public LoginWindow { |
9 | Q_OBJECT | 36 | Q_OBJECT |
10 | 37 | ||
11 | public: | 38 | public: |
12 | LoginWindowImpl ( ); | 39 | LoginWindowImpl ( ); |
13 | virtual ~LoginWindowImpl ( ); | 40 | virtual ~LoginWindowImpl ( ); |
14 | 41 | ||
15 | protected slots: | 42 | protected slots: |
16 | void restart ( ); | 43 | void restart ( ); |
17 | void quit ( ); | 44 | void quit ( ); |
18 | void showIM ( ); | 45 | void showIM ( ); |
19 | void suspend ( ); | 46 | void suspend ( ); |
20 | void backlight ( ); | 47 | void backlight ( ); |
21 | void login ( ); | 48 | void login ( ); |
22 | void toggleEchoMode ( bool ); | 49 | void toggleEchoMode ( bool ); |
23 | 50 | ||
24 | protected: | 51 | 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 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
1 | #define _GNU_SOURCE | 28 | #define _GNU_SOURCE |
2 | 29 | ||
3 | #include <sys/types.h> | 30 | #include <sys/types.h> |
4 | #include <time.h> | 31 | #include <time.h> |
5 | #include <sys/time.h> | 32 | #include <sys/time.h> |
6 | #include <sys/resource.h> | 33 | #include <sys/resource.h> |
7 | #include <unistd.h> | 34 | #include <unistd.h> |
8 | #include <syslog.h> | 35 | #include <syslog.h> |
9 | #include <sys/wait.h> | 36 | #include <sys/wait.h> |
10 | #include <stdio.h> | 37 | #include <stdio.h> |
11 | #include <stdlib.h> | 38 | #include <stdlib.h> |
12 | #include <signal.h> | 39 | #include <signal.h> |
13 | #include <getopt.h> | 40 | #include <getopt.h> |
14 | #include <string.h> | 41 | #include <string.h> |
15 | 42 | ||
16 | #include <qpe/qpeapplication.h> | 43 | #include <qpe/qpeapplication.h> |
17 | #include <qpe/qcopenvelope_qws.h> | 44 | #include <qpe/qcopenvelope_qws.h> |
18 | #include <qpe/qpestyle.h> | 45 | #include <qpe/qpestyle.h> |
19 | #include <qpe/power.h> | 46 | #include <qpe/power.h> |
20 | 47 | ||
21 | #include <opie/odevice.h> | 48 | #include <opie/odevice.h> |
22 | 49 | ||
23 | #include <qwindowsystem_qws.h> | 50 | #include <qwindowsystem_qws.h> |
24 | #include <qmessagebox.h> | 51 | #include <qmessagebox.h> |