summaryrefslogtreecommitdiff
path: root/core/launcher/serverapp.cpp
authorclem <clem>2004-10-08 22:50:28 (UTC)
committer clem <clem>2004-10-08 22:50:28 (UTC)
commit2f29d0ec4bb2355f193d744c890add203bd6f2b2 (patch) (side-by-side diff)
treea703b00b673b9be036415393b53d9c95a5bb87cd /core/launcher/serverapp.cpp
parentdec031cc21181d70e0c806bcf6c228044f7df90b (diff)
downloadopie-2f29d0ec4bb2355f193d744c890add203bd6f2b2.zip
opie-2f29d0ec4bb2355f193d744c890add203bd6f2b2.tar.gz
opie-2f29d0ec4bb2355f193d744c890add203bd6f2b2.tar.bz2
Big commit thanks to a little feature request :-) We now have an O-menu applet
to lock the PDA immediately, and the internal way to ask for an authentication (on resume, on start up, on demand or for a simple test) is much cleaner: it's through MultiauthPassword(int lockMode) (instead of the old bool at_poweron)
Diffstat (limited to 'core/launcher/serverapp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index dc1f2c7..e541d10 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -489,49 +489,50 @@ void ServerApplication::launcherMessage( const QCString & msg, const QByteArray
int keycode, press, autoRepeat;
stream >> keycode >> press >> autoRepeat;
kf->checkButtonAction ( true, keycode, press, autoRepeat );
}
else if ( msg == "keyRegister(int,QCString,QCString)" ) {
int k;
QCString c, m;
stream >> k >> c >> m;
kf -> registerKey( QCopKeyRegister(k, c, m) );
}
}
bool ServerApplication::screenLocked()
{
return loggedin == 0;
}
void ServerApplication::login(bool at_poweron)
{
if ( !loggedin ) {
Global::terminateBuiltin("calibrate"); // No tr
- Opie::Security::MultiauthPassword::authenticate(at_poweron);
+ int lockMode = at_poweron ? Opie::Security::IfPowerOn : Opie::Security::IfResume;
+ Opie::Security::MultiauthPassword::authenticate(lockMode);
loggedin=1;
#ifndef QT_NO_COP
QCopEnvelope e( "QPE/Desktop", "unlocked()" );
#endif
}
}
#if defined(QPE_HAVE_TOGGLELIGHT)
#include <qtopia/config.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <linux/ioctl.h>
#include <time.h>
#endif
namespace {
void execAutoStart(const QDateTime& suspendTime ) {
QString appName;
int delay;
QDateTime now = QDateTime::currentDateTime();