author | zecke <zecke> | 2004-07-17 17:51:32 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-17 17:51:32 (UTC) |
commit | 9b5be1aa88f98bfe939563898e8fa340dbb7fa3f (patch) (unidiff) | |
tree | df938b8250e003b44f75c0fc0dedac2dbc782ddf /core/launcher/serverapp.cpp | |
parent | 0f64024dc631d9043d2f6f4f6bcafaac7eddd545 (diff) | |
download | opie-9b5be1aa88f98bfe939563898e8fa340dbb7fa3f.zip opie-9b5be1aa88f98bfe939563898e8fa340dbb7fa3f.tar.gz opie-9b5be1aa88f98bfe939563898e8fa340dbb7fa3f.tar.bz2 |
-Add depedenncy on OMAF
-Link against OMAF
-Finally use OMAF
-rw-r--r-- | core/launcher/serverapp.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
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 | |||
@@ -15,25 +15,26 @@ | |||
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "serverapp.h" | 21 | #include "serverapp.h" |
22 | #include "screensaver.h" | 22 | #include "screensaver.h" |
23 | 23 | ||
24 | /* OPIE */ | 24 | /* OPIE */ |
25 | #include <opie2/odebug.h> | 25 | #include <opie2/odebug.h> |
26 | #include <opie2/odevice.h> | 26 | #include <opie2/odevice.h> |
27 | #include <qtopia/password.h> | 27 | #include <opie2/multiauthpassword.h> |
28 | |||
28 | #include <qtopia/config.h> | 29 | #include <qtopia/config.h> |
29 | #include <qtopia/power.h> | 30 | #include <qtopia/power.h> |
30 | 31 | ||
31 | #ifdef Q_WS_QWS | 32 | #ifdef Q_WS_QWS |
32 | #include <qtopia/qcopenvelope_qws.h> | 33 | #include <qtopia/qcopenvelope_qws.h> |
33 | #endif | 34 | #endif |
34 | #include <qtopia/global.h> | 35 | #include <qtopia/global.h> |
35 | using namespace Opie::Core; | 36 | using namespace Opie::Core; |
36 | 37 | ||
37 | /* QT */ | 38 | /* QT */ |
38 | #ifdef Q_WS_QWS | 39 | #ifdef Q_WS_QWS |
39 | #include <qgfx_qws.h> | 40 | #include <qgfx_qws.h> |
@@ -341,24 +342,25 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t ) | |||
341 | connect( this, SIGNAL(power() ), | 342 | connect( this, SIGNAL(power() ), |
342 | SLOT(togglePower() ) ); | 343 | SLOT(togglePower() ) ); |
343 | 344 | ||
344 | rereadVolumes(); | 345 | rereadVolumes(); |
345 | 346 | ||
346 | serverApp = this; | 347 | serverApp = this; |
347 | 348 | ||
348 | apmTimeout(); | 349 | apmTimeout(); |
349 | grabKeyboard(); | 350 | grabKeyboard(); |
350 | 351 | ||
351 | /* make sure the event filter is installed */ | 352 | /* make sure the event filter is installed */ |
352 | const ODeviceButton* but = ODevice::inst()->buttonForKeycode( -1 ); | 353 | const ODeviceButton* but = ODevice::inst()->buttonForKeycode( -1 ); |
354 | Q_CONST_UNUSED( but ) | ||
353 | } | 355 | } |
354 | 356 | ||
355 | 357 | ||
356 | ServerApplication::~ServerApplication() | 358 | ServerApplication::~ServerApplication() |
357 | { | 359 | { |
358 | ungrabKeyboard(); | 360 | ungrabKeyboard(); |
359 | 361 | ||
360 | 362 | ||
361 | delete pa; | 363 | delete pa; |
362 | delete m_ps; | 364 | delete m_ps; |
363 | delete m_ps_last; | 365 | delete m_ps_last; |
364 | } | 366 | } |
@@ -486,29 +488,29 @@ void ServerApplication::launcherMessage( const QCString & msg, const QByteArray | |||
486 | } | 488 | } |
487 | } | 489 | } |
488 | 490 | ||
489 | 491 | ||
490 | bool ServerApplication::screenLocked() | 492 | bool ServerApplication::screenLocked() |
491 | { | 493 | { |
492 | return loggedin == 0; | 494 | return loggedin == 0; |
493 | } | 495 | } |
494 | 496 | ||
495 | void ServerApplication::login(bool at_poweron) | 497 | void ServerApplication::login(bool at_poweron) |
496 | { | 498 | { |
497 | if ( !loggedin ) { | 499 | if ( !loggedin ) { |
498 | Global::terminateBuiltin("calibrate"); // No tr | 500 | Global::terminateBuiltin("calibrate"); // No tr |
499 | Password::authenticate(at_poweron); | 501 | Opie::Security::MultiauthPassword::authenticate(at_poweron); |
500 | loggedin=1; | 502 | loggedin=1; |
501 | #ifndef QT_NO_COP | 503 | #ifndef QT_NO_COP |
502 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); | 504 | QCopEnvelope e( "QPE/Desktop", "unlocked()" ); |
503 | #endif | 505 | #endif |
504 | } | 506 | } |
505 | } | 507 | } |
506 | 508 | ||
507 | #if defined(QPE_HAVE_TOGGLELIGHT) | 509 | #if defined(QPE_HAVE_TOGGLELIGHT) |
508 | #include <qtopia/config.h> | 510 | #include <qtopia/config.h> |
509 | 511 | ||
510 | #include <sys/ioctl.h> | 512 | #include <sys/ioctl.h> |
511 | #include <sys/types.h> | 513 | #include <sys/types.h> |
512 | #include <fcntl.h> | 514 | #include <fcntl.h> |
513 | #include <unistd.h> | 515 | #include <unistd.h> |
514 | #include <errno.h> | 516 | #include <errno.h> |
@@ -543,25 +545,25 @@ void ServerApplication::togglePower() | |||
543 | 545 | ||
544 | if ( excllock ) | 546 | if ( excllock ) |
545 | return ; | 547 | return ; |
546 | 548 | ||
547 | excllock = true; | 549 | excllock = true; |
548 | 550 | ||
549 | bool wasloggedin = loggedin; | 551 | bool wasloggedin = loggedin; |
550 | loggedin = 0; | 552 | loggedin = 0; |
551 | m_suspendTime = QDateTime::currentDateTime(); | 553 | m_suspendTime = QDateTime::currentDateTime(); |
552 | 554 | ||
553 | #ifdef QWS | 555 | #ifdef QWS |
554 | 556 | ||
555 | if ( Password::needToAuthenticate ( true ) && qt_screen ) { | 557 | if ( Opie::Security::MultiauthPassword::needToAuthenticate ( true ) && qt_screen ) { |
556 | // Should use a big black window instead. | 558 | // Should use a big black window instead. |
557 | // But this would not show up fast enough | 559 | // But this would not show up fast enough |
558 | QGfx *g = qt_screen-> screenGfx ( ); | 560 | QGfx *g = qt_screen-> screenGfx ( ); |
559 | g-> fillRect ( 0, 0, qt_screen-> width ( ), qt_screen-> height ( )); | 561 | g-> fillRect ( 0, 0, qt_screen-> width ( ), qt_screen-> height ( )); |
560 | delete g; | 562 | delete g; |
561 | } | 563 | } |
562 | #endif | 564 | #endif |
563 | 565 | ||
564 | ODevice::inst ( )-> suspend ( ); | 566 | ODevice::inst ( )-> suspend ( ); |
565 | 567 | ||
566 | ServerApplication::switchLCD ( true ); // force LCD on without slow qcop call | 568 | ServerApplication::switchLCD ( true ); // force LCD on without slow qcop call |
567 | QWSServer::screenSaverActivate ( false ); | 569 | QWSServer::screenSaverActivate ( false ); |