author | ar <ar> | 2004-02-07 23:00:09 (UTC) |
---|---|---|
committer | ar <ar> | 2004-02-07 23:00:09 (UTC) |
commit | 3f261fa6eac46b8d0d4ac8b8bb95b385435004da (patch) (unidiff) | |
tree | 3ce8d25b96a287e2df7b194513f2c3c0a27ecd0a /noncore/net/wellenreiter/gui/wellenreiter.cpp | |
parent | 83a8f6fd9db949943d58d2f2a80304d516cf45d3 (diff) | |
download | opie-3f261fa6eac46b8d0d4ac8b8bb95b385435004da.zip opie-3f261fa6eac46b8d0d4ac8b8bb95b385435004da.tar.gz opie-3f261fa6eac46b8d0d4ac8b8bb95b385435004da.tar.bz2 |
correct sound calls for use with libopie2
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 43a04e3..db68e5b 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -609,101 +609,101 @@ void Wellenreiter::startClicked() | |||
609 | else | 609 | else |
610 | { | 610 | { |
611 | // start timer for reading packets | 611 | // start timer for reading packets |
612 | startTimer( 100 ); | 612 | startTimer( 100 ); |
613 | } | 613 | } |
614 | 614 | ||
615 | logwindow->log( "(i) Started Scanning." ); | 615 | logwindow->log( "(i) Started Scanning." ); |
616 | sniffing = true; | 616 | sniffing = true; |
617 | 617 | ||
618 | #ifdef QWS | 618 | #ifdef QWS |
619 | if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) | 619 | if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) |
620 | { | 620 | { |
621 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; | 621 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; |
622 | } | 622 | } |
623 | #else | 623 | #else |
624 | #warning FIXME: setScreenSaverMode is not operational on the X11 build | 624 | #warning FIXME: setScreenSaverMode is not operational on the X11 build |
625 | #endif | 625 | #endif |
626 | 626 | ||
627 | emit( startedSniffing() ); | 627 | emit( startedSniffing() ); |
628 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title | 628 | if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title |
629 | else | 629 | else |
630 | { | 630 | { |
631 | assert( parent() ); | 631 | assert( parent() ); |
632 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); | 632 | ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); |
633 | } | 633 | } |
634 | } | 634 | } |
635 | 635 | ||
636 | 636 | ||
637 | void Wellenreiter::timerEvent( QTimerEvent* ) | 637 | void Wellenreiter::timerEvent( QTimerEvent* ) |
638 | { | 638 | { |
639 | qDebug( "Wellenreiter::timerEvent()" ); | 639 | qDebug( "Wellenreiter::timerEvent()" ); |
640 | OPacket* p = pcap->next(); | 640 | OPacket* p = pcap->next(); |
641 | if ( !p ) // no more packets available | 641 | if ( !p ) // no more packets available |
642 | { | 642 | { |
643 | stopClicked(); | 643 | stopClicked(); |
644 | } | 644 | } |
645 | else | 645 | else |
646 | { | 646 | { |
647 | receivePacket( p ); | 647 | receivePacket( p ); |
648 | delete p; | 648 | delete p; |
649 | } | 649 | } |
650 | } | 650 | } |
651 | 651 | ||
652 | 652 | ||
653 | void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) | 653 | void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p ) |
654 | { | 654 | { |
655 | #ifdef QWS | 655 | #ifdef QWS |
656 | if ( action == "TouchSound" ) | 656 | if ( action == "TouchSound" ) |
657 | ODevice::inst()->touchSound(); | 657 | ODevice::inst()->playTouchSound(); |
658 | else if ( action == "AlarmSound" ) | 658 | else if ( action == "AlarmSound" ) |
659 | ODevice::inst()->alarmSound(); | 659 | ODevice::inst()->playAlarmSound(); |
660 | else if ( action == "KeySound" ) | 660 | else if ( action == "KeySound" ) |
661 | ODevice::inst()->keySound(); | 661 | ODevice::inst()->playKeySound(); |
662 | else if ( action == "LedOn" ) | 662 | else if ( action == "LedOn" ) |
663 | ODevice::inst()->setLedState( Led_Mail, Led_On ); | 663 | ODevice::inst()->setLedState( Led_Mail, Led_On ); |
664 | else if ( action == "LedOff" ) | 664 | else if ( action == "LedOff" ) |
665 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); | 665 | ODevice::inst()->setLedState( Led_Mail, Led_Off ); |
666 | else if ( action == "LogMessage" ) | 666 | else if ( action == "LogMessage" ) |
667 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 667 | logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
668 | else if ( action == "MessageBox" ) | 668 | else if ( action == "MessageBox" ) |
669 | QMessageBox::information( this, "Notification!", | 669 | QMessageBox::information( this, "Notification!", |
670 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); | 670 | QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) ); |
671 | #else | 671 | #else |
672 | #warning Actions do not work with Qt/X11 yet | 672 | #warning Actions do not work with Qt/X11 yet |
673 | #endif | 673 | #endif |
674 | } | 674 | } |
675 | 675 | ||
676 | void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) | 676 | void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) |
677 | { | 677 | { |
678 | #ifdef QWS | 678 | #ifdef QWS |
679 | if ( !iface ) | 679 | if ( !iface ) |
680 | { | 680 | { |
681 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); | 681 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); |
682 | return; | 682 | return; |
683 | } | 683 | } |
684 | 684 | ||
685 | if ( sniffing ) | 685 | if ( sniffing ) |
686 | { | 686 | { |
687 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); | 687 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); |
688 | return; | 688 | return; |
689 | } | 689 | } |
690 | 690 | ||
691 | qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", | 691 | qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", |
692 | (const char*) iface->name(), | 692 | (const char*) iface->name(), |
693 | (const char*) type, | 693 | (const char*) type, |
694 | (const char*) essid, | 694 | (const char*) essid, |
695 | channel, | 695 | channel, |
696 | (const char*) macaddr ); | 696 | (const char*) macaddr ); |
697 | 697 | ||
698 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); | 698 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); |
699 | int count = 3; | 699 | int count = 3; |
700 | qDebug("sending %d messages",count); | 700 | qDebug("sending %d messages",count); |
701 | msg << QString("count") << QString::number(count); | 701 | msg << QString("count") << QString::number(count); |
702 | qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); | 702 | qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); |
703 | msg << QString(iface->name()) << QString("Mode") << type; | 703 | msg << QString(iface->name()) << QString("Mode") << type; |
704 | qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); | 704 | qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); |
705 | msg << QString(iface->name()) << QString("ESSID") << essid; | 705 | msg << QString(iface->name()) << QString("ESSID") << essid; |
706 | qDebug("msg >%s< channel >%d<", iface->name(),channel); | 706 | qDebug("msg >%s< channel >%d<", iface->name(),channel); |
707 | msg << QString(iface->name()) << QString("Channel") << channel; | 707 | msg << QString(iface->name()) << QString("Channel") << channel; |
708 | // qDebug("msg >%s< mac >%s<", iface->name(),macaddr); | 708 | // qDebug("msg >%s< mac >%s<", iface->name(),macaddr); |
709 | // msg << QString(iface->name()) << QString("MacAddr") << macaddr; | 709 | // msg << QString(iface->name()) << QString("MacAddr") << macaddr; |