-rw-r--r-- | core/launcher/config.in | 2 | ||||
-rw-r--r-- | core/launcher/server.pro | 2 | ||||
-rw-r--r-- | core/launcher/serverapp.cpp | 14 |
3 files changed, 10 insertions, 8 deletions
diff --git a/core/launcher/config.in b/core/launcher/config.in index 31da148..a11fed4 100644 --- a/core/launcher/config.in +++ b/core/launcher/config.in @@ -1,4 +1,4 @@ config LAUNCHER boolean "opie-taskbar (program launcher qpe for Opie)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBQRSYNC + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2SECURITY && LIBQRSYNC diff --git a/core/launcher/server.pro b/core/launcher/server.pro index 4e6a581..f366f54 100644 --- a/core/launcher/server.pro +++ b/core/launcher/server.pro @@ -53,32 +53,32 @@ SOURCES += server.cpp \ packageslave.cpp \ irserver.cpp \ qcopbridge.cpp \ startmenu.cpp \ main.cpp \ firstuse.cpp \ syncdialog.cpp \ serverapp.cpp \ qprocess.cpp \ qprocess_unix.cpp \ screensaver.cpp \ $$(OPIEDIR)/noncore/settings/mediummount/mediumwidget.cc \ mediadlg.cpp INCLUDEPATH += $(OPIEDIR)/core/apps/calibrate DEPENDPATH += $(OPIEDIR)/core/apps/calibrate INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/rsync DEPENDPATH += $(OPIEDIR)/rsync INCLUDEPATH += $(OPIEDIR)/noncore/settings/mediummount DEPENDPATH += $(OPIEDIR)/noncore/settings/mediummount -LIBS += -lqpe -lopiecore2 -lopieui2 -lqrsync +LIBS += -lqpe -lopiecore2 -lopieui2 -lopiesecurity2 -lqrsync TARGET = qpe contains( $(CONFIG_TARGET_MACOSX), y ) { LIBS += -lcrypt } include ( $(OPIEDIR)/include.pro ) diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp index 3d88873..f1bce40 100644 --- a/core/launcher/serverapp.cpp +++ b/core/launcher/serverapp.cpp @@ -3,49 +3,50 @@ ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "serverapp.h" #include "screensaver.h" /* OPIE */ #include <opie2/odebug.h> #include <opie2/odevice.h> -#include <qtopia/password.h> +#include <opie2/multiauthpassword.h> + #include <qtopia/config.h> #include <qtopia/power.h> #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif #include <qtopia/global.h> using namespace Opie::Core; /* QT */ #ifdef Q_WS_QWS #include <qgfx_qws.h> #endif #include <qmessagebox.h> #include <qtimer.h> #include <qpainter.h> #include <qfile.h> #include <qpixmapcache.h> /* STD */ #ifdef Q_OS_WIN32 #include <io.h> #include <process.h> #else @@ -329,48 +330,49 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t ) connect( kf, SIGNAL(launch()), this, SIGNAL(launch()) ); connect( kf, SIGNAL(power()), this, SIGNAL(power()) ); connect( kf, SIGNAL(backlight()), this, SIGNAL(backlight()) ); connect( kf, SIGNAL(symbol()), this, SIGNAL(symbol())); connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle())); connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle())); connect( kf, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)), this,SIGNAL(activate(const Opie::Core::ODeviceButton*,bool))); connect( kf, SIGNAL(backlight()), this, SLOT(toggleLight()) ); connect( this, SIGNAL(power() ), SLOT(togglePower() ) ); rereadVolumes(); serverApp = this; apmTimeout(); grabKeyboard(); /* make sure the event filter is installed */ const ODeviceButton* but = ODevice::inst()->buttonForKeycode( -1 ); + Q_CONST_UNUSED( but ) } ServerApplication::~ServerApplication() { ungrabKeyboard(); delete pa; delete m_ps; delete m_ps_last; } void ServerApplication::apmTimeout() { serverApp-> checkMemory( ); // in case no events are generated *m_ps_last = *m_ps; *m_ps = PowerStatusManager::readStatus(); if ( m_ps->acStatus() != m_ps_last-> acStatus() ) m_screensaver-> powerStatusChanged( *m_ps ); if ( m_ps->acStatus() == PowerStatus::Online ) { return; } @@ -474,53 +476,53 @@ void ServerApplication::launcherMessage( const QCString & msg, const QByteArray if ( msg == "deviceButton(int,int,int)" ) { 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 - Password::authenticate(at_poweron); - loggedin=1; + Global::terminateBuiltin("calibrate"); // No tr + Opie::Security::MultiauthPassword::authenticate(at_poweron); + loggedin=1; #ifndef QT_NO_COP - QCopEnvelope e( "QPE/Desktop", "unlocked()" ); + 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(); Config cfg( "autostart" ); cfg.setGroup( "AutoStart" ); @@ -531,49 +533,49 @@ namespace { // value saved as delay, start the app if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) { QCopEnvelope e( "QPE/System", "execute(QString)" ); e << QString( appName ); } } } void ServerApplication::togglePower() { static bool excllock = false; if ( excllock ) return ; excllock = true; bool wasloggedin = loggedin; loggedin = 0; m_suspendTime = QDateTime::currentDateTime(); #ifdef QWS - if ( Password::needToAuthenticate ( true ) && qt_screen ) { + if ( Opie::Security::MultiauthPassword::needToAuthenticate ( true ) && qt_screen ) { // Should use a big black window instead. // But this would not show up fast enough QGfx *g = qt_screen-> screenGfx ( ); g-> fillRect ( 0, 0, qt_screen-> width ( ), qt_screen-> height ( )); delete g; } #endif ODevice::inst ( )-> suspend ( ); ServerApplication::switchLCD ( true ); // force LCD on without slow qcop call QWSServer::screenSaverActivate ( false ); { QCopEnvelope( "QPE/Card", "mtabChanged()" ); // might have changed while asleep } if ( wasloggedin ) login ( true ); execAutoStart(m_suspendTime); //qcopBridge->closeOpenConnections(); excllock = false; |